A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: fading out a loop

  1. #1
    Junior Member
    Join Date
    Aug 2003
    Posts
    27

    fading out a loop

    how do i do this? is there a code i need to put in somewhere to accomplish this?

    -mg
    here and there, when and where, who is what, and...um...

  2. #2
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    You should read FAQ #4: "How do I create a sound fade in or fade out with ActionScript?" in the sticky thread "SOUND FORUM FAQ - READ THIS FIRST":

    http://www.flashkit.com/board/showth...hreadid=299918

  3. #3
    Junior Member
    Join Date
    Aug 2003
    Posts
    27
    but what if i had a event sound clip named "mloop", how would that be included in the actionscript?

    does it just tell any loop to fade out?
    here and there, when and where, who is what, and...um...

  4. #4
    Registered User
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    do you mean a sound on the timeline, not attached to a sound object?

  5. #5
    Junior Member
    Join Date
    Aug 2003
    Posts
    27
    yes, a event loop on the timeline,... is it possible to do that ?
    here and there, when and where, who is what, and...um...

  6. #6
    Registered User
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    yes. you can dynamically control a timeline sound's volume/pan from a sound object too. Just pass the target path of the mc to the sound object constructor function and the sound object can control volume/pan of the sound within the mc.

    Code:
    mysound = new Sound(target path to mc containing loop);
    typically you create the sound object inside the mc in a frame before the frame containing sound, or in the mc load event.

    Code:
    //code attached to the mc, not in a frame
    onClipEvent(load){
      mysound = new Sound(this);
    }
    then just use this mc target path in the fade out code.

  7. #7
    Junior Member
    Join Date
    Aug 2003
    Posts
    27
    thanks hp3 for the help
    here and there, when and where, who is what, and...um...

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