use boolean with visible, as3
        Posted  
        
            by VideoDnd
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by VideoDnd
        
        
        
        Published on 2010-04-30T18:26:08Z
        Indexed on 
            2010/04/30
            18:27 UTC
        
        
        Read the original article
        Hit count: 304
        
flash
|actionscript-3
Is there a better way to do use a use a boolean with visible? This animation blinks 30 times and stops. It works without error, but takes a moment to load. I would like to learn other ways of using visibility with conditionals.
var timz:Timer = new Timer(100,30);
timz.addEventListener(TimerEvent.TIMER, doIt);
var condition:Number = 5;
function doIt(event:TimerEvent):void{
trace("fire!");
if(condition=5){
box.visible = !box.visible;
}
}
timz.start();
        © Stack Overflow or respective owner