|
-
[RESOLVED] AS2 pathing...
I have found some code that uses _root.
//_root.createTextField("timer", _root.getNextHighestDepth(), 5, 0, 100, 25);
_root.myMinutes = 10; //set to number of starting minutes
_root.mySeconds = 0; //set to number of starting seconds
_root.myMilliseconds = 0 //set to number of starting milliseconds
_root.timer.text = "000:00:" + twoDigitString(myMinutes) + ":" + twoDigitString(mySeconds) + ":" + myMilliseconds;
function updateTimer() {
if(_root.myMilliseconds == 0) {
if(_root.mySeconds == 0) {
if(_root.myMinutes == 0) {
_root.timer.text = "Please continue!";
clearInterval(myInterval);
delete myInterval;
}
else {
_root.myMinutes = _root.myMinutes - 1;
_root.mySeconds = 59;
_root.timer.text = "000:00:" + twoDigitString(myMinutes) + ":" + twoDigitString(mySeconds) + ":" + myMilliseconds;
}
}
else {
_root.mySeconds = _root.mySeconds - 1;
_root.myMilliseconds = 400;
_root.timer.text = "000:00:" + twoDigitString(myMinutes) + ":" + twoDigitString(mySeconds) + ":" + myMilliseconds;
}
}
else {
_root.myMilliseconds = _root.myMilliseconds - 1;
_root.timer.text = "000:00:" + twoDigitString(myMinutes) + ":" + twoDigitString(mySeconds) + ":" + myMilliseconds;
}
}
// This function will make sure we have two number places in our number if it's less then 9(0#)
function twoDigitString(myNumber) {
myTemp = String(myNumber);
if(myTemp.length == 1) {
myTemp = "0" + myTemp;
}
return myTemp;
}
myInterval = setInterval(updateTimer, 1);
stop();
but I am using the swf in a container so the _root. breaks this Im sure...
I have tried changing all the _root. to this. with no luck it doesnt work at all?!?!?!
Please help
Red
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|