Currently on a new project involving Flash CS6 and AS3.
I want to have an audio track looping in the background unihibited while i navigate through the timeline. The plan is to have two movie clips loop ( can be changed to a regular loop ) with a sort of continue button to navigate to another point in the timeline where the animation will continue then finish, shutting off the audio track. Sorry this is turning out to be more difficult to explain than i thought. So here's an example: http://www.mspaintadventures.com/?s=6&p=002293
The problem is i can't find a tutorial anywhere to accomplish what i want to do and i don't know how to make the audio repeat uninterrupted without it doubling up on itself which Event sounds do.
Blargh. Speedy responses would be appreciated.
Thanks.
Would you mind being a bit more specific in how to employ it? Because as it stands it doesn't play anything, and the timeline is ignoring the command to return to the first frame of the character's idle loop.
| Scene 1, Layer 'Audio', Frame 1, Line 1 | 1067: Implicit coercion of a value of type Class to an unrelated type flash.net:URLRequest. |
Ok, the way it's working now is the first two lines of code on the same layer as the audio track in frame 1. Just pasted straight in. The track is set to Event and Loop since that's the only setting that gets it to continue.
The problem is that when i click the button to navigate to what would be the next portion of the flash, the song doubles up on itself out of sync after the next loop starts. With this error in the Output window.
ArgumentError: Error #2068: Invalid sound.
at flash.media::Sound/play()
at ImpStrifeRob_fla::MainTimeline/frame1()
ArgumentError: Error #2068: Invalid sound.
at flash.media::Sound/play()
at ImpStrifeRob_fla::MainTimeline/frame1()
Does anyone have any suggestions on how to resolve the error and allow it to continue looping without playing multiple instances of the track after i navigate?
you should not have any sound attached to any timeline.
in your library panel, right click your sound, click properties and tick export for actionscript and assign a class name eg, MP3.
then attached to a frame that plays when you want your sound to start use:
var s:Sound=new MP3();
var sc:SoundChannel=s.play(0,10000);
Alright, so
var s:Sound=new AudioLoop();
var sc:SoundChannel=s.play(0,10000);
In a new layer loops the sound but gives me the double up bug again when it starts to loop again - Although without any errors compiling.
- but it doesn't isolate it from other actionscript commands, as the image loop ( currently gotoAndPlay(1); for simplicity's sake ) at frame 60 in a seperate layer just doubles up the audio track every time it crosses that command's frame. Removing the command removes the double up but means the image loop is broken - obviously not what i want to happen. Is there a way for me to either fix the movie clip loop & navigation?
Actually, i'm just going to upload the .fla file because it'll be easier
North America
Europe, Middle East and Africa
Asia Pacific