ok this is the helmet condition, if you click helmet than you can leave.
Instead of adding an eventlistener for each movieclip you should use the click function with e.target.name to check for movieclips clicked on. Actionscript 3.0 is faster than this javascript language
PHP Code:
//CODE THAT MAKES FRAMES STOP
this.stop();
// R O O M 1
// Code that makes this button live
this.butt_hatch.addEventListener("click", butt_hatchAction.bind(this));
// Code that makes this button work
function butt_hatchAction() {
this.gotoAndStop(1)
}
// R O O M 2
// Code that makes this button live
this.butt_fridge.addEventListener("click", butt_fridgeAction.bind(this));
// Code that makes this button work
function butt_fridgeAction() {
this.gotoAndStop(2)
}
// R O O M 3
// Code that makes this button live
this.butt_ladder.addEventListener("click", butt_ladderAction.bind(this));
// Code that makes this button work
function butt_ladderAction() {
this.gotoAndStop(3)
}
// R O O M 4
// Code that makes this button live
// R O O M 5
var mainStage=this
var helmet_clicked=false
this.stage.on("click", function(e) {
if(e.target.name=="helmet"){
helmet_clicked=true
}
if(e.target.name=="butt_airlock"&&helmet_clicked==true){
mainStage.gotoAndStop(4)
}
});