View Full Version : Detecting completion of a loadMovie() swf
admiralskeet
April 2nd, 2003, 06:53 AM
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:
SteveD
April 2nd, 2003, 07:32 AM
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:
stop();
//
_root.gotoAndPlay(_currentframe+1);
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 :
stop();
_root.stop();
If it is a loading problem, well it depends on how you are loading.
Hope it helps
Cheers
SteveD
admiralskeet
April 2nd, 2003, 07:50 AM
nope didn't work.
admiralskeet
April 2nd, 2003, 07:50 AM
and i'm loading htem using loadMovie() if it helps
SteveD
April 2nd, 2003, 07:54 AM
In the last frame of your song.swf, try putting
stopAllSounds();
If that doesn't work, do you have a file you can post ?
SteveD
admiralskeet
April 2nd, 2003, 08:01 AM
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.
SteveD
April 2nd, 2003, 08:25 AM
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
admiralskeet
April 2nd, 2003, 09:01 AM
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!!
SteveD
April 2nd, 2003, 09:54 AM
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 unLoadMovie(60); 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:
on (release) {
nextFrame();
}
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:_level0.nextFrame();
Think I have covered everything - let me know
Cheers
SteveD
jazzman121
April 2nd, 2003, 10:44 AM
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
admiralskeet
April 2nd, 2003, 10:46 AM
jazzman i am curious as to how you made your speakers "jitter" as if they were actually playing
admiralskeet
April 2nd, 2003, 10:46 AM
steve d i am trying your idea out now
jazzman121
April 2nd, 2003, 10:53 AM
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
SteveD
April 2nd, 2003, 11:23 AM
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
jazzman121
April 2nd, 2003, 11:42 AM
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 ;)
ps : sorry to go offtopic here guys :p
admiralskeet
April 2nd, 2003, 11:51 AM
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
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.