Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do you use buttons to pick random scenes and lock/unlock buttons?

New Here ,
Dec 19, 2015 Dec 19, 2015

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.

TOPICS
ActionScript
320
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 19, 2015 Dec 19, 2015
LATEST

1.

btn.addEventListener(MouseEvent.CLICK,btnF);

function btnF(e:MouseEvent):void{

gotoAndPlay(1,Math.ceil(3*Math.random())+1);

}

2. btn.mouseEnabled=false

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines