PDA

View Full Version : Variables exploding my head


focusyou
11-14-2007, 06:41 PM
I can't make that paradigm shift into understanding how to gain control over a movie clip so it only plays once 'onPress'.

Basically, I have a movieclip that has an onRollover, onRollOut, and onRelease -- simple, but I want the Release to; 1) disable the RollOver and RollOut until the "release" has finished, then 2) disable the onRelease function once "release" has finished -- I have it like so, but I'm obviously doing variables incorrectly because the RollOver and RollOver don't reset after "release" finishes:


var bcB = 0;
var bcBB =0;

this.onRollOver = function (){
if(bcBB==0){
gotoAndPlay ("over");}
}
this.onRollOut = function (){
if(bcBB==0){
gotoAndPlay ("out");}
}

this.onRelease = function (){
if(bcB==0){
_root.bcBB=1;
gotoAndPlay ("release");}
}

raskolnikov
11-15-2007, 12:44 AM
maybe u can use onEnterframe to have a constant checker for the state of your button. have 3 variables and set them in your button's action on each state. then onENterframe have a bunch of if else statemnts to control the animation?