clearTimeout Method!

Hello guys!,

I’m not sure why its not clearing, I guess its a scopeing issue can you guys please help me. I’m getting frustrated.
thanks

abe

panel_mc.inv_btn.onRelease = runScript;

var my_timedProcess:Number = setTimeout(closePanel, 4500, “Image3”);

function runScript():Void
{
animateDefaultImage();
this.enabled = false;
clearTimeout(my_timedProcess);
};

function closePanel(imageSelected:String):Void
{
if (imageSelected == String(“Image3”))
{
TweenMax.to(panel_mc,duration2,{_y:387.9, ease:Strong.easeInOut, delay:duration});
TweenMax.to(left_plane_mc,duration2,{_alpha:0.0, ease:Strong.easeInOut, delay:2.45});
TweenMax.to(right_pane_mc,duration2,{_alpha:0.0, ease:Strong.easeInOut, delay:2.65});
TweenMax.to(divider_mc,duration2,{_alpha:0.0, ease:Strong.easeInOut, delay:2.85});
TweenMax.to(bkg1_mc,duration2,{_alpha:0.0, ease:Strong.easeInOut, delay:2.95});
TweenMax.to(landing_page_mc,duration2,{_alpha:100.0, ease:Strong.easeInOut, delay:3.25});
landing_page_mc.aprende_mas_mc.enabled = true;
}
else
{
TweenMax.to(panel_mc.header_txt_mc,duration2,{_alpha:100, delay:duration, ease:Strong.easeIn});
TweenMax.to(panel_mc,duration2,{_y:340.9, ease:Back.easeInOut, delay:duration, onComplete:activateButton});
}
}

are you sure this will work : setTimeout(closePanel, 4500, “Image3”); ?

setTimeout(this, “closePanel”, 4500, Image3);

setTimeout : is this function documented in flash ? because i cant find it… and never used it either ?

It’s not documented but it’s there.

Also, it’s not as if it is some feature that we weren’t supposed to know about:

I like making up my own commands :look: