Currently I have the first set of AS below that closes a window by clicking on a button. I would like to close the window automatically after 5 seconds have elapsed from the time the window is opened, the Last set of AS that is below is used to open the window. The middle set of AS is from a tutorial. I am needing help putting this all together.
What i would like to happen is when the window is opened
contact_btn.onPress = function(){
contactLoader.load(“contact.swf”);
}
after 5 seconds the window closes using the tween close from the middle section below
Thanks So Much for Helping in Advance
close_btn.onPress = function(){
new mx.transitions.Tween(_root.firstLoader.content.contactLoader.content, “_alpha”, mx.transitions.easing.Regular.easeOut, _root.firstLoader.content.contactLoader.content._alpha, 0, 20);
var interval:Number = 5;
function someCodeToRun() {
clearInterval(mySetInterval);
trace(interval+" seconds have elapsed");
}
mySetInterval = setInterval(this, “someCodeToRun”, interval*1000);
contact_btn.onPress = function(){
contactLoader.load(“contact.swf”);
}