The 'pause' effect

i have a button that launches a url in a new browser window

what i’d like to do is - on button press - first load an mc with a quick intro… and in a few seconds launch the new browser window

the way i would do it is something like this:

=====
on(press){

// load mc

//run ‘dummy’ loop to waste time
for (1; 1000; ) {
// do nothing
}

//getURL

BUT i’m thinking that the loop is going to run differently on machines of different specs… so there may be visitors waiting an age for the new browser to launch

is there a way to specify a pause for x amount of ‘real’ seconds?

hi
look at >> setInterval():slight_smile:
exemple :

function timesUp() {
	trace("Time's up!");
	clearInterval(timerInterval);
}
btn.onRelease = function() {
	timerInterval = setInterval(timesUp, 1000);
};

that works fine!

thanks!
:slight_smile:

You could also use getTimer or this:[AS]intro_mc.onEnterFrame = function() {
this._currentframe == this._totalframes ? (getURL(“http://www.kirupaforum.com”, “_blank”), delete this.onEnterFrame) : null;
};
my_button.onPress = function() {
intro_mc.play();
};[/AS]