Hello everyone,
I am dabbling in if/else statements today and kind of ran into a problem and would greatly appreciate if someone can help me out. Here is what I have on my stage
I have a redRectangle
I have a alphaButton when clicked on it brings redRectangle alpha to 40 percent.
I have a ifButton that I am trying to incroprate if/else statement to.
What I want to be able to do is see if the redRectangle is at 40 opacity I want to load 1.swf if not load 2.swf.
The problem I am running into is even if the opacity is at 40% the 2.swf is loaded instead of 1.swf.
import mx.transitions.Tween;
import mx.transitions.easing;
alphaButton.onRelease=function(){
new Tween(redRectangle, “_alpha”, Elastic.easeOut, 100, 40, 1, true);
}
ifButton.onRelease=function(){
if(redRectangle._alpha == 40){
loadMovie(“1.swf”, 2);
} else {
loadMovie(“2.swf”, 2);
}
}
stop();