Copy link to clipboard
Copied
I'm new to flash and Actionscript and can't figure out how to do a couple of things?
1: How do you make it so if you click a button then it will send you to a random scene?
E.G. Click button on scene 1 to make it pick at random scene 2,3 or 4.
2: How to make is so that a button is locked and unable to be clicked until you have meet a requirement.
E.G. You have a scene with 3 buttons and you have to click button 1 + 2 and watch the scene that each button plays before it goes back to the scene with the 3 buttons and button 3 can now be clicked to view the scene from button 3.
Copy link to clipboard
Copied
1.
btn.addEventListener(MouseEvent.CLICK,btnF);
function btnF(e:MouseEvent):void{
gotoAndPlay(1,Math.ceil(3*Math.random())+1);
}
2. btn.mouseEnabled=false
Find more inspiration, events, and resources on the new Adobe Community
Explore Now