PDA

View Full Version : randomly clicked buttons


Natoush
11-04-2007, 07:11 AM
lets say i have about 6 buttons..
what i wanna do is... after they're ALL clicked (in no specific order) to give me a screen sayin (picture 2) or sth... and jump to the next frame...

so.. how can i do that?

Aristocratic
11-04-2007, 08:57 AM
Try using a number variable
Each time a button is clicked you could have it increment a variable and turn itself off. Then when it equals 6 show the screen

Sample code (This was put in a single frame in the root timeline)

var counter:Number = 0

Button1.onRelease = function(){
this.enabled = false
counter++
}

this.onEnterFrame = function(){
if (counter >= 6){
delete this.onEnterFrame
//Code to show screen
}
}