Ok, my bad. This won't be easy for you. That's an AS3 code and you need to know just a little Flash. Attached is a count-up timer with mins and secs. You can simply insert the .swf file for a visual on any slide. If you want SL to do something when a certain amount of time has elapsed, that will require further coding.
13 Replies
See if this helps.
Thanks for this Seth. It certainly confirms it can be done. Only problem i have now is that some slides go up 120 seconds!
I'll give it a go:-)
If that's the case you'd better use JS or AS. The attached timer.fla is very easy to customize to suit your needs. Let me know if you need help.
That's great. How would i get the timer to count up rather than down, ideally without a limit?
So you want something like a stopwatch. Take a look at this.
That's it.
Do i just paste this code into a JS trigger?
//1.
myText_txt.text = "0";
var myTimer:Timer=new Timer(1000,0);
myTimer.addEventListener(TimerEvent.TIMER, stopWatch);
//2.
function stopWatch(event:TimerEvent):void {
myText_txt.text=String(myTimer.currentCount);
}
//3.
start_btn.addEventListener(MouseEvent.CLICK, startClock);
stop_btn.addEventListener(MouseEvent.CLICK, stopClock);
reset_btn.addEventListener(MouseEvent.CLICK, resetClock);
//4.
function startClock(event:MouseEvent):void {
myTimer.start();
}
//5.
function stopClock(event:MouseEvent):void {
myTimer.stop();
}
//6.
function resetClock(event:MouseEvent):void {
myTimer.reset();
myText_txt.text="0";
}
Ok, my bad. This won't be easy for you. That's an AS3 code and you need to know just a little Flash. Attached is a count-up timer with mins and secs. You can simply insert the .swf file for a visual on any slide. If you want SL to do something when a certain amount of time has elapsed, that will require further coding.
I'm pretty clueless regarding Flash/AS. All i'm after is to get it to count up, I'm not looking to trigger any actions for it.
How do I add the file to the slide?
Insert>Flash and point to the .swf.
Thanks for all your help Seth. That's exactly what I wanted. Thanks again, it's greatly appreciated.
Glad that Seth was able to assist you here Howie. Thanks for popping back in with an update :)
Hi Seth - is it possible for the most recent timer you attached to pause automatically when
Thanks
This post was removed by the author
Mark,
That would require interacting with the SDK which is not my cup of tea at the moment.
This discussion is closed. You can start a new discussion or contact Articulate Support.