-
When codign actionscripts, I sometimes need a pause before continuing with the script, like a waitstatement or something. But i'm not able to find any?! Is there any support in Flash for a waitstatement? Using FOR loops dosn't do the work, the pause then depends on the speed of the machine, and that isn't relieble.
-- Mike
-
You can use 'setInterval' and 'clearInterval'
-
Jupp, that i know. I have tested that also, it works, but it's a bit messy. Must be a better way? Or not!? :(
-- Mike
-
-
Humm.. no i havn'y!? How do i use that one as a wait statement?
-- Mike
-
Btw! u know the difference between "function F() {...}" and "[_global.]F = function() {...}"? Havn't that figured yet :(
Also i'm creating a signuppage in Flash, like where u enter your name, adress, id and pw etc. And i wanna have some variables to put it in. First i used arrays, like user[0]='name', user[1]='adress', user[2]='id' and so on. But the problem is to remeber what array containing what :)
I tryes to use something like: user.name='name', user.adress='adress', user.id='id'. But i'm not sure how to do this, so it's workeble. I will try to add a function to the 'user' later on also. Like user.addUser or something.
-- Mike
-
I used this script to control movement of the timeline.
It's a timer countdown thingie.
startTime = getTimer();
this.onEnterFrame = function(){
currentTime = getTimer();
elapsedTime = Math.floor((currentTime - startTime) / 1000);
timeRemain = 30 - elapsedTime;
if (timeRemain == 25) {
gotoAndStop(2);
}
if (timeRemain == 15) {
gotoAndStop(3);
}
if (timeRemain == 5) {
gotoAndStop(4);
}
if (timeRemain == -1) {
nextFrame();
}
}
It might work for you
-
Humm.. it would probebly work, if i had any use for it :) But it's not the timeline i want to paus, but the actionscript itself. Like in BASIC u use WAIT [SEK]. U know what i meen?
10 PRINT "Hello world.."
20 WAIT 10
30 PRINT "Waited for 10 sek"
Somethink like this (it's VERY basic, i know *lol*).
U finding a sulutions to my other problem also?
-- Mike
-
My bad, I thought you wanted to pause the movie.
-
Hehe.. naaa, that i already know how to do :)
-- Mike