Hi,
Targeting scene names is a bad habit in flash. Actually, I dont use scenes...
http://ntdesigns.net/v-web/bulletin/...wtopic.php?t=8
It is much better to use frame labels and target those instead. Place a frame label on the frame that you want to send the flash playhead to and use that frame label in the button code....
Code:
on (release) {
_root.gotoAndPlay('frameLabel');
}
As for the countdown timer, there are multiple ways to do this. One method is using a movieclip timeline as a counter. You can use the frames per second that plays a flash movie as a counter. For example, a movieclip with 48 frames, each with a count variable on frames 12,24,36, and 48, would give you the ability to count from 1 to 4 seconds. On each of those frames, something like....
frame 12
_root.myCount = 1;
frame 24
_root.myCount = 2;
frame 36
_root.myCount = 3;
frame 48
_root.myCount = 4;
Then on the main timeline, a textfield with an instance name 'counter'. On the first frame of the movie..
_root.textFieldName.text = myCount.
Another method could be with actionscript. Two command options,..... setInterval and getTimer............ setInterval is prob more adapt at creating events on an interval basis, so lets look at getTimer......
If we created a variable, say..... countTotal = 100; We could use getTimer to countdown from that variable.....
Code:
countTotal = 100;
_root.onEnterFrame=function() {
//getTimer returns milliseconds so we divide by 1000
now = getTimer()/1000;
_root.textFieldName.text = countTotal - now;
}
All untested code off the top of my head. If it doesn't work for you, post a demo file.
Hope it helps
NTD
A mind once stretched by a new idea never regains its original dimensions.
- Oliver Wendell Holmes
Bookmarks