Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Countdown



Hi, I want to make a countdown flash movie. I don't really know how to do this.

This is an example: http://www.starwooddata.com/counter/

Can anyone help me?


Greg



FlashKit > Flash Help > Flash General Help
Posted on: 08-01-2003, 05:31 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

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);
}
}

10 9 8 7 6 5 4 3 2 1... Countdown
Somebody knows how to create a countdown...

I want an action running 10s after another action.
What could I do?

Thanks

Countdown
how can i make a countdown in a text box where i can specify the amount of seconds to count down from and i would be able to gotoAndStop if the counter >= 0

cheers
./m

Countdown
how can i make a countdown in a text box where i can specify the amount of seconds to count down from and i would be able to gotoAndStop if the counter >= 0

cheers
./m

Countdown
ive got this code to countdown to midnight


myDate = new Date();
seconds = myDate.getSeconds();
minutes = myDate.getMinutes();
hours = myDate.getHours();
seconds2 = 59-seconds;
minutes2 = 59-minutes;
hours2 = 23-hours;
if (length(minutes2) == 1) { minutes2 = "0" + minutes2; }if (length(seconds2) == 1) { seconds2 = "0" + seconds2;}timetil12 = (hours2+":"+minutes2+":"+seconds2+" left until 12AM");


but i was wondering what i would modify to get it to countdown to a certain date, in my case, november 13th, for the lauch of a video game.

CountDown
i want to make a countdown but i don't know how to make it!!
can someone please help me !!

ThanX

Countdown
Hi all
How do I make a counter that counts down?
for e.g user has ten minutes time to solve the problem
display time as 10*60=600...count from here till zero??
and if it reaches zero go to frame end??
please help
reverse

Countdown
I need a count down script that I can set the day and time of the count down event. For example a count down that would register all zeros at 3:00pm Feb 28th

HELP With Countdown
I need a count down movie that counts down the months, days, hours, minutes and seconds This movie needs to count down to all zeros at 3:00pm March 1st. At this point it will go to a specified frame in the movie.

Countdown From 20 (help)
I have a really lame question, for you Actionscript people. Has your about to figure out, I know next to nothing about Actionscripting. So, i was wondering if anybody could tell me how to have a dyn.-text box to count from 20 to zero.
Thanks a million in advance


E M O B O Y

Countdown From 01:10:000 To 0:0:0
I am looking for a simple actionscript countdown. It displays the remaining time in minutes, seconds and milliseconds, ie countdown from 1:10:000
I also need a function to check, whether the time reaches 0:00:0000

how to do that?

thanks

CountDown
Hello,

Can some please point me to a could Count Down clock .fla??

Thanks

Countdown Example
Hi Folks,

Here a maybe useful countdown example:

http://www.flashangel.de/fla/fscountdv2.swf

FLA here:
http://www.flashstar.de/tutlist/

Be inspired.

yours
Matze K.

Countdown
how do I make a days countdown?
I tried with getdate and gettime but it's hard to manage...
some suggestion?

Countdown Help
I've got World War 1 web site and i want a count down till the 11th November 2002.
How do i do this???

Many Thanks

Help With A Countdown
I want to have a countdown in days hours minutes and seconds to the date on june 28 2002

I am an intermediate to beginner in actionscript so please take me step by step Thanks a bunch...

Countdown
I am trying to make a countdown to may 11 6:13
i have this code here but can't seem to decipher it, please help!

code:--------------------------------------------------------------------------------now = new Date();
euro = new Date (2002, 01, 01, 23, 59, 59);
days = (euro-now)/1000/60/60/24;
daysRound = Math.floor(days);
hours = (euro-now)/1000/60/60-(24*daysRound);
hoursRound = Math.floor(hours);
minutes = (euro-now)/1000/60-(24*60*daysRound)-(60*hoursRound);
minutesRound = Math.floor(minutes);
seconds = (euro-now)/1000-(24*60*60*daysRound)-(60*60*hoursRound)-(60*minutesRound);
secondsRound = Math.round(seconds);
if (secondsRound == 1) {
sec = " second ";
} else {
sec = " seconds ";
}
if (minutesRound == 1) {
min = " minute ";
} else {
min = " minutes ";
}
if (hoursRound == 1) {
hr = " hour ";
} else {
hr = " hours ";
}
if (daysRound == 1) {
dy = " day ";
} else {
dy = " days ";
}
timeRemaining = daysRound+dy+hoursRound+hr+minutesRound+min+second sRound+sec;

Countdown
How do you make a countdown to a specific date? the tutorial on flashkit doesn't specify

Countdown
Hi everybody,

Have a question for you.

I would like to make a countdown till December 31st. (with the amount of days, hours, minutes and seconds to go.., hours, minutes and seconds without the amount of days will do as well.)

I wasn't able to find much about this subject. The only thing I did find was something using a PHP file. The PHP file would look something like this:
----------------------------------
<?
$shckzeit = time();
$shckdat = getdate($shckzeit);
$shckjahr =$shckdat[year];
$shckyday =$shckdat[yday];

$shckstun =$shckdat[hours];
$shckmin =$shckdat[minutes];
$shcksek =$shckdat[seconds];

print "&shckjahr=$shckjahr&";
print "&shckyday=$shckyday&";
print "&shckstun=$shckstun&";
print "&shckmin=$shckmin&";
print "&shcksek=$shcksek&";
?>
----------------------------------

My question now would be:
Is there any way of doing this without this PHP file? Can't I just get the date and time from the users system?

Or does anyone know an 'easy way' of doing something like this, 'cause I'm far from being brilliant at ActionScripting.

Thanx!

Eva

Countdown
Hi everybody,

Have a question for you.

I would like to make a countdown till December 31st. (with the amount of days, hours, minutes and seconds to go.., hours, minutes and seconds without the amount of days will do as well.)

I wasn't able to find much about this subject. The only thing I did find was something using a PHP file. The PHP file would look something like this:
----------------------------------
<?
$shckzeit = time();
$shckdat = getdate($shckzeit);
$shckjahr =$shckdat[year];
$shckyday =$shckdat[yday];

$shckstun =$shckdat[hours];
$shckmin =$shckdat[minutes];
$shcksek =$shckdat[seconds];

print "&shckjahr=$shckjahr&";
print "&shckyday=$shckyday&";
print "&shckstun=$shckstun&";
print "&shckmin=$shckmin&";
print "&shcksek=$shcksek&";
?>
----------------------------------

My question now would be:
Is there any way of doing this without this PHP file? Can't I just get the date and time from the users system?

Or does anyone know an 'easy way' of doing something like this, 'cause I'm far from being brilliant at ActionScripting.

Thanx!

Eva

Countdown
Can anybody tell me how to make a timer which counts down in a dynamic textbox?

(I'm using flash5)

And does anybody know where i can find a digital font like on a digital watch?

thank you!

Countdown
I've made a simple count down and I'd like to make the counter show two figures even when it has to show a one-figure number (not 9 but 09)
how?

Countdown
How would you show in a textbox the time left between the current date and time and the date and time of a due date?
I would also like to make a color box to show urgency.
For example: if there is 30 minutes left till the due date, the colorbox would be red.
Any ideas out there?
Thanks so much,
Jo

Countdown
Hi, I want to make a countdown flash movie. I don't really know how to do this.

This is an example: http://www.starwooddata.com/counter/

Can anyone help me?


Greg

Countdown?
Heya, anyone know the script or something or a way of making a countdown timer?? If you do, or even better, if you have the .fla file with the actions script in it :-) could you email me? nic@nicoliver.co.uk
Thanks
Nic

Countdown
Heya, anyone know the script or something or a way of making a countdown timer?? If you do, or even better, if you have the .fla file with the actions script in it :-) could you email me? nic@nicoliver.co.uk
Thanks
Nic

Countdown
Anyone got a simple and effective little bit of coding that will countdown from a number of seconds to 0, and when reached, will go to a different scene/frame.....
any help appreciated,
cheers

Countdown
Any one know how to the a countdown like the one for panther on www.apple.com

Ive got a count but its only run through a text box. would like it to use images like the noe in apple.com.

thanks.

Help, Countdown
Hi,

Total Noob question for you.

Can someone tell me how to make a countdown to a certain date in milliseconds, only.

Thanks

Baz

Countdown
Hello,

some one there please help me to create a countdown in flash.

what i actually want is,

the display should be like - 9 days, 7 hours, 55 : 21 minutes

irrespective of the year,this should countdown from 4th of July, .ie., even if it is 2004 or 2005 or whatever year it maybe it should display exactly how many days,hours, minutes and seconds left for 4th of July.

i think you got my point.

your help will be a great relief.

thanks and regards,
jeev

Countdown
How would I make a countdown? like a countdown from 30 and it would show u every number (30, 29, 28, 27, ect) in seconds of course.

CountDown
hello . its been a while since i have been here ,but i am looking for some help -
i would like to make a clock that counts down in time ..
days
hours
minutes
seconds -
an onEnterFrame=function(){ is preferred ..


Code:
//i have something like this
rd = new Date(2004, 11, 16, 12, 11, 20);
onEnterFrame = function () {
today = new Date();
rd.valueOf(-today);
days = rd.getDay();
hours = rd.getDay();
minutes = rd.getDay();
seconds = rd.getDay();
};
thanks for the help .

Countdown
HI,

I am using Flash version MX and ...

I have a dynamic textbox ('timer') and I want it to countdown from 120 (1 a second). I want it to start on the frame with the textbox on but it the code I have starts as soon as the Movie starts.

I have these actions on a movieclip:

code: _root.timer = int(120-(getTimer()-_root.starttime)/1000);

How do I get it to start on the frame I am on.

thanx,

Countdown
Im working a countdown dont know if its the right way to do it, but cant add days to the countdown:

Any ideas ?

myDate = new Date();
seconds = myDate.getSeconds();
minutes = myDate.getMinutes();
hours = myDate.getHours();
seconds2 = 59-seconds;minutes2 = 59-minutes;hours2 = 23-hours;if (length(minutes2) == 1) { minutes2 = "0" + minutes2; }
if (length(seconds2) == 1) { seconds2 = "0" + seconds2;}
timetil12 = (hours2+":"+minutes2+":"+seconds2+" countdown to opening");

Countdown?
I wanted to make a countdown for my site, but the tutorial that came up in the search option for the flashkitsite was a bit confusing... and it seemed to only have a 24 hour limit. Is there a way to countdown using the real time to count down for about 2 months? ie. July 28?
thanks

Countdown
I'm using Macromedia Flash MX 2004 PRO edition and I'm creating some flash videos (Movie clip symbol) and I need a countdown on my videos. Do you guys have a link to a tutorial or something to do this?

Thanks.

Countdown?
Hi.

Iam still working on my homesite but I allways find stuff I like to add the site.

So how do I make a countdown timer for days, hours, minuts, sec...???

Is there someone who have a script I can get?


Please help!


//Molotov

CountDown
I have done a count down script like what I show below. I put it on the 1st frane on the stage. If I want to set that when count become 0, and then recount 100 again. Do anyone know how to do that?

count=100;
setup=setInterval(pup, 10);
function pup(){
count--;
if (count <0){
//_root.gotoAndPlay("gameOver");
trace("Next user")
clearInterval(setup)
_root.notYourMove;
//game over
}
}

Countdown Help?
Hi. I'm kind of new to Flash and have been fooling around with it some and reading up some tutorials but I can't find anything about making a countdown with a sort of background (similar to the one on this site- http://www.mugglenet.com/). I know it's probably really easy and I'm just really ignorant when it comes to the matter, but nevertheless- I still need help. So if someone could make a countdown to January 9, 2008 using this background- http://i25.photobucket.com/albums/c8...ntdowncopy.jpg - that would be extremely helpful. (I need a Days, Hours, Minutes, and Seconds section in the center)

Or if someone could explain how to do it, that would be awesome. I'm a complete newbie at Flash and have no idea how to do almost anything. So if you have the kind of patience to deal with me.... Thanks.

[F8] After Countdown
Hi all,

I found a countdown tutorial which work very well.
Nothing happens when the countdown is reached and I'd like it to.
I obviously can't get my condition right when the countdown is reached.
Ideally I would like to get to the next frame, can someone help me?

stop();

this.onEnterFrame = function() {

var todayate = new Date();
var currentYear = today.getFullYear();
var currentTime = today.getTime();

var targetDate: Date = new Date(currentYear,06,12);
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 = string(hrs % 24);
if (hrs.length < 2){
hrs = "0" + hrs;
}
days = string(days);

var counter:String = days + " d " + hrs + " h " + min + " m " + sec + " s " ;
time_txt.text = counter;

if (targetTime = currentTime) {
gotoAndPlay(2);
}

}


That last condition brings me straight to the the next frame!?

Cheers

Countdown
Hello,

I have a question about making a countdown timer. Now I've seen some examples here already how to make a countdown timer (and afterwards go to a new movie) but I would like something extra in it.

First of all I want a new movie to load after the ending point has been reached but I also want a designated flash movie to only play at a certain time and after that never again. For example I want the movie to play tommorow at 3:00 pm and after that it should never play. This movie will end at 3:05 pm and afterwards it will go to a new movie. But if someone joins in later (somewhere at 3:02) the movie should start at a frame that corresponds with the time it takes to get to 3:02 (2 minutes).

What I want is something like live streaming but not 'really' live streaming.

Unfortunately I'm not a genious with Actionscript yet and this is rather complex for me but I bet some of you guys and girls are so if you could give me some tips and trics, please?

Countdown To The Second
Hey there ive got this code to countdown to a certain date but i was wondering if someone could help me get it to countdown to the exact time an event starts... in this case I want it to countdown to 4:30pm ?

Thanks


Code:
Date.prototype.countdown = function(obj, _onStatus, _onFinish) {
var ms = 24 * 60 * 60 * 1000;
var timer = setInterval(function(o) {
var _current = new Date();
var _days = Math.floor((o.getTime()-_current.getTime())/ms);
var _hours = Math.abs(_current.getHours()-23);
var _minutes = Math.abs(_current.getMinutes()-59);
var _seconds = Math.abs(_current.getSeconds()-60);
_onStatus.call(obj, _days, _hours, _minutes, _seconds);
if(_days < 0) { _onFinish.call(obj); clearInterval(timer); };
}, 1000, this);
};
ASSetPropFlag(Date.prototype, "countdown", 1);

var eventdate = new Date(2006,6,3); // year, month(-1), day

var myOnStatus = function(days, hours, minutes, seconds) {

if (days < 10)
{
daysText = "0" + days;
}
else
{
daysText = days;
} // end if

if (hours < 10)
{
hoursText = "0" + hours;
}
else
{
hoursText = hours;
} // end if

if (minutes < 10)
{
minutesText = "0" + minutes;
}
else
{
minutesText = minutes;
} // end if

if (seconds < 10)
{
secondsText = "0" + seconds;
}
else
{
secondsText = seconds;
} // end if

};



var myOnFinish = function() {

daysText = "00";
hoursText = "00";
minutesText = "00";
secondsText = "00";

};



// the 1st parameter indicates

// the object to which the callbacks will be applied

eventdate.countdown(this, myOnStatus, myOnFinish);

95 Day Countdown
can someone point me in the right direction to found a tutorial to create a 96 day countdown starting today? I am not concerned about hours, minutes or seconds, just a day by day countdown. Thanks in advance...

Countdown
I am making a five minute countdown. I have my countdown text in a box (5:00) and the box background is carries through all of the frames. Is there a code that will automatically generate the text to countdown 5:00 to 0:00?

If there is, could you provide a brief explanation of how to implement it? I'm a newbie :) Thanks!

Countdown
Hi everyone. I suck at scripting and I need some help. If anyone have the time to find or create a countdown script which counts down in days, hours and seconds (and milliseconds if you'd like) towards the 8th of december this year, I would be as happy as can be. I'm sorry for being such a complete n00b, but that's how it is...

Thanks in advance for any help.

Countdown Help
I am trying to create a flash countdown timer.

Flash does not seem to find any errors in my script, but when i compile it and test it, instaid of a coundown display in digits i.e. 00:00:00:00
days hours minutes seconds

its just displaying
NaN:NaN:NaN:NaN

Countdown Help - Further
Ok, i want my code to countdown to a specific time within my date.

What do i have to add to enable it to do this?

Thanks








Attach Code

this.onEnterFrame = function() {

var today:Date = new Date();
var currentYear = today.getFullYear();
var currentTime = today.getTime();

var targetDate:Date = new Date(2007,5,8);
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 = string(hrs % 24);
if (hrs.length < 2) {
hrs = "0" + hrs;
}
days = string(days);

var counter:String = days + ":" + hrs + ":" + min + ":" + sec;
time_txt.text = counter;
}

























Edited: 05/29/2007 at 01:00:44 PM by Reece Neumann

Countdown QU
I am making a five minute countdown. I have my countdown text in a box (5:00) and the box background is carries through all of the frames. Is there a code that will automatically generate the text to countdown 5:00 to 0:00?

If there is, could you provide a brief explanation of how to implement it? I'm a newbie :) Thanks!

Countdown
Hey...

I'm doing this game were I need sort of a countdown from 60 sek to 0 sek. And when the countdown hits 0 sek I need it to:

_root.gotoAndPlay("endofgame");

I can't figure how to do the "countdown movieclip"

HELP ANYBODY?

*Rob

Copyright © 2005-08 www.BigResource.com, All rights reserved