Flash help please
- Started
- Last post
- 7 Responses
- breadlegz
I have a button.When you press it, the flash movie needs to go to one of three scenes.
This needs to be random.
How could I do this?
Thanks in advance. Its Saturday morning and I want to go back to bed.
- unknown0
whichMovie = random(3);
if (whichMovie==0){
loadMovie ("moviea.swf")
}
if (whichMovie==1){
loadMovie ("movieb.swf")
}
if (whichMovie==2){
loadMovie ("moviec.swf")
}
This is it in it's simplest form... but, and there are better (more complicated) ways of doing it... but this will show you the logic
- unfittoprint0
another way:
myScene=new Array("scene1","scene2","scene3...
myButton.onPress = function(){
gotoAndPlay(myScene[Math.round(M...
}
- JazX0
again unfit has the answer, please NT elevate this man to NB level or pink. :)
- Jnr_Madison0
I agree. Or maybe a new colour for like a PBS tech or something?
- Jnr_Madison0
sorry, PV-AN...
- unfittoprint0
2 kind.
- CyBrainX0
Jnr_Madison has a pretty good idea right here. Different colors for tech issues based on Flash, Web Dev, 3D, Animation, Hardware, etc.
Sounds good enough for a thread.