This content has been marked as final. Show 5 replies
> First you hear the song, then you hear two songs, then three,
> and so on.
> What am I doing wrong? I can't figure it out. Any help would
> be great.
There are a number of ways to get audio to play in Flash. Can you
describe the steps you're taking? (e.g., you're adding audio to a keyframe,
or maybe you're using ActionScript -- if so, which version of ActionScript?)
If you can spell out what you've done so far, it's likely someone can help
you find a solution. :)
Co-author, Foundation Flash CS3 for Designers
"Luck is the residue of good design."
I added the audio to keyframes and I am using AS 2.0. I want the audio to loop, just once it reaches the end of the song. Does the final keyframe need to be a blank keyframe?
I would say that if you want the song to loop that it may be better to use a Sound Object and a little code. so if you would be interested in this route - remove the sound from the timeline.
first - set up the sound by selecting it in the library and right-click select 'properties...' - then in the properties panel check the 'export for ActionScript' box and give the sound an 'Indentifier' name - this will allow you to use the sound file within the document and point to it in code by using the ID name.
next - make a new layer called 'actions' on the main timeline if you don't have one already - select the first frame and enter the code below - replace the 'IDname.mp3' with the ID name of your sound file you've assigned.
see the 'sound.start()' method below - the second parameter in it refers to the amount of 'loops' that it will run before stopping - you can set this any way you would like.
more information on the Sound Object class is available HERE
This sounds like a much better way for me to go. Thank you very much for the very clear instructions.
and thank you for your time,
you're welcome :)