This content has been marked as final. Show 9 replies
Are you using the Sound in the TimeLine or loading dynamicall ???
I am using the sound in the TimeLine, but if there is a better way then I am open to suggestions.
So, better if you want to play the sound that doesnt depend on the frame rate , you should use the dynamic sound loading.
Just you can import the sound file in your library and give an identifier name.
then attach the sound to the stage using attachSound(identifierName).
Excuse my lack of knowledge but I have never dynmaically loaded a sound file before, and I wouldn't really know what to do with it once I had it.
I will give you the steps to do that !
First you import a sound like what you did to import the sound to the stage time line.
But this time you are not importing the sound to the stage, you are importing into the library. Then , right click the sound element in the library to get the Linkage Property window of that sound. Then seleect the "Export for ActionScript" and give a Identifier Name like "mySound" and press ok.
Now, in the stage add the following code.
Var mySoundObj:Sound = new Sound();
mySoundObj.attachSound(mySound) // Identifier Name.
mySoundObj.play(100) // Loops..
You can also see this kind of helps in the Flash help.....
So can i then fade out the audio using a similar code? Do you know how to do this too.
Thanks for helping out, I've been stuck for ages.
Yes, you can fade in or fade out the sound dynamically....
I already posted a source code , in this forum regarding what you are expecting...
If possible , you just go thru the thread posted by before some 2 or 2 weeks.
Thanks arunbe. I shall have a look through the threads you last posted and see if I can solve the problem.
I owe you one.
Welcome ! :)