Click to See Complete Forum and Search --> : v7-AS3 help with koolmoves exchange menu1
jarnold
04-23-2009, 08:11 AM
Hi,
Want to thank Bret for his help so far. I've been looking at flash exchange example menu1. It calls up 3 .swfs to play within the stage. Each button calls up one swf. I would like to know if it is possible to stop another swf being played if one is already playing.
code to play swf
on(release){
gotoAndPlay("one")
mc4.loadMovie("one.swf");
}
thanks,
ja
jarnold
05-03-2009, 09:08 AM
Anybody? Lots of views but no thoughts?
blanius
05-03-2009, 09:44 AM
hmmm.. confused.
Your code dosen't quite look right to me. I'm on a computer with out KM so can't test but:
//assuming that you want to load a movie with a filename of one.swf into mc4
//also this code is AS1 NOT AS3 and in AS3 I believe there is no loadMovie command
on(release){
mc4.loadMovie("one.swf");
mc4.gotoAndPlay(1);
}
}
jarnold
05-03-2009, 09:56 AM
hmmm.. confused.
Your code dosen't quite look right to me. I'm on a computer with out KM so can't test but:
//assuming that you want to load a movie with a filename of one.swf into mc4
//also this code is AS1 NOT AS3 and in AS3 I believe there is no loadMovie command
on(release){
mc4.loadMovie("one.swf");
mc4.gotoAndPlay(1);
}
}
Hi Bret,
I know its AS1 just found the other code to try to nut it out.
There are 5 buttons each calls a .swf using
on(release){
gotoAndPlay("one")
mc4.loadMovie("one.swf");
}
but I want to only to be able to click on another button if no other .swf is playing - meaning kids can't swap out of one and go to another - must finish one first to move on.
btw - worked out how to navigate without using enter key by using timers to move to next frame. I sent you a .fun earlier about my problem
john
jarnold
05-16-2009, 07:16 AM
This is from the flash exchange example menu1. The .fun is uploaded to look at.
A mc called mc4 is used to call up 3 .swfs to play within the stage. Each button calls up one swf. code to play swf eg
on(release){
gotoAndPlay("one") // goes to frame "one"
mc4.loadMovie("one.swf");
}
Is there a way to stop a button loading another .swf if one is already playing?
thanks,
ja[/QUOTE]
jarnold
05-23-2009, 02:17 AM
Hi all,
Looks dumb that I'm writing to myself. Just realized Bret, that its your menu1 from the KoolExchange samples. Is there no way a check can be made so that if "one.swf" is running you can't push button 2 and start "two.swf"? At the moment pushing any button stops the current and loads the next.
AS1 for each button
on(release){
gotoAndPlay("one") // or "two" or "three"
mc4.loadMovie("one.swf"); // or two.swf or three.swf
}
I'll drop this thread - just had so many views looks like there are other people interested in finding out.
thanks,
John
blanius
05-23-2009, 09:39 AM
I can't imagine why you would want to do this. However you could try this. Firstly I don't think you can tell if a movie is running but you could build the child movies so that they set a variable in the main movie called "running" when they start set it to the clips name or something and on the last frame put the code to set [b]running]/b] to false and in you menu you would do a check for this variable
So like in mc4 loaded movie you'd put something like
_root.running=this
then in the menu you should be able to test the value of running to see if it's not empty....
The thing is your buttons will not be clickable until a movie stops I would imagine that is NOT what the end user would expect and would probably prove confusing.
flashkit.com
Copyright WebMediaBrands Inc., All Rights Reserved.