views:

259

answers:

1

Hi,

I am doing a elearning project in flex and it consist in a secuence of swf files and a player that load it based in a xml file, the problem is all swf files contents narrations and I need to control the volume of narrations from the player interface, anybody know how I can control the volume of a swf file from flex??

Thanks for your help

+2  A: 

I have found the answer for myself and I share with you:

Well you need to assign a SoundTransform object to soundTransform property of MovieClip object.

WRONG WAY

var slide:MovieClip = MovieClip(swfLoader.content);
slide.soundTransform = new SoundTransform();
slide.soundTransform.volume = 0.5;

CORRECT WAY

var slide:MovieClip = MovieClip(swfLoader.content);
var st:SoundTransform = new SoundTransform();
st.volume = 0.5;
slide.soundTransform = st;
juanca
it semes that this answer if for flex 3 and not 4.
ufk