Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

:: audio fade in / out ::

Status
Not open for further replies.

MaTs4d

Technical User
Joined
Feb 13, 2002
Messages
48
Location
US
hi there
Is there an easy way to fade in/out a background audio track in flash?
withour resorting to too much actionscript?
I would like to have the audio fade in/out when the playhead reaches a certain cue point..
I found a script that does that but its muting ALL the audio.

its messy
can that be done easily?
thanks !!
Matt
 
you have to have a sound object (actionscript)

so frame 1
my sound = new sound();
mysound.attachSound("wahterver");//linkage name

//or mysound.loadsound("some.mp3",true);


frame you want the sound to start

mysound.start();


frame you want the fade to begin

myFade = setInterval(fade,50);
i = 100;

function fade(){
i --;
mysound.setvolume(i);
if (i <=0){
clearinterval(myfade);
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top