Detecting completion of a loadMovie() swf

Okay, I’ll try to explain this as simply as possible.

I have a movie called radio.swf

this has 5 keyframes. Each keyframe loads a different swf movie.

keyframe 1 loads “song1.swf”
keyframe 2 loads “song2.swf”
etc…

This all works great. BUT here is the problem

When song1.swf ends it loops itself. How can i make it to when song1.swf ends, the timeline in radio.swf advances one keyframe so that song2.swf starts to play?

Hope i made that understandable!
:ninja:

Hi,
Not sure if your problem is loading movies or playing them,
If it is playing the swf’s then put this code in the last frame of each song.swf:
[AS]stop();
//
_root.gotoAndPlay(_currentframe+1);
[/AS]

When the last song has played it will loop back to the first one, however you can change the code in the last song.swf to :
[AS]stop();
_root.stop();
[/AS]

If it is a loading problem, well it depends on how you are loading.

Hope it helps

Cheers

SteveD

nope didn’t work.

and i’m loading htem using loadMovie() if it helps

In the last frame of your song.swf, try putting
[AS]stopAllSounds();[/AS]

If that doesn’t work, do you have a file you can post ?

SteveD

maybe it will help you out if you see it in action. go to www.pbcyouth.net/flash/radio_new.swf
Listen to the first song play…see how it loops? But if you hit the skip button you can go to the next song. Perhaps that can help you.

Hi,
Well I like Jars of Clay, however it didn’t loop, just came to a stop, I waited a respectable amount of time, but nothing happened, only went to the next song when I hit the skip button. So, difficult to say what the prob can be.

Q. Are you using scene names and frame labels in your code ?

If yes, drop the scene names and try again, if still not working drop the frame labels and use frame numbers - other than that I can’t really say without seeing the fla

Cheers

SteveD

p.s. I might just go back and listen some more, nice site

Ok here is what I’ve done

main interface -> www.pbcyouth.net/radio_new.fla

song “template” -> www.pbcyouth.net/song.fla

What i did in the song.fla was remove the audio file (due to filesize) and deleted a bunch of frames that i used to extend it due to the length of the song (also saving on filesize) I’m sure you will be able to get the idea of what it is that I am doing
I hope that you can help!!

Hi,
Think your prob is a duplication of code. from your song.fla I created three more and just changed the text so that I could see the different movies loading in. Try this

In your main movie, layer SOUNDS
remove all of the [AS]unLoadMovie(60);[/AS] from each frame. When you load a movie into the same level, Flash removes the current movie in that level, so the above code is not needed, and worse, it is probably removing your new movie as well !!!
Next, on your forward button, change the code to:
[AS]on (release) {
nextFrame();
}[/AS]
This means that you can remove all of the stop() actions in the actions layer from frame4 onwards - these don’t actually give you any problems except when debugging, - nextFrame(); is a stop action.
Next, in your song.fla’s, change the code in the very last frame to:[AS]_level0.nextFrame();[/AS]

Think I have covered everything - let me know

Cheers

SteveD

hey admiralskeet … well if that dint work… i have a better solution for you… check this website i made…

the audio loading is streaming and its an mp3 in a folder… so you dont have to make swfs for each song u want in ur radio…

http://www.elevate-youth.com

contact me if u need help

**aim: saringk
yahoo: jazzman121
**

jazzman i am curious as to how you made your speakers “jitter” as if they were actually playing

steve d i am trying your idea out now

the speakers were made in 3dsmax by discreet™ , so it was animated in that… and just imported a small image of the speakers bent… and just looped the animation

you can do it in photoshop just make ur speakers smaller about a pixel … and then import to flash and in random speed animate it between ur normal speakers and ur punched in speaker

Hey Jazzman,
That is about the most original menu/nav sytem ( don’t know what to call it) that I have ever seen, don’t have the time to explore the site fully right now, but have bookmarked and will take a longer look later - I have an idea it will be inspirational !
Excellent

SteveD.

p.s.
Love those speakers

thanks SteveD … glad you like it… Im working on something totally different for my website … http://www.saringeorge.com will be releasing it soon… be sure to check it out :wink:

ps : sorry to go offtopic here guys :stuck_out_tongue:

SteveD you are awesome. It works beautifully now. I’m be intrested for you to give some critque/feedback on the site. www.pbcyouth.net
I would much appreciate it.
THANKS A MILLION
Justin