|
-
Adjusting volume of video component inside movieclip
Hello,
How would I adjust the volume of a video component nested inside a movieclip? I've tried the following methods:
Code:
mcName.vidName.setVolume(0);
Result: ReferenceError: Error #1069: Property setVolume not found on flash.media.Video and there is no default value.
at movie2_fla::MainTimeline/movie2_fla::frame1()
Code:
var sndOff = new SoundTransform(0);
mcName.vidName.soundTransform = sndOff;
Result: ReferenceError: Error #1056: Cannot create property soundTransform on flash.media.Video.
at movie2_fla::MainTimeline/movie2_fla::frame1()
Anyone know how I should be doing this?
-
Senior Member
You can try this:
var channel:SoundTransform = new SoundTransform();
channel.volume = 0;
FLVPlayBack(mcname.getChildByName(vidName)).soundT ransform = channel;
- The right of the People to create Flash movies shall not be infringed. -
-
Thanks for replying! I get these errors:
1180: Call to a possibly undefined method FLVPlayBack.FLVPlayBack(mcName.getChildByName(vidN ame)).soundTransform = sndOff;
and
1120: Access of undefined property vidName.
FLVPlayBack(mcName.getChildByName(vidName)).soundT ransform = sndOff;
I'm not really sure where to go from here! :s
-
Senior Member
You need to enter the names for the component and your movieclip. I don't know the names.
- The right of the People to create Flash movies shall not be infringed. -
-
The component is called vidName, the movieclip which it is nested inside is called mcName. I didn't use the FLVPlayback component from the library, instead I'm using the Video component (the one with the camcorder icon next to it, rather than the blue square with play and stop next to it in the library). I hope that tells you all you need!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|