A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Adjusting volume of video component inside movieclip

  1. #1
    Senior Member
    Join Date
    Feb 2003
    Posts
    129

    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?

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    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. -

  3. #3
    Senior Member
    Join Date
    Feb 2003
    Posts
    129
    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

  4. #4
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    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. -

  5. #5
    Senior Member
    Join Date
    Feb 2003
    Posts
    129
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center