|
-
Actionscript rotate If Statement
I have 2 buttons (buttonIncrease and buttonDecrease). I also have two switches. When the switches are clicked on, one movie clip symbols visibility becomes false while the other visibility becomes true to get the "on and off" effect.
buttonIncrease code
buttonIncrease.onPress = function()
{
gauge.onEnterFrame = function()
{
if(this._rotation == 180)
{
delete this.onEnterFrame;
return;
}
this._rotation += 1;
}
}
buttonDecrease code
buttonDecrease.onPress = function()
{
gauge.onEnterFrame = function()
{
if(this._rotation == 0)
{
delete this.onEnterFrame;
return;
}
this._rotation -= 1;
}
}
what i need is an if statement that looks something like this
if(this._rotation == 30 && switchOn._visible == true && lightOn._visible == true){
the gauge starts to increase once reached 30 degrees and both switches are on
}
hope thats understandable :P
thanks!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|