Flash, ASP, Server Countdown Timer
Hi i have read the article you have on the countdown timer and all is wrking well but i am wanting it to be on a asp server not php as the file download is.
i am struggling to change the PHP to asp and stll work, can anyone help.
CHeers SLuap
http://www.kirupa.com/developer/mx/countdown2.htm
KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 05-02-2007, 05:46 AM
View Complete Forum Thread with Replies
Sponsored Links:
Countdown Timer In Flash
Anyone know how to create a countdown timer using the Date Object and Flash MX?
For example, I'd like to set a target date/time and have flash calculate the time left until that date/time exists. I'm using Flash MX on Windows XP.
I'm also interested in displaying the current date & time on my Flash website.
Thank
-Foochuck
View Replies !
View Related
Flash Countdown Timer
Hello,
I am not new to Flash, but I am very new to this forum. I'm trying to locate/create a countdown digital timer (like to a certain event) to be used on a website. If you're a Madden Football fan you may remember last year easports.com had something like this on their website. Below is a link something like what I'm looking for (upper left corner).
http://soccernet.espn.go.com/section...rldcup&cc=5901
Could someone direct me to a downloadable actionscript or a service provider who may be able to help me get this done. Any advise would be appreciated.
Steven Gladney
View Replies !
View Related
Flash 8 Countdown Timer Help
Ok, I have been searching everywhere for this... Most of the scripts I found aren't what I am looking for while other scripts just don't work for me!
I am making a game, you see. One that is kind of like a quiz (Similar to The Impossible Quiz on www.addictinggames.com) If you have ever played the game, on some questions, you will notice timers, and that is just what I am looking for.
I need a countdown timer which displays the numbers as they count down. The timer needs to be 10 seconds long and when the timer reaches 0, it goes to a scene named "restart". I need the timer to not interfere with whats going on in the timeline because sometimes the questions require jumping from frame to frame.
Maybe if the countdown timer was a movieclip or something it would work...
I'm not sure, I am very new to actionscript and I need some help!
Also, if this helps, my fps is set to 20.
I hope I have provided you with enough information for you to help me.
Please reply!
View Replies !
View Related
Flash Countdown Timer
used a few tutorials i found online and tried to rework to make a CountDown class for a project. Can't figure out why it is wrong. For some reason the day counter is stuck at 48...
ActionScript Code:
package { import flash.display.Sprite; import flash.utils.Timer; import flash.events.TimerEvent; public class CountDown extends Sprite { private var now:Date; private var end:Date = new Date(2009,0,31); private var timer:Timer; private var timeLeft:uint; private var msTimer:Timer; public var display:Counter = new Counter(); private var s:String; private var m:String; private var h:String; private var d:String; public function CountDown() { init(); } private function init():void { timer = new Timer(1000); timer.addEventListener(TimerEvent.TIMER, updateTimer, false, 0, true); timer.start(); msTimer = new Timer(1); msTimer.addEventListener(TimerEvent.TIMER, updateMS, false, 0, true); msTimer.start(); addChild(display); display.gradient_mc.mask = display.field; display.msGradient_mc.mask = display.msField; } public function updateTimer(e:TimerEvent):void { timeLeft = end.getTime() - now.getTime(); var seconds:uint = Math.floor(timeLeft / 1000); var minutes:uint = Math.floor(seconds / 60); var hours:uint = Math.floor(minutes / 60); var days:uint = Math.floor(hours / 24); seconds %= 60; minutes %= 60; hours %= 24; s = seconds.toString(); if(s.length < 2) s = "0" + s; m = minutes.toString(); if(m.length < 2) m = "0" + m; h = hours.toString(); if(h.length < 2) h = "0" + h; d = days.toString(); if(d.length < 2) d = "0" + d; setTimeDisplay(); } public function updateMS(e:TimerEvent):void { now = new Date(); var ms:uint = Math.floor(now.getMilliseconds() / 10); var msS:String = ms.toString(); if(msS.length < 2) msS = "0" + msS; display.msField.text = msS; } public function setTimeDisplay() { display.field.text = d + ":" + h + ":" + m + ":" + s; } }}
View Replies !
View Related
How To Create A Countdown Timer Using Flash MX?
Hello to all Flash experts out there,
Can anyone please kindly tell me (in detail) how to create a simple countdown timer using Flash MX? Say for example when a page is loaded, the timer starts with a 1 minute (01:00) countdown, then a message will be shown when the timer reaches 0 (00:00).
Thank you very much for your help!
View Replies !
View Related
Flash Countdown Timer Script
I get this error when i run this script;
NaN:undefined:NaN:NaN
you can view the .swf here;
Code:
this.onEnterFrame = function() {
var today:Date = new Date();
var currentYear = today.getFullYear();
var currentTime = today.getTime();
var targetDate:Date = new Date(currentYear,2,17);
var targetTime = targetDate.getTime();
var timeleft = targetTime - currentTime;
var sec = Math.floor(timeLeft/1000);
var min = Math.floor(sec/60);
var hrs = Math.floor(min/60);
var days = Math.floor(hrs/24);
sec = string(sec % 60);
if (sec.length < 2) {
sec = "0" + sec;
}
min = string(min % 60);
if (min.length < 2) {
min = "0" + min;
}
hrs = strin(hrs % 24);
if (hrs.length < 2) {
hrs = "0" + hrs;
}
days = string(days);
var counter:String = days + ":" + hrs + ":" + min + ":" + sec;
time_txt.text = counter;
}
View Replies !
View Related
Countdown Poker Timer In Flash 5
Yeah, I'm behind with Flash 5. Haven't used it in a long time but I'm now waiting for CS3 so I can get all the upgrades...
I've been all over the web and found a few tutorials on making timers. Some I've gotten to work, other not so much luck. The problem is all the tutorials I've seen tend to be more in depth than I think I need. I'm trying to make a poker timer for the blinds that I can run on my laptop during tournaments.
I want to be able to launch my SWF onscreen and it should ask me an interval. Typically this will be 15 minutes but could change. When the start button is pressed that variable, I'll call it "TimerInterval", will be passed to the timer movie clip and the blinders movie clip should progress to show the current blinds. After 15 minutes is up it should stop. When the start button is pressed again the timer starts again and the movie progresses to the next blind level. I will also need the ability to pause the timer and skip or go back frames (blind levels).
So what I'll have is a movie with the timer movie clip in it and another movie clip with the blind amounts. Hitting the start button in the main movie starts the timer movie clip and advances the blinds movie clip to the next frame, which will just be a static block of text.
Hopefully, that all makes sense.
So, I think I've got a pretty good grasp on what I need to do with the controls but the timer is still a mystery to me. All I need is minutes:seconds and maybe milliseconds (just 'cause it looks cool) counting down from TimerInterval to 0. I would however like to keep the minutes, seconds, and milliseconds as separate entities so I can keep the numbers from jumping around due to number width (1 is thinner than 8 so the text jumps to the left).
So, like I said, all the tutorials I've found use the Date() function to countdown to another specific date and I don't know how that will work with my situation. I did see one that used a Timer() function but can't seem to locate that bookmark.
I do have some script I used for a different site for a slideshow type of thing where I had:
Frame 1
currently = getTimer();
end = currently + 3000;
Frame 2
currently = getTimer();
Frame 3
if (currently <= end) {
gotoAndPlay ("Timer2");
}
which I might be able to adapt but there is no visual display associated with this script.
Anyone got some ActionScript laying around that will work or an easy way to adapt the above script to output the time counting down backwards?
Thank you,
Mike
View Replies !
View Related
Flash Countdown Timer Needed Please
Hi all,
I am looking for a component/tutorial/movie that is a FLASH countdown timer/clock that you can change the targeted time on the fly using xml.
So, the clock might countdown for 4 days, 3 hours and 19 minutes to an event. but then halfway through i decide i want to change the event to a day later, so i need to us xml to dynamically change the clock to add 24 hours or whatever onto the clock without having to go back into the flash file.
Additionally, this flash file will be part of a flash screensaver that has xml driven photo gallery in the background. this photo gallery i can do, but i am looking for a flash countdown with xml access.
I am willing to pay/donate for it if there are no free ones available.
Thankyou for reading this and any help is appreciated.
Thanks
jimmy@antistandard.com
View Replies !
View Related
Flash Countdown Timer Needed Please
Hi all,
I am looking for a component/tutorial/movie that is a FLASH countdown timer/clock that you can change the targeted time on the fly using xml.
So, the clock might countdown for 4 days, 3 hours and 19 minutes to an event. but then halfway through i decide i want to change the event to a day later, so i need to us xml to dynamically change the clock to add 24 hours or whatever onto the clock without having to go back into the flash file.
Additionally, this flash file will be part of a flash screensaver that has xml driven photo gallery in the background. this photo gallery i can do, but i am looking for a flash countdown with xml access.
I am willing to pay/donate for it if there are no free ones available.
Thankyou for reading this and any help is appreciated.
Thanks
jimmy@antistandard.com
View Replies !
View Related
Flash Countdown Timer - Not Doomsday Style
I am trying to figure out a way to make a countdown time that cycles through x amount of numbers every x amount of seconds. For example, I want to be able to count from 1000 down to 1 in about 3 seconds, but I want it to cycle through the numbers as it goes down. Currently I just have it jump through different numbers in different keyframes but it is quite a bit of work, and I am looking for something more streamlined and smooth. All help is appreciated.
View Replies !
View Related
Flash Countdown Timer To Event In March
Hi!
IMPORTANT: I am an idiot. I can only understand things that obvious. Please go easy on me.
I have been playing around with the Countdown Clock described at http://www.kirupa.com/developer/mx/countdown.htm.
This tutorial sets up a clock that counts down to Christmas for the given year.
I wanted to set up a clock that would count down to an event that would take place March 4, 2005, starting at 8 pm Central time.
With the current clock, there is a line that reads:
eventDate = new Date(thisYear, 11, 25);When I change "11, 25" (December 25) to "2, 4" (March 4), the counter will already have reached the end, because it assumes I am talking about this year, when March 4 has already passed. What can I do to set this up for an event that takes place next year?
Next problem: how do I set this up to run to March 4, 2005, at 8 pm Central time? Right now, the file is set up to run to midnight, and to look at the user's computer date & time. Since I am shooting for 8 pm Central Time, then users in Eastern Time will get a different counter than Central Time users.
I have attached the FLA file in its current state. I am using MX 2004, in case it matters.
Thanks in advance for your time and patience with an idiot.
Best,
Mike
View Replies !
View Related
Flash Countdown Timer To Event In March
Hi!
IMPORTANT: I am an idiot. I can only understand things that obvious. Please go easy on me.
I have been playing around with the Countdown Clock described at http://www.kirupa.com/developer/mx/countdown.htm.
This tutorial sets up a clock that counts down to Christmas for the given year.
I wanted to set up a clock that would count down to an event that would take place March 4, 2005, starting at 8 pm Central time.
With the current clock, there is a line that reads:
eventDate = new Date(thisYear, 11, 25);When I change "11, 25" (December 25) to "2, 4" (March 4), the counter will already have reached the end, because it assumes I am talking about this year, when March 4 has already passed. What can I do to set this up for an event that takes place next year?
Next problem: how do I set this up to run to March 4, 2005, at 8 pm Central time? Right now, the file is set up to run to midnight, and to look at the user's computer date & time. Since I am shooting for 8 pm Central Time, then users in Eastern Time will get a different counter than Central Time users.
I have attached the FLA file in its current state. I am using MX 2004, in case it matters.
Thanks in advance for your time and patience with an idiot.
Best,
Mike
View Replies !
View Related
Flash Countdown Ticker Using Server Date
Hi,
I am making a countdown ticker that would get the current server date & time and then calculate the remaining time from a target date.
I am using a PHP file to output the current server date & time. Then I use the Flash's loadvars function to get the result and format it as a Date field. However, when I trace for remaining days using targetDate-serverDate, I get NaN as the result.
Any help will be greatly appreciated. Below is the code for my flash script as well as the php script.
Flash Code:
Code:
onClipEvent (load) {
myVars = new LoadVars();
// call the load method to load my php page
myVars.load("http://localhost/getServerDate.php");
// once vars have been loaded:
myVars.onLoad = function(success) {
if (success) {
for (var prop in this) {
var nowDate:Date = myVars.serverDate;
}
} else {
trace(" Error loading variables ");
}
// trace (nowDate);
target_date = new Date(2008, 3, 29, 13, 20, 59);
days = Math.floor((target_date-nowDate)/1000/60/60/24);
trace (days);
};
}
PHP Code:
Code:
<?php
// Set default timezone
//date_default_timezone_set('Asia/Calcutta'); // for PHP5
putenv("TZ=Asia/Calcutta"); // for PHP 4
$now = date("Y, n, j, G, i, s");
print "&serverDate=$now&";
?>
Thanx in advance,
Sridhar
www.signature.co.in
View Replies !
View Related
Countdown (Not A Timer Countdown)
Ok, everything seems to be working but I do have a dilemma. Every time I run it, it will automatically starts counting down while the rest of the dynamic text won't be displayed until the button is released which is kinda silly to have it countdown when the rest of the information is not even being displayed yet.
My question is:
1) How do I go about not displaying the rng_txt.text = theTime right at start?
2) How do I make it reset (or restart) again when I press the mouse button? (right now when I press the button it changes to a different 'radar' and I would like the countDown to restart when this is done.
Thanks guys.
Code:
var intervalID:Number;
var theTime:Number;
var startingRange:Array = [120,110,100,90,80,70,60,50,40,30,25];
var duration:Number = Math.floor(Math.random() * startingRange.length);
intervalID = setInterval(_root.countDown,250);
this.enabled = false;
function onEnterFrame():Void
{
// Array with all the ESM names
var radarArray:Array = ["HighFix","Type 245","Slotback","Jay Bird","Eagle Eye","Primus 80","ORB 32","Agrion 15","Grifo 7"];
// Picks an ESM name from the radarArray
var randomRadar:Number = Math.floor(Math.random() * radarArray.length);
// Creates a random number between 0 and 60 for the bearing
var randomNum:Number = Math.floor(Math.random() * 60 + 1);
// Creates random numbers from 0 to 77 for the track numbers
var randomTrk:Number = Math.floor(Math.random() * 77);
// Function to activate the button.onRelease event to display the texts
again_btn.onRelease = function()
{
// inputs information to all the dynamic text on screen
radar_txt.text = radarArray[randomRadar];
esmTrk_txt.text = "34" + randomTrk;
trk_txt.text = "Suspect";
trkNum_txt.text = "34" + randomTrk - 5;
// if brg is less than 10 degrees then add 00s or 0s infront of it
if (randomNum < 10)
brg_txt.text = "00" + randomNum;
else
brg_txt.text = "0" + randomNum;
again_btn.enabled = false;
} // end of again_btn.onRelease
} // end of onEnterFrame event
function countDown():Void
{
//Sets the speed at which the range will count down
theTime = Math.round(startingRange[duration] - getTimer() / 750);
rng_txt.text = theTime;
if(theTime < 5)
{
_root.again_btn.enabled = true;
clearInterval(intervalID);
}
}
View Replies !
View Related
Countdown Timer
I have been struggling for some time to get something in Flash to Countdwon the days until a specific date...
I need it Flash.....I cant go down other avenues due to compatibilty with what we have already got and the browser / OS range of the users....
So, If i need something to count down the days say until July 4th .......days only .....not hours...etc
how do I go about it ???
Thanks in advance
View Replies !
View Related
Countdown Timer
i need a counter where i can just add a date, say
12 06 03
date month year
and the timer will count off from the time now, to the date with no. of days, hours, mintues up till seconds...
like 192 days, 13hrs, 29min, 14secs left... and so on...
View Replies !
View Related
Countdown Timer Anyone?
Hello!
I am creating a screensaver that needs to have a digital clock counting down to a certain date.
Is there an actionscript to do this, and does the computer have to be connected to the internet to do do it?
can anyone assist with this puzzler?!!!
Thanx in advance :O)
View Replies !
View Related
Countdown Timer HELP
Hello!
I am creating a screensaver that needs to have a digital clock counting down to a certain date.
Is there an actionscript to do this, and does the computer have to be connected to the internet to do do it?
can anyone assist with this puzzler?!!!
Thanx in advance :O)
View Replies !
View Related
A Countdown Timer
Hello,
I am kind of a novice at action scripting, but I need a countdown timer (from 12 hours) with dynamic text. Hour, Min and Seconds. example- 11:58:42
Does anybody know any easy way to do this with action scripting, and keep the file size small?
Thanks for all your help!
Erick
View Replies !
View Related
Countdown Timer?
He? i've been searching for the action script for this for years!! and no! i didn't found it...
This is what i need:
A Simple Countdown timer
With variable minutes, seconds and if possible, miliseconds
So, it counts down from my example: 10:50:00 to 0 and NOT with frames but with action scripts, i really dont know how to do this so, any help is helpful ;-)
And no, i couldn't find any usefull ones in the movie section of FK
View Replies !
View Related
Countdown Timer
Hi Guyz,
Well...I guess this is what I get for trying to be a smart a*s but I'd appreciate some help with this if anyone can spare the time.
I downloaded the countdown until date tutorial from flashkit (file attached below) and noticed that the timer uses the local time set by the client machine. I wanted to modify this so that instead it gets the day of the month from the server.
I've managed to do the server side stuff of it and have successfully got a variable which stores just the day of the month. How would i modify the code to use the value stored in this variable in place of the day provided locally?
The variable is called dayserv BTW.
Thanks in advance guys..now to find a post that I can help with for karmas sake .
Cheers,
SpaceyUK.
View Replies !
View Related
Countdown Timer
Hi Guyz,
Well...I guess this is what I get for trying to be a smart a*s but I'd appreciate some help with this if anyone can spare the time.
I downloaded the countdown until date tutorial from flashkit (file attached below) and noticed that the timer uses the local time set by the client machine. I wanted to modify this so that instead it gets the day of the month from the server.
I've managed to do the server side stuff of it and have successfully got a variable which stores just the day of the month. How would i modify the code to use the value stored in this variable in place of the day provided locally?
The variable is called dayserv BTW.
Thanks in advance guys..now to find a post that I can help with for karmas sake .
Cheers,
SpaceyUK.
View Replies !
View Related
Countdown Timer Help
Hi All,
I'm having some problems figuring out how to create a countdown timer that uses the getTimer() function and a total nimber of seconds.
So far, I have it counting down a total number of seconds but need to have various fields that break that down in to total hours, minutes, seconds and have it look like a clock but still count from my remaining total seconds. I've seen this done using getDate but this needs to work in multiple timezones so that won't work for me. Also, I need the hours to work independantly of the calendar. ie: I need the hours field to be able to display more than 24 hours.
I have uploaded the fla here:
http://www.triplerabbit.tv/countdown_secs_example.fla
and the swf:
http://www.triplerabbit.tv/countdown_secs_example.swf
Any help or advice would be greatly appreciated. Thanks in advance.
Matt
View Replies !
View Related
Help On Countdown Timer
I am currently making a shooting game, and i want to put a countdown timer in the game. For example, the timer would countdown from 60 seconds to 0, after it reach 0, the game would end and links to different frame or scene.
can anyone please help me to acheive this?
Thank you very much
View Replies !
View Related
Countdown Timer
hey guys. i want to do a COUNTDOWN timer to the lord of the rings coming out. i want it to be my screen saver. what i want, is a to have have it like this.
5 Days, 12:45:12:02
that's what i want it to say. i want it to go down to milliseconds. so here's my question. what would be the code for that? and how would i make it get the time from the windows clock? can you just give me the code for the entire thing, the telling it to how to count down AND how to get the time from the windows clock. thanks
View Replies !
View Related
Countdown Timer
I need a countdown timer that counts down to
29/11/04 at 14:00
I have seen some that do days and hours to specific day at midnight but does anybody have one that is adjustable to a specific time.
View Replies !
View Related
Countdown Timer
Hi,
I need a script that will create a countdown timer that will stop at zero after counting down a set amount of seconds. If anybody could provide this, or point me in the direction of somewhere that can, it would be a huge relief.
Thanks.
View Replies !
View Related
Countdown/Timer
Ok I want to make a countdown/timer type thing counting down in seconds, but I don't want to use getTimer() because it counts how long the flash has been running, and you can't reset it. I think you can use something like setInterval to minus 1 every second, but I don't understand its usage.
Thanks
Chris
View Replies !
View Related
Countdown Timer
ok i was wondering if any body can tell me how to make a countdown timer.
one that can be set at a specific time, like make it count down from like ten minutes or so, then when it gets to zero go to a different scene, oh and is it possible to have the timer keep the time it had when the scene changes?
well im just rambling but if any of this makes sense and you can help please reply
View Replies !
View Related
Countdown Timer
How do I make a timer? It's not a clock, so don't be confused. It's a timer. What I need to know is how I make something which starts with a set amount of time that I can decide, and then counts down from there. When the time reaches zero, I want it to move to another frame.
Can anyone lay down the ActionScript for me...and possibly provide a little instruction as to where to put it - how to set it up?
View Replies !
View Related
Timer (countdown)
Hi all,
I've made a simple timer (countdown) for a game. It's similar to a clock face accept it has only one hand. It rotates anticlockwise once and when the hand is nearing the end or zero number, it makes a ticking sound. The ticking sound is activated by selected rotational values....
eg:
if (this._rotation == 10 or this._rotation == 20 or this._rotation == 30 or this._rotation == 40 or this._rotation == 50 or this._rotation == 60 or this._rotation == 70 or this._rotation == 80 or this._rotation == 90 or this._rotation == 100) {...................
It works fine, but the way I've set this code up seems a bit lengthy. Is there a more efficient way of scripting this above if statement?
Here's the complete AS I placed on the rotating time hand
code: onClipEvent (enterFrame) {
if (this._rotation != 1) {
this._rotation += -1;
}
if (this._rotation == 10 or this._rotation == 20 or this._rotation == 30 or this._rotation == 40 or this._rotation == 50 or this._rotation == 60 or this._rotation == 70 or this._rotation == 80 or this._rotation == 90 or this._rotation == 100) {
_parent.tick1.start(0,1);
}
}
Cheers
View Replies !
View Related
Big Countdown Timer
Hi all,
Im designing a front page of a site and what i want is a countdown timer in flash. but i want it to count down to the 15 of Feb with days:hours:minutes:seconds
is there a php link with flash or is there a script that can be done purly in flash? i dont really want it to go off the computer clock otherwise it wont be correct for when the site will open.
a link to a tutt or a quick code paste would make me greatful
Thanks for the time ahead.
View Replies !
View Related
[F8] Countdown Timer
I've got a countdown timer set up in a variable displayed in a text field. It all works fine, except when the time gets below 1 it displays ".8" or something like that
Is it possible to get it to display "0.8" instead of just ".8"?
Sand Monkey
View Replies !
View Related
[F8] Countdown Timer
Hi, Im new here and new to flash too.
I'm creating a flash for a school quiz competition.
1) I want to know how to create a countdown timer with controller that can choose time for 30 secs, 20 secs and 10 secs.
I cant find elsewhere in the internet for this.
2) The quiz contain 4 rounds. I want to use loading external swf or xml for say each question on each round. How do you load multiple swf in one loader?
Your help is greatly appreciated, I have 3 days to complete this.
View Replies !
View Related
Countdown Timer Please Help
I have a two minute countdown timer. I am creating an elearning course where the users has to click the next button to advance to the next page. Well the button is disabled for two minutes so they don't just click through the pages.
My problem: Once you start clicking through the pages the timer starts to countdown faster ( it gets loaded to the new page when the next button is clicked). It is also supposed to stop but starts to count backwards. I think the problem is the onEnterFrame. Please help and it is much appreciated. Thank you. Here is the code:
Attach Code
stop();
total = 120;
this.onEnterFrame = function() {
minutes = Math.floor(total/60);
seconds = total%60;
if (seconds<=9 && minutes<=9) {
theText.text = "0"+minutes+":"+"0"+seconds;
} else if (seconds<=9) {
theText.text = minutes+":"+"0"+seconds;
} else if (minutes<=9) {
theText.text = "0"+minutes+":"+seconds;
} else {
theText.text = minutes+":"+seconds;
}
};
//Function for the countdown, can be changed to total++ if you want to
//count "into the future" or something. Well I dunno.
//clearInterval = When minutes and seconds is 00:00 it stops.
stop();
counter = function () {
total--;
if (minutes == 0 & seconds == 1) {
clearInterval(setIt);
}
};
//Then we start an interval with the counter function, 1000 is milliseconds á 1 sec.
setIt = setInterval(this, "counter", 1000);
stop();
View Replies !
View Related
Countdown Timer Help
Hello
I am totally new to Flash. I was preparing to install a countdown timer on my website and got one from this very site. The countdown timer has instructions as to how to set the timer for any future date to count down to. But I am unable to make use of the information as I don't know what-is-what and what-is- where in Flash. The instructions that came with the timer are below:
Code:
This countdown was created to work with any date specified. The date is altered in the first part of the code. When you open the .fla file, click on the movie clip, and open the action script panel. You will see this code at the top of the panel,
I would be highly obliged if somone help me reach the place where I could change to code and set my own dates. Thanx a best regards.
Max
View Replies !
View Related
CountDown Timer Help
Hi all,
I'm a couple weeks old with flash and actionscript. I'm trying to create a count down timer using some online tutorial. And now i'm stuck.
I want to create a play/pause button (one button for all). I have a working play button, but don't know how to do the pause. Would you guys please help me on this project? Please see the attached file.
I'm using Flash CS3.
Your help is greatly appreciated!!
D
View Replies !
View Related
Countdown Timer Help
I'm creating a flash countdown timer. It works a treat but it will not go to frame 2 when it counted down to zero.
This is the action script for the first frame:
Code:
stop();
this.onEnterFrame = function() {
var today:Date = new Date();
var currentYear = today.getFullYear();
var currentTime = today.getTime();
var targetDate:Date = new Date(2007,11,11,18,42);
var targetTime = targetDate.getTime();
var timeLeft = targetTime - currentTime;
if (timeLeft <= 0){
play();
return;
}
var sec = Math.floor(timeLeft/1000);
var min = Math.floor(sec/60);
var hrs = Math.floor(min/60);
var days = Math.floor(hrs/60);
sec = string(sec % 60);
if (sec.length < 2) {
sec = "0" + sec;
}
min = string(min % 60);
if (min.length < 2) {
min = "0" + min;
}
hrs = string(hrs % 24);
if (hrs.length < 2) {
hrs = "0" + hrs;
}
days = string(days);
var counter:String = days + ":" + hrs + ":" + min + ":" + sec;
time_txt.text = counter;
}
Any help in what I have done is very much apprreciated.
Many thanks
MarkJ
View Replies !
View Related
[CS3] Countdown Timer Help
Hi,
I have tried looking for tutorials on timers but am a bit confused. How would i create a 2 minute timer that counts down (minutes & seconds). The timer would begin on the startGame function?
Any help would be appreciated!
View Replies !
View Related
|