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




Timer Code



Hello all. I'm having a hard time getting something to work. I have a MC with 5 buttons. When I roll over any of the buttons, there is a MC above them that is a door that slides open to reveal some info for each button. Because the buttons are so close, I don't want the door to keep partially opening and closing every time the buttons are rolled over. I want it to close only when the buttons haven't been rolled over for, say, 5 seconds.

Jesse has a timer tutaorial for something similar, but I can't get it to apply to this scenario. Can someone help me out? Thanks in advance.



ActionScript.org Forums > Flash General Questions > Other Flash General Questions
Posted on: 04-21-2003, 04:01 AM


View Complete Forum Thread with Replies

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

Timer Code..?
How would i go about making a timer that played random keyframes or frames with label names or say any frame inbetween 1 and 30?

Code For Timer
I'm using Flash MX Professional 2004.

What I'm trying to do is use _currentframe to make a timer for my mp3 player on my website. I'm running it on 21 fps so that's why you'll see 21 in the code. How would I get the seconds to increase by one everytime the frames increase by 21? This is what I'm having trouble with.


Code:
this.onEnterFrame = function() {
timer = _root.loadtarget3._currentframe;
if (timer= timer+21) {
seconds = seconds+1;
if (seconds>59) {
seconds = 00;
minutes = minutes+1;
}
}
};
For some reason the frames count up and everything but the seconds and minutes dont' increase. I'm not sure I'm doing this right. Some one please help.

[CS3] Timer Code
Okay... I made a thread earlier on a Random Quote generator. That's working, but now I need to make a timer script for it! I've tried the Timeline method, but it keeps resulting in a frozen browser - not good for visitors. This is a timer that just needs to go off every five seconds or so and reload to show a new quote. What is the best way to do this in Actionscript 2?

Timer Code
Dear All,
I am new to actionscript.
I need to have a Button pressed for a minimum of 2 seconds before an action occurs and wondering if someone could help me with code to do this countdown.

start_btn.onPress=function(){
if ( interval > 2 seconds) {
gotoAndPlay(10); //play frame 10
}
}

Note : In this particular application I cannot use the onRelease event (which would have made it much easier) hence the time must be constantly checked to see if the user has pressed the button for 2 seconds.

Thanks in advance.

How Do I Code A Countdown Timer?
Can someone tell me how I can code a countdown timer?
I've got code from Flash's help for a stopwatch... but can't figure out how I can use this to make a count down timer.

Thanks.


OM

Timer Code Help Needed
Hello everyone,

I am trying to make a timer that will hold on the current frame for seconds (which works) but i'd like to be able to enter half seconds or decimal places as well. so 2.5 sec, not just 2 for example.

Can anyone help? thanks!


// working code so far
displayTime = 3;
countDown = function (message) {
displayTime--;
if (displayTime == 0) {
clearInterval(timer);
play();
}
};
timer = setInterval(countDown, 1000);

Little Stuck On This Timer Code
Hi there! I'm using this timer code for my project but im having a little problem understanding several of the lines. Can anyone explain to me what is happening for each of these lines in red? Thanks for any help!

t0 = getTimer();

this.onEnterFrame = function(){

var t1 = getTimer() - t0;
var s1 = Math.round(t1 / 1000);
var t2 = 60 - s1;
if (t2 <= 0)

delete this.onEnterFrame;
t2 = 0;

my_mc.swapDepths(666);
my_mc.removeMovieClip();


trace(t2);
};

How Do I Code A Countdown Timer?
Can someone tell me how I can code a countdown timer?
I've got code from Flash's help for a stopwatch... but can't figure out how I can use this to make a count down timer.

Thanks.


OM

Stuck On This Timer Code Please Help
Hi all!

I'm using this timer code for my project but im having a little problem understanding several of the lines. This code was attached to a frame on the main timeline, and a movie clip called my_mc placed on the stage. Can anyone explain in detail what is happening and why for each of the lines in red? Thanks for any help! Much appreciated.


t0 = getTimer();

this.onEnterFrame = function(){

var t1 = getTimer() - t0;
var s1 = Math.round(t1 / 1000);
var t2 = 60 - s1;
if (t2 <= 0)

delete this.onEnterFrame;
t2 = 0;

my_mc.swapDepths(666);
my_mc.removeMovieClip();


trace(t2);
};

How Do I Code A Countdown Timer?
Can someone tell me how I can code a countdown timer?
I've got code from Flash's help for a stopwatch... but can't figure out how I can use this to make a count down timer.

Thanks.


OM

Stuck On This Timer Code Please Help
Hi there! I know this is a general forum so sorry if im not suppose to post this..

I'm using this timer code for my project but im having a little problem understanding several of the lines. This code was attached to a frame on the main timeline, and a movie clip called my_mc placed on the stage. Can anyone explain to me in detail what is happening and why for each of the lines in red? Thanks for any help! Much appreciated.


t0 = getTimer();

this.onEnterFrame = function(){

var t1 = getTimer() - t0;
var s1 = Math.round(t1 / 1000);
var t2 = 60 - s1;
if (t2 <= 0)

delete this.onEnterFrame;
t2 = 0;

my_mc.swapDepths(666);
my_mc.removeMovieClip();


trace(t2);
};

Small Changes To Countdown Timer Code.
I want to thank Jesse Stratford for his/her Countdown timer actionscript, it help to solve my problem. This is just a small change to his/her code that made the timer display in seconds instade of milliseconds. This is by NO WAY MY CODES, I just made a small change and want to share it with others.

onClipEvent (load) {
wait = 5;
starTimer = true;
}
onClipEvent (enterFrame) {
if (starTimer) {
if (startTime == undefined) {
startTime = getTimer()/1000;
}
curTime = getTimer()/1000;
if ((curTime-startTime)>=wait) {
starTimer = false;
delete startTime;
// actions to do after time is up
trace ("bing!");
} else {
_root.timeRemaining = int(wait-(curTime-startTime));
}
}
}

The small change is at the last line, where you convert in into integer. So, now you will have seconds instade of milliseconds.

Quick Question About This Timer Code
does anyone know if this timer code eats up a lot of CPU? and is there any easier way to go about this?


Code:
_global.timeReset=function(){
start = getTimer();
limit=1;

};

_global.cTimer = function(){
elapsed=Math.round((getTimer()-start)/1000)
_root.timeRemain=left=limit-elapsed
_root.timeleft = left;
if(left<=0){
counter = 0;

}

};

setInterval(cTimer, 25);

I Need A Reset Button For This Timer Code
Here is the code from a timer tutorial

onClipEvent(load){
var startTime = getTimer();
var countAmount;
var elapsed = 0;
}

onClipEvent(enterFrame){
elapsed = getTimer() - startTime;
if (elapsed <= countAmount *1000){
counterOutput = countAmount - Math.floor( elapsed / 1000);

this.sec = int(counterOutput%91);
//this.min = int(counterOutput/60);

//if (min < 10 ){min = "0"+min;}
if (sec < 10 ){sec = "0"+sec;}
this.ready ="Timer";
counterOutput = this.min +this.sec;
}else{
this.sec ="00";
this.counterOutput ="00";
_root.gotoAndPlay("begin");
}
}

I need a reset button to restart this timer, currently it is a 90 second countdown. I need the button to refresh it to count down again.

Thanks

Urgent Please Just Need A Last Bit Of Modification For This Timer Code
Hi! I've got this 2 minute countdown timer code here which is workng perfectly at the moment. But I want to change it to a 4 minute timer and so I tried to change the totalTime=240. However the timer is now showing like this 00:000:00 instead of the original 00:00:00 format. I guess it's to do with the if statement "seconds>59 then -60 and minutes+1" and therefore I tried to change the numbers to like "seconds>239 then -180 and minutes+3" but it's still not displaying the correct format. So can anyone please tell me how to modify this to make that work??? It's kind of urgent actually.
Thanks very very much!

Here's the code:

Code:
totalTime = 120; //Start from 2 minute
startTime = getTimer();
function timer() {
timeLeft = (totalTime*1000)-(getTimer()-startTime);
minutes = Math.floor(0);
seconds = Math.floor(timeLeft/1000);
milliseconds = Math.floor((timeLeft-(seconds*1000))/10);
millisOut = milliseconds;
secondsOut = seconds;
minsOut = minutes;
if (seconds>59) {
secondsOut = seconds-60;
minsOut = minutes+1;
}
if (minsOut<10) {
minsOut = String("0"+minsOut);
}
if (millisOut<10) {
millisOut = String("0"+millisOut);
}
if (secondsOut<10) {
secondsOut = String("0"+secondsOut);
}
_level0.timerOut.text = minsOut+" : "+secondsOut+" : "+millisOut;
if (seconds<0) {
_level0.timerOut.text = ("Time's Up");
_root.gotoAndPlay(11);
clearInterval(timer1);
}
}
timer1 = setInterval(timer, 10);

Help With Timer Code For A Quiz Im Making
I really need this for my quiz that i am making.

What i need is a time that starts when you enter a frame on a scene. For Example...

Scene 3, Frame 1.

But then stops when i gets to like.... Scene 5 Frame 1.

Just for more information, This is my layout...

Scene 1 - Intro...
Scene 2 - Title Screen...
Scene 3 - The Whole Quiz Section - this is where i need the time to play from
the start to the very end of this frame. During this scene i do have bits that say stop(); so im not sure if this would stop the time...
Scene 4 - Just a scene dont need any detail.
Scene 5 - End 1
Scene 6 - End 2

If you would like to see the Demo version of my game, this is one that i have amde so you get about 6 questions. Then ill finish it and relese the full game, then please email me:

danieljamesfew@hotmail.co.uk


Thank You...

Elf

How To Modify This Countdown Timer Code?
Hi! I want to create a 2 minute timer in this format 00:00:00 (mins:secs:millis), here I've posted my version of the timer below (got from somewhere else). It does work at the moment, however the problem is that it is showing in this format 0:0:0 (no "0" at the front when number less than 10) rather than 00:00:00, and I've no idea how to change that to the format I want. So can anyone please tell me how to modify this? This is the last problem I've got in my little game I'm making at the moment. So I'm desperate! Any help from anyone would be very appreciated! Thanks!

Code:
totalTime = 120; //Start from 2 minute
startTime = getTimer();

function timer(){
timeLeft = (totalTime*1000)-(getTimer() - startTime);
minutes = Math.floor(0);
seconds = Math.floor(timeLeft/1000);
milliseconds = Math.floor((timeLeft-(seconds*1000))/10);

millisOut = milliseconds;
secondsOut = seconds;
minsOut = minutes;

if(seconds > 59){
secondsOut = seconds - 60;
minsOut = minutes + 1;
}

_level0.timerOut.text = minsOut + " : " + secondsOut + " : " + millisOut;

if (seconds < 0) {
_level0.timerOut.text = ("Time's Up");
_root.gotoAndPlay(11);
clearInterval(timer1);
}
}
timer1 = setInterval(timer, 10);
The 2 lines below are put in Frame11:

Code:
clearInterval (myTimer);
clearInterval (timer1);
There's a dynamic textbox (instance name-timerOut, var-timeleft) to display the timer and the "Time's Up" message (in the same textbox).

Problime White Timer Code
Can someone help me whit this

This is the code for a horizontal timer

function setupmoveclip(){
this.createEmptyMovieClip("timekeeper",1);
timekeeper.endtime=_parent._parent.time+_parent.delay;
timekeeper.pixpersec=1024/_parent.delay;
timekeeper.onEnterFrame=function(){
timeline._x=(_parent._parent.time-this.endtime)*this.pixpersec;
if(timeline._x>0)timeline._x=0;
if(this.endtime<_parent._parent.time){
this.onEnterFrame=null;
}
};
}

setupmoveclip();
stop();

Iwant to change thi to a circle see here below
http://www.allinone-design.nl/forum/timer.html

Actionscript Timer Code Causing Confusing
Hi everyone,

The code below works as I expect until the seconds fall below 0.

When outputing the value of seconds via trace command it shows it dropping below 0 and becoming a negative i.e. -1 -2 -3

However the if seconds <0 does not get triggered, im left confused.
Im sure ive missed something very obvious, can anyone help me out?

Thanks.



Code:
timerCount = time*60;

countDown = function() {
timerCount = timerCount - 1;
hours = int(timerCount / 3600);
minutes = int((timerCount / 60) - (hours * 60));
seconds = int((timerCount % 60));

//Formatting of text to allow padded 0's if minutes under 1 or seconds under 10
if (minutes <1 && seconds <10)
{
_root.timetxt = '0' + minutes + ':' + '0' + seconds;
}
else if (minutes >0 && seconds < 10)
{
_root.timetxt = minutes + ':' + '0' + seconds;
}
else if (seconds > 0)
{
_root.timetxt = minutes + ':' + seconds;
}
else if (seconds < 0)
{
trace ("Below 0");
}
trace (seconds);
}

timer = setInterval(countDown, 1000);

Call Timer Functions Directly From Code
How can I call a method for a Timer event like this:


ActionScript Code:
function myMethodName(event:TimerEvent):void

directly, from code, without specify the TimerEvent argument ?

thanks

Difference Between Timer.stop() And Timer.reset()?
Hello,

What is the difference between Timer.stop() and Timer.reset() functions because it seems that the 2 functions do the same thing? I image Timer.stop() to stop the timer and when Timer.start() is called the timer starts from where it stopped. For example, if I have a 3 sec. timer (3000 ms). If I stop the timer after 2.5 sec. and start the timer again, I would expect the timer to expire/trip within .5 sec. Is this a correct assumption?

Thanks,

Nilang

Difference Between Timer.stop() And Timer.reset()?
Hello,

What is the difference between Timer.stop() and Timer.reset() functions because it seems that the 2 functions do the same thing? I image Timer.stop() to stop the timer and when Timer.start() is called the timer starts from where it stopped. For example, if I have a 3 sec. timer (3000 ms). If I stop the timer after 2.5 sec. and start the timer again, I would expect the timer to expire/trip within .5 sec. Is this a correct assumption? Code is attached below.

Thanks,

Nilang







Attach Code

// Declarations
var url:URLRequest;// Url
var snd:Sound;// Sound Object
var sndChan:SoundChannel;// Sound Channel Object
var sndPosition:Number;// File offset
var tmr:Timer;// Timer object
var isPlaying:Boolean;// Flag to indicate whether file is
// playing or not
var isPlayDelayed:Boolean;// Flag to indicate whether starting
// of file has been delayed or not

var hours:Number = 0;// Hours
var minutes:Number = 0;// Minutes
var seconds:Number = 0;// Seconds
var milli:Number = 0;// Milliseconds

var pauseTime:Number = 0;// Time when paused
var pauseLength:Number = 0;// Length of pause
var buttonPressTime:Number = 0;//

var timing:Boolean = false;// Flag

// Initialize variables.
isPlaying = false;
isPlayDelayed = true;
sndPosition = 0;

// Get url
url = new URLRequest("sound1.mp3");

// Create new Sound object
snd = new Sound();

// Create new SoundChannel Object
sndChan = new SoundChannel();

// Create a new Timer Object with timeout of 5 sec.
// and repeat it only once.
tmr = new Timer(5000, 1);

// Load the audio file
snd.load(url);

// Enable Event Listeners
tmr.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete);
stop_btn.addEventListener(MouseEvent.CLICK, onStop);
pause_btn.addEventListener(MouseEvent.CLICK, onPause);
play_btn.addEventListener(MouseEvent.CLICK, onPlay);
this.addEventListener(Event.ENTER_FRAME, onEnterFrameHandler);

// Start time
pauseElapsedTime(false);

// Start Timer
tmr.start();

// Function that handles timer events
function onTimerComplete(e:TimerEvent):void
{
// Play audio file when timer complete event is received
sndChan = snd.play(sndPosition);

// Set the isPlaying to true to indicate file is playing
isPlaying = true;

// Set the isPlayDelayed to false
isPlayDelayed = false;

trace("onTimerComplete: " + e);
trace("target: " + e.target);
trace("current target: " + e.currentTarget);
}

// Function that captures frame events
function onEnterFrameHandler(e:Event):void
{
// Local variables
var totalTime:Number = (getTimer()/1000)-pauseLength;
var goTime:Number = totalTime-buttonPressTime;

// If flag is true, then calculate the time that has elapsed
if( timing )
{
// Calculate time
hours = Math.floor(goTime/3600);
minutes = Math.floor((goTime/3600-hours)*60);
seconds = Math.floor(((goTime/3600-hours)*60-minutes)*60);
milli = Math.floor((goTime-(seconds+(minutes*60)+(hours*3600)))*100);

// Display elapsed time
timeText.text = format(hours) + ":" + format(minutes) + ":" + format(seconds) + "." + format(milli);
}
}

// Function that captures mouse click events when user clicks stop button
function onStop(me:MouseEvent):void
{
// Reset time
restartElapsedTime();

if (isPlaying)
{
// If audio file is playing then stop the audio file, set file offset to zero,
// and set isPlaying flag to false
sndChan.stop();
sndPosition = 0;
isPlaying = false;
isPlayDelayed = true;
}
else if (isPlayDelayed)
{
// If audio playback is delayed then reset the timer and
// set isPlaying to false
tmr.reset();
isPlaying = false;
}
}

// Function that captures mouse click events when user clicks pause button
function onPause(me:MouseEvent):void
{
// Pause time
pauseElapsedTime(true);

if (isPlaying)
{
// If audio file is playing then stop the audio file,
// set file offset to current offset, and set isPlaying flag to false
sndChan.stop();
sndPosition = sndChan.position;
isPlaying = false;
}
else if (isPlayDelayed)
{
// If audio playback is delayed then stop the timer and
// set isPlaying to false
tmr.stop();
isPlaying = false;
}
}

// Function that captures mouse click events when user clicks play button
function onPlay(me:MouseEvent):void
{
// Start time
pauseElapsedTime(false);

if (!isPlaying)
{
if (!isPlayDelayed)
{
// If the audio file is not playing and playback is not delayed, then
// play the audio file from the last offset and set isPlaying to true
sndChan = snd.play(sndPosition);
isPlaying = true;
}
else
{
// If the audio file is not playing and playback is delayed, then
// start the timer and set isPlaying to false
tmr.start();
isPlaying = false;
}
}
}

// Function that sets the time to 00:00:00.00 (default)
function restartElapsedTime():void
{
timeText.text = "00:00:00.00";
buttonPressTime = (getTimer()/1000)-pauseLength;
pauseElapsedTime(true);
}

// Function that pauses time
function pauseElapsedTime(b:Boolean):void
{
if( b )
{
pauseTime = getTimer()/1000;
}
else
{
pauseLength = ((getTimer()/1000)-pauseTime)+pauseLength;
}
timing = !b;
}

// Function adds 0 to the front of the number when it is < 10 and
// returns a String
function format(n:Number):String
{
if( n < 10 )
{
return ("0"+n);
}
return n.toString();
}

Timer - Not Timer Class, But Time Taken To Do Certain Events
So i'm making a little game and want to know how to start a timer and display the number of milliseconds between the start and finish of two different events. I do not want to run a function after 5000 milliseconds or whatever, just record the length of time taken to say click two buttons.

Basically a stopwatch.

I saw the getTimer(); function but i'm not sure of how to use it or if that is what i need.

Once again, thanks for your time.

Running Timer And Timer With Offset
Hello all,

I'm trying to set up two timers in that dare feed the time in minutes and seconds from the server.

Basically, I've got a master running timer in seconds and minutes but also want to have a second cloned timer that is feed some seconds via flashVars to add to the the master time.

Both of these timers once set by the sever time feed in, and with one being offset, are called every second by a setInterval function call so they count up.

Setting up the master running timer isn't a problem but with my coding skills is a little messy..


Code:
_global.masterRunningTimeInMinutes = 59;
_global.masterRunningTimeInSeconds = 55;

if (_global.masterRunningTimeInSeconds>0 && _global.masterRunningTimeInSeconds<59) {
_global.masterRunningTimeInSeconds++;
} else {
_global.masterRunningTimeInSeconds = 0;
_global.masterRunningTimeInSeconds++;
if (_global.masterRunningTimeInMinutes>=0 && _global.masterRunningTimeInMinutes<=58) {
_global.masterRunningTimeInMinutes++;
} else if (_global.masterRunningTimeInMinutes>=59 && _global.masterRunningTimeInSeconds>=0) {
_global.masterRunningTimeInMinutes = 0;
}
}
if (_global.masterRunningTimeInSeconds<10) {
_global.masterRunningTimeInSeconds = "0"+_global.masterRunningTimeInSeconds;
}

_root.runningTime.text = "v"+_global.masterRunningTimeInMinutes+":"+_global.masterRunningTimeInSeconds;
Ideally I wanted to to get the master running time to display MM:SS so if anyone can help with that that would be great!

I suppose the real problem I'm having is is setting up the pattern for determining the cloned time with the offset.

This is becoming a real headache but if anyone can help I would really appreciate it! Basically I just wanted to have the running time with the cloned time always a certain amount of seconds ahead.

Many thanks, amp3

[F8] Loading And Unloading External SWF Code Issues, Code Check Please
Okay, I'm still clumsy with AS and I'm having problems loading and unloading external SWFs. I have SWFs created by others in Captivate that need to be controlled by a main menu. I created the menu and buttons and have been trying to code it so that with the button click, the appropriate external SWF loads in an empty movie clip, plays, and then closes at the final frame and returns to the menu. So far, I can get it to load, but then I'm stuck as I'm not sure what I'm missing as far as it reading the frame numbers.

Here's the code I've written. I can't seem to get my idea for the onEnterFrame function checking the frames to work.

What am I missing? Can anyone offer any suggestions or guidance? Thanks!


Code:
this.createEmptyMovieClip("clip1", 1);

myfirst_btn.onRelease = function() {
clip1.loadMovie("externalswf1.swf");
}

mysecond_btn.onRelease = function() {
clip1.loadMovie("externalswf2.swf");
}

mythird_btn.onRelease = function() {
clip1.loadMovie("externalswf3.swf");
}

clip1.onEnterFrame = function() {
if (clip1._currentframe == clip1._totalframes) {
// remove move clip1 and return to menu
clip1.removeMovieClip();
}
}

External SWFs, Code Works But Not With Additional Code
I'm using a loadMovie code that works perfect by itself, but when I add additional code to the button, it doesn't work.

Here's the scenario:

I have an MC named songs In this MC I have several buttons that should each perform very similar actions.

The first action is a:

gotoAndPlay("somewhere"); action that takes the movie to a specific frame of this MC. This code by itself works fine.

The second action I need to happen is:

this.contents.loadMovie("music1.swf") which loads an external SWF which is nothing more than an MC with an audio clip. This code, by itself works fine.

The problem comes when I combine the two codes to create:

on (release)
{
gotoAndPlay("somewhere");
this.contents.loadMovie("music1.swf");
}

The movie does go to the "somewhere" frame, but the external SWF no longer loads.

I have tried it with _root.songs.contents.loadMovie("music1.swf");

I have tried placing the loadMovie code first, but neither of those solutions work.

Any ideas?

Thanks

Help> How To Remove Part Of The Code Without Breaking The Entire Code
I use the following code on my website (http://www.misenplace.com.br ), it`s a fading out script that shows a banner underneath it.

I want to remove the pagetitle, welcome, date and sitename, but I can`t figure it out since when I remove something the movie doesn`t load or it doesn`t fade out as it was supposed to.

here`s the code


Quote:




var imgLoader = new MovieClipLoader();
var mindepth = welcome_txt.getDepth();
mindepth = mindepth < pagetitle_txt.getDepth() ? (mindepth) : (pagetitle_txt.getDepth());
mindepth = mindepth < date_txt.getDepth() ? (mindepth) : (date_txt.getDepth());
mindepth = mindepth < sitename_txt.getDepth() ? (mindepth) : (sitename_txt.getDepth());
var maxdepth = welcome_txt.getDepth();
maxdepth = maxdepth > pagetitle_txt.getDepth() ? (maxdepth) : (pagetitle_txt.getDepth());
maxdepth = maxdepth > date_txt.getDepth() ? (maxdepth) : (date_txt.getDepth());
maxdepth = maxdepth > sitename_txt.getDepth() ? (maxdepth) : (sitename_txt.getDepth());
this.createEmptyMovieClip("imageHolder_mc", mindepth - 1);
imageHolder_mc._x = 0;
imageHolder_mc._y = 0;
imageHolder_mc._alpha = 0;
imageHolder_mc.duplicateMovieClip("imageMasker_mc" , maxdepth + 1);
imageMasker_mc._alpha = 0;
imgLoader.loadClip(imageName, imageHolder_mc);
imgLoader.loadClip(imageName, imageMasker_mc);
welcome_txt.text = themessage;
welcome_txt._visible = false;
welcome_txt.autoSize = true;
var sitename_str = pagetitle;
var pagetitle_str = "";
var pos = sitename_str.indexOf(" - ");
if (pos > 0)
{
pagetitle_str = sitename_str.substr(pos + 3);
sitename_str = sitename_str.substr(0, pos);
} // end if
pagetitle_txt.text = pagetitle_str;
pagetitle_txt._visible = false;
pagetitle_txt.autoSize = true;
sitename_txt.text = sitename_str;
sitename_txt._visible = false;
sitename_txt.autoSize = true;
var curdate = new Date();
var date_str = curdate.toString();
var pos = date_str.indexOf(":");
var datestr = date_str.substr(0, pos - 3);
datestr = datestr + (", " + date_str.substr(date_str.length - 4));
date_txt.text = datestr;
date_txt._visible = false;
date_txt.autoSize = true;
imgLoader.onLoadComplete = function (targetMC)
{
_root.onEnterFrame = function ()
{
if (imageHolder_mc._alpha < 100)
{
imageHolder_mc._alpha = imageHolder_mc._alpha + 3;
}
else
{
if (!welcome_txt._visible)
{
welcome_txt._visible = true;
pagetitle_txt._visible = true;
sitename_txt._visible = true;
date_txt._visible = true;
imageMasker_mc._alpha = 100;
} // end if
imageMasker_mc._alpha = imageMasker_mc._alpha - 3;
if (imageMasker_mc._alpha <= 0)
{
delete _root["onEnterFrame"];
} // end if
} // end if
};
};






thanks a lot everyone

Movieclip Code Interacting With Document Class Code
I'm coding an application in Flash CS3 but relying heavily on doing most of the heavy lifting in actionscript3. I've set a document class (i.e. package me.mine{ class Main extends Sprite(){} }) with most of the code necessary.

In my Library I've got a Movie Clip for a control panel. I instantiate the movie clip from the Main class. This movie clip will change itself around (an off state and an on state with different menu options) - and i want to be able to add a button within the clip, and when it's clicked, have it call out to a function in the the Main class.

But I can't figure out how to get the MovieClip to talk to the Main class (I can set event listeners from the Main class on elements in the clip, but the clip will change around so I want it to work in the other direction).

Thanks for your help!

How Do I Execute Code Then Move To Another Frame When Code Is Finished And Run More?
hello. im well new to flash and im tring to build a cool flash movie using MC Tween in action script. my problem is i want to execute soem code then whenits finisd move on to frame 5 which has more code in it and then execute that code and so on how do i achieve this.
thanks

Code - What Code? You Didn't Spend Hours Writing It.
Hello,

Has anyone had a problem where sometimes (for no apparent reason) flash doesn't retain your code after you save and quit and then reopen the fla?

I used to think this was happening due to my backup app., but it's not running anymore. I even saved an additional copy of the file on my desktop AND dragged another copy to another folder. Everything was missing the same code.

We I published the swf before exiting, it worked perfectly.

Any ideas for fixes? Running os 10.3. Tried getting rid of prefs - no luck.

This is getting annoying. Happens with every fla I'm editing.

Thanks,
Ward

Newbie Convert Button Code To Frame Code
Hi all!

I guess this is a really simple one.

I have a button with the following code attached to it:


PHP Code:



this.onRelease = function() {    SWFAddress.setValue('/portfolio/');}this.onRollOver = function() {    SWFAddress.setStatus('/portfolio/');}this.onRollOut = function() {    SWFAddress.resetStatus();} 




I want to use this code on a frame. Is it onLoad I need to use??

Object/embed Code Missing From Source Code
I have the wackiest problem.. its killing me. I developed a simple flash banner for a client. It works fine on 99% of all machines, but the client's machine happens to be in the 1% that it DOES NOT work on. When he pulls up the page containing the flash file, he gets nothing. He has the latest flash plugin, and can view other flash content. When I view the source code on the machine that is having the problem, all the code is there EXCEPT the object/embed code. Its just missing. What in the world could cause that? I checked for firewall issues. He is running norton firewall. I disabled it, but he still has the problem.

This is the page in question:
http://projects.newtarget.net/RELOconnections/flashtest.html

as you can see, nothing special. simple flash, simple code. the other computers in his office have no trouble, its just his computer and his parents computers. I tried the page in IE 6 and firefox. Same result, he is not getting the flash code. He's on WinXP.

Can anybody think of ANY reason why he would be being shielded from getting object/embed flash code?

-vb

My Code Has No Friends: The Story Of My Sucky Code
I have an text input. I want it so that when you hit enter, it'll do stuff.

I want one of the commands to be...

goto

...however, here's the issue:



onClipEvent (enterFrame) {
pressed = Key.getCode();
pinputinn = pinput.toLowerCase();
if ((pinputinn == "goto") and (pressed == 13)) {
gotoAndStop (2);
}
}


Could someone tell me why that doesn't work, and what would work?
[Edited by Crickett on 07-20-2001 at 11:17 PM]

No Flash And No Embed Code In Source Code?
I really dont know whats going on here, when i try to embed my flash into a html or php document the flash movie does not appear when browsing, when i view source the code is not even there but all other code changes are reflected (i know the document has been updated). When i go direct to the swf url I can see the file. when i publish the swf with html it works fine locally but again online i cant even see the code. other flash files work fine on my site, this is a problem on IE and firefox.. whats going on???????

[F8] Help. Integrate Cpu Check Code With Preloader Code
Hi, guys!

I was looking for a way to do a cpu check over the user´s computer and then, based on the user´s cpu speed, redirect his browser towards one of two different versions of the same flash movie (let´s say, a "light" one without effects and a "full" one with all the effects). I´ve already got a fine working preloader, and I´ve found a nice cpu check code here in this forum. The problem now is that I am not able to put them together. Something like, after a mouseclick, perform the cpu check and after that load a movie based on the previous cpu check...

I am posting my fla and the original cpu check fla that I´ve found here to show what I´ve got so far.

Thanks in advance!

[F8] Sound Code Does Not Work Unless It Is The Last Line Of Code?
Hi.

My code _root.sndBeep.start(); will not play a sound no matter where in my onEnterFrame function I put it, unless it is the last line of code in that function.

Anyone know how that is possible?

Example code:


PHP Code:



onEnterFrame = function(){        // Tons of code above this point not worth posting.    _root.sndBeep.start(); // This sound will never play WHY??    if (Hearts < 3 && Hearts != 0)    {                if (!bLowHealthPlaying)        {            _root.sndLowHealth.start(0,99999);            bLowHealthPlaying = true;        }    }    else    {        _root.sndLowHealth.stop();        bLowHealthPlaying = false;    }    _root.sndBeep.start(); // Yet the sound works perfectly fine here??}

I Need Some Basic Help Getting My Pseudo Code Into Working Code
id appreciate a hand from you guys, if you could.

ive got a fla (575x431) that im making for an image gallery.... i will have 20 images that will be icons probably 40-50% smaller than the full size image these will be movie clips that i will assign a very slow random movement to
i think that i have the random part ok, i just need some help with this part...

pardon me if my terminology isnt right..

If mouse (over) a mc, then;
stop mc, show mc label, title.

If mc is clicked, then;
enlarge scale of mc (ie, 100%) and center it on the stage.

If mouse (out) then;
return mc size to its former state and continue moving randomly.


hope this makes sense would really appreciate some direction....

thanks alot

løk

Javascript Code To Actionscript Code?
I have some actionscript code that makes a really cool clock effect. I was wondering if anyone knew how to convert the javascript code to actionscript or if it is even possible to do. If not, does anyone know how to recreate the effect in flash/actionscript? You can view the actual javascript effect by going to www.uncontrol.com and clicking on the clock file. The javascript code is as follows:

Thanks for any help...

-- K



__________________________________________________ ______



// clock
// created using proce55ing application | www.proce55ing.net
// copyright© www.uncontrol.com | mannytan@uncontrol.com

// ************************************************** **********************
// initialize
// ************************************************** **********************
boolean mouseStatus = false;
boolean priorMouseStatus = false;
int x, y, z;
int i, j, k;
float counter=1;
String time,s_hour,s_min, s_sec;
float pos_x, pos_y;
float radius;
float SECOND_INC = .0166;// 1/60
float MINUTE_INC = .0166;// 1/60
float HOUR_INC = .0833;// 1/12
float current_sec, current_min, current_hr;
float radian_percentage;
// ************************************************** **********************
// set up
// ************************************************** **********************
void setup() {
size(400, 400);
background(255);
hint(SMOOTH_IMAGES);

BFont ocr;
ocr = loadFont("OCR-B.vlw.gz");
setFont(ocr, 16);
ellipseMode(CENTER_DIAMETER);
rectMode(CENTER_DIAMETER);
}

// ************************************************** **********************
// listeners
// ************************************************** **********************
void mousePressed() {
mouseStatus = true;
}
void mouseReleased() {
mouseStatus = false;
}

void loop() {
translate(width/2, height/2);
radian_percentage = ((mouseY+.0001)*.0025);
rotateX(TWO_PI * radian_percentage * -1);

// --------------------------------------------
// analog marks numbers
// --------------------------------------------
push();
rotateX(TWO_PI*(.25));
for (i=1;i<=12;i++) {
push();
if (i==12) {
noStroke();
fill(255,102,0);
} else {
noStroke();
fill(0,0,0,75);
}
rotateZ(TWO_PI*((i)*HOUR_INC));
if (i<10) {/* ads a zero*/
text("0"+i, -5, -145);
} else {
text(""+i, -5, -145);
}
//rect(0,145,4,10);
pop();
}
pop();

// --------------------------------------------
// digital marks colon symbols
// --------------------------------------------
push();
translate(cos(2*TWO_PI*radian_percentage)*7+7,0);
rotateX(TWO_PI*(radian_percentage));
text(":", 0, 0);
pop();
push();
translate(cos(2*TWO_PI*radian_percentage)*-7+2,0);
rotateX(TWO_PI*(radian_percentage));
text(":", 0, 0);
pop();
push();

// --------------------------------------------
// second
// --------------------------------------------
current_sec = second();
radius = 120;
translate(cos(2*TWO_PI*radian_percentage)*10+10,0) ;
rotateY(TWO_PI*(((45)+current_sec)*SECOND_INC)*-1);

// draw shaded circle
noStroke();

// draw numbers
for (i=0; i<=59;i++) {
push();
translate(radius,0);
rotateZ(TWO_PI*(((30-i)+current_sec)*SECOND_INC)*-1);
translate(radius,0);

rotateZ(TWO_PI*(((30-i)+current_sec)*SECOND_INC));
rotateY(TWO_PI*(((45)+current_sec)*SECOND_INC));
rotateX(TWO_PI*(radian_percentage));

if (i==current_sec) {/* highlights current time*/
fill(255,102,0);
} else {
fill(0,0,0,50);
}
if (i<10) {/* ads a zero*/
text("0"+i, 0, 0);
} else {
text(""+i, 0, 0);
}
pop();
}

pop();

// --------------------------------------------
// minute
// --------------------------------------------
current_min = minute() + (second()*SECOND_INC);
radius = 100;
push();
translate(0,0);
rotateY(TWO_PI*(((45)+current_min)*MINUTE_INC)*-1);

// draw shaded circle
noStroke();

// draw numbers
for (i=0; i<=59;i++) {
push();
translate(radius,0);
rotateZ(TWO_PI*(((30-i)+int(current_min))*MINUTE_INC)*-1);
translate(radius,0);

rotateZ(TWO_PI*(((30-i)+int(current_min))*MINUTE_INC));
rotateY(TWO_PI*(((45)+current_min)*MINUTE_INC));
rotateX(TWO_PI*(radian_percentage));

if (i==int(current_min)) {/* highlights current time*/
fill(255,102,0);
} else {
fill(0,0,0,50);
}

if (i<10) {/* ads a zero*/
text("0"+i, 0, 0);
} else {
text(""+i, 0, 0);
}
pop();
}
pop();

// --------------------------------------------
// hour
// --------------------------------------------
current_hr = hour()%12 + (minute()*MINUTE_INC);
radius = 40;
push();
translate(cos(2*TWO_PI*radian_percentage)*-10-10,0);
rotateY(TWO_PI*(((9)+current_hr)*HOUR_INC)*-1);

// draw shaded circle
noStroke();

// draw numbers
for (i=0; i<=11;i++) {
push();
translate(radius,0);
rotateZ(TWO_PI*(((6-i)+int(current_hr))*HOUR_INC)*-1);
translate(radius,0);

rotateZ(TWO_PI*(((6-i)+int(current_hr))*HOUR_INC));
rotateY(TWO_PI*(((9)+current_hr)*HOUR_INC));
rotateX(TWO_PI*(radian_percentage));

if (i==int(current_hr)) {/* highlights current time*/
fill(255,102,0);
} else {
fill(0,0,0,50);
}

if (i==0) {/* ads a zero*/
text("12", 0, 0);
} else if (i<10) {
text("0"+i, 0, 0);
} else {
text(""+i, 0, 0);
}
pop();
}
pop();
// ************************************************** **********************
// mouse press initializer
// ************************************************** **********************
if (mouseStatus == true && priorMouseStatus == false) {
priorMouseStatus = true;

// ************************************************** **********************
// mouse press looper
// ************************************************** **********************
} else if (mouseStatus == true && priorMouseStatus == true) {
priorMouseStatus = true;

// ************************************************** **********************
// mouse release initializer
// ************************************************** **********************
} else if (mouseStatus == false && priorMouseStatus == true) {
priorMouseStatus = false;

// ************************************************** **********************
// mouse release looper
// ************************************************** **********************
} else if (mouseStatus == false && priorMouseStatus == false) {
priorMouseStatus = false;
}




}

Adding Code To Existing Code
I've been after an answer for this problem for some time!

I have a 2-layerd movie which consists of a roll-over script. When the cursor goes over my movie it loads the 2nd layer. Very simple!

I would like a passage of text to appear also, in a seperate area of the frame, when the cursor rolls over the same movie.

How would this be possible? Can I add some coding to the existing code thats placed on the movie?

PLEASE PLEASE HELP IF YOU CAN!

Adding Code To Existing Code
I've been after an answer for this problem for some time!

I have a 2-layerd movie which consists of a roll-over script. When the cursor goes over my movie it loads the 2nd layer. Very simple!

I would like a passage of text to appear also, in a seperate area of the frame, when the cursor rolls over the same movie.

How would this be possible? Can I add some coding to the existing code thats placed on the movie?

PLEASE PLEASE HELP IF YOU CAN!

Adding Code To Existing Code
I've been after an answer for this problem for some time!

I have a 2-layerd movie which consists of a roll-over script. When the cursor goes over my movie it loads the 2nd layer. Very simple!

I would like a passage of text to appear also, in a seperate area of the frame, when the cursor rolls over the same movie.

How would this be possible? Can I add some coding to the existing code thats placed on the movie?

PLEASE PLEASE HELP IF YOU CAN!

[AS3] Run Code End Of Movie W/o Timeline Code?
Super noob question on AS3. I'm told that I'm to avoid putting any code in the timeline and use classes instead. I have a simple logo running in the beginning it has no timeline code. How do I make it so that it will call a function when the movieclip is finished playing?

Thanks!

How To Convert Java Code To As3 Code
package ConvertNumberIntoWords;

class EnglishDecimalFormat {
private static final String[] majorNames = {
"",
" thousand",
" million",
" billion",
" trillion",
" quadrillion",
" quintillion"
};

private static final String[] tensNames = {
"",
" ten",
" twenty",
" thirty",
" fourty",
" fifty",
" sixty",
" seventy",
" eighty",
" ninety"
};

private static final String[] numNames = {
"",
" one",
" two",
" three",
" four",
" five",
" six",
" seven",
" eight",
" nine",
" ten",
" eleven",
" twelve",
" thirteen",
" fourteen",
" fifteen",
" sixteen",
" seventeen",
" eighteen",
" nineteen"
};

private String convertLessThanOneThousand(int number) {
String soFar;

if (number % 100 < 20){
soFar = numNames[number % 100];
number /= 100;
}
else {
soFar = numNames[number % 10];
number /= 10;

soFar = tensNames[number % 10] + soFar;
number /= 10;
}
if (number == 0) return soFar;
return numNames[number] + " hundred" + soFar;
}

public String convert(int number) {
/* special case */
if (number == 0) { return "zero"; }

String prefix = "";

if (number < 0) {
number = -number;
prefix = "negative";
}

String soFar = "";
int place = 0;

do {
int n = number % 1000;
if (n != 0){
String s = convertLessThanOneThousand(n);
soFar = s + majorNames[place] + soFar;
}
place++;
number /= 1000;
} while (number > 0);

return (prefix + soFar).trim();
}

public static void main(String[] args) {
EnglishDecimalFormat f = new EnglishDecimalFormat();
System.out.println("*** " + f.convert(0));
System.out.println("*** " + f.convert(17708));
System.out.println("*** " + f.convert(16));
System.out.println("*** " + f.convert(100));
System.out.println("*** " + f.convert(118));
System.out.println("*** " + f.convert(200));
System.out.println("*** " + f.convert(219));
System.out.println("*** " + f.convert(800));
System.out.println("*** " + f.convert(801));
System.out.println("*** " + f.convert(1316));
System.out.println("*** " + f.convert(1000000));
System.out.println("*** " + f.convert(2000000));
System.out.println("*** " + f.convert(3000200));
System.out.println("*** " + f.convert(700000));
System.out.println("*** " + f.convert(5960809));
System.out.println("*** " + f.convert(123456789));
System.out.println("*** " + f.convert(-45));
System.out.println("*** " + f.convert(99565789));
// (99565789)


/*
*** zero
*** seventeen thousand seven hundred eight
*** sixteen
*** one hundred
*** one hundred eighteen
*** two hundred
*** two hundred nineteen
*** eight hundred
*** eight hundred one
*** one thousand three hundred sixteen
*** one million
*** two million
*** three million two hundred
*** seven hundred thousand
*** five million nine hundred sixty thousand eight hundred nine
*** one hundred twenty three million four hundred fifty six thousand seven hundred eighty nine
*** negative fourty five
*** ninety nine million five hundred sixty five thousand seven hundred eighty nine

*/
}
}

Where Should I Place The Preloader Code In This Code..
hi Users,

I am working on a Flash Project in which I have to display a Calendar highlights the dates which have events. Now before loading the Calendar I am calling all the info from a PHP file and then storing it in an array and the using the info for highlighting the days of the events. Now as the info is getting big and big the Calendar is taking sometime to load. I want to place a preloader so that it shows that the Calendar is getting the info. The problem is that I dunno where to place the preloader code. Here is my code where I am getting the info from PHP files:


ActionScript Code:
tellTarget (_root) {
    cal.stop();
    eventDates = new LoadVars();
    eventDates.load("getEvents.php");
        eventDates.onData = function(values) {
        if (values == undefined) {
            eventDates.load("getEvents.php");
        } else {
            checkPlay();
            _root.eventsCollection = new Array();
            _root.eventsCollection = values.split("~");
        }
    };
    //
    recursiveEvents = new LoadVars();
    recursiveEvents.load("getEvents1.php");
    recursiveEvents.onData = function(values) {
        if (values == undefined) {
            recursiveEvents.load("getEvents1.php");
        } else {
            checkPlay();
            _root.recEventsCollection = new Array();
            _root.recEventsCollection = values.split("~");
        }
    };
}
i = 0;
function checkPlay() {
    i++;
    if (i == 2) {
        play();
    }
}

Now I would like to know where should I put the preloader code. Need help. The above code is in a MovieClip which is placed on the main stage.

Regards,
Xeeschan

Help Please With Code Animated Rollover Code
I am trying to make a tutorial i got from http://www.were-here.com/content/tem...d=679&zoneid=7 work and i have done everything but the code didn't work. I have rewrote it and it also doesn't work. Could someone please take a look at it or tell me where I can go to get a better tutorial that does the same thing.

on (rollOver)
if (_currentframe=1)
gotoAndPlay(2);
else if (_currentframe=20)
stop
else
gotoAndPlay (39-_currentframe)
end if}
end on

on (rollOut)
if (_currentframe=20)
gotoAndPlay (21)
else
gotoAndPlay (39-_currentframe)
end if
end on

Code To Long Any Other Way To Write This Code
i've been reading / learning actionscript 3 and i am making some simple practice .. but its too long any other way i can write this code it works fine but its too long.. thanks


Code:
package
{
import flash.display.Sprite;
import flash.text.*;
import flash.net.*;
import flash.events.Event;
import flash.display.StageScaleMode;
import flash.display.StageAlign;

public class Test extends Sprite
{
//private
private var navStyle:StyleSheet;

//NAV CONTAINER
private var navContainer:Sprite;

//HOME
private var home:Sprite;
private var homeText:TextField;

//COMPANY
private var company:Sprite;
private var companyText:TextField;

//SERVICES
private var services:Sprite;
private var servicesText:TextField;

//CONTACT
private var contact:Sprite;
private var contactText:TextField;

public function Test() {
init();
}
public function init():void {
loadStyleSheet();
initStage();
}
private function loadStyleSheet():void
{
var styleLoader:URLLoader = new URLLoader();
styleLoader.addEventListener(Event.COMPLETE , completeListener);
styleLoader.load(new URLRequest("css/test.css"));
}
private function completeListener (e:Event):void {
var navStyle:StyleSheet = new StyleSheet();
navStyle.parseCSS(e.target.data);

navContainer = new Sprite();

// HOME
home = new Sprite();
homeText = new TextField();

homeText.selectable = false;
homeText.antiAliasType = AntiAliasType.ADVANCED;
homeText.autoSize = TextFieldAutoSize.LEFT;
homeText.styleSheet = navStyle;
homeText.htmlText="<p class='navigation'><b>HOME</b></p>";
home.addChild(homeText);
addChild(home);

// COMPANY
company = new Sprite();
companyText = new TextField();

companyText.selectable = false;
companyText.antiAliasType = AntiAliasType.ADVANCED;
companyText.autoSize = TextFieldAutoSize.LEFT;
companyText.styleSheet = navStyle;
companyText.htmlText="<p class='navigation'><b>COMPANY</b></p>";
company.addChild(companyText);
addChild(company);

// SERVICES
services = new Sprite();
servicesText = new TextField();

servicesText.selectable = false;
servicesText.antiAliasType = AntiAliasType.ADVANCED;
servicesText.autoSize = TextFieldAutoSize.LEFT;
servicesText.styleSheet = navStyle;
servicesText.htmlText="<p class='navigation'><b>SERVICES</b></p>";
services.addChild(servicesText);
addChild(services);

// CONTACT
contact = new Sprite();
contactText = new TextField();

contactText.selectable = false;
contactText.antiAliasType = AntiAliasType.ADVANCED;
contactText.autoSize = TextFieldAutoSize.LEFT;
contactText.styleSheet = navStyle;
contactText.htmlText="<p class='navigation'><b>CONTACT</b></p>";
contact.addChild(contactText);
addChild(contact);

home.x = 0;
company.x = home.width + 20;
services.x = company.x + company.width + 20;
contact.x = services.x + services.width + 20;
navContainer.addChild(home);
navContainer.addChild(company);
navContainer.addChild(services);
navContainer.addChild(contact);
addChild(navContainer);

}

private function textFormat (navText:TextField, menuLabel:String):void {
navText = new TextField();
navText.selectable = false;
navText.embedFonts = true;
navText.antiAliasType =AntiAliasType.ADVANCED;
navText.type = TextFieldType.DYNAMIC;
navText.autoSize = TextFieldAutoSize.LEFT;
navText.styleSheet = navStyle;
navText.htmlText ="<p class='navigation'><b> "+menuLabel+" </b></p>";
}
private function initStage():void {
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
}

}
}

Timer.
Hi, I am having problems with a timer.

Using the code from one of the movies here on Flashkit, I wanted to add 100th seconds to the movie. Here's the code:

millitime = getTimer()/60000-(int(getTimer()/60000));
seconds = (int(millitime*60));
milli = (int(millitime*6000));
mymin = (int(getTimer()/60000));
if (seconds <10) {
seconds = "0" + seconds;
}
if (Number(mymin)<1) {
mintime = "00";
} else {
mintime = (int(getTimer()/60000));
if (Number(mymin)<10) {
mintime = "0" + mintime;
}
}
minfield = mintime;



As you can see 'milli' is the amount of milliseconds in a minute, and I am unsure as to how to get this to read 00 - 99 in a single field and then restart after 1 second. HELP?

G

Timer
Let's say I have this timer:

timer = int ((getTimer ())/60000)


When I go to the next frame/stage I want the timer to "reboot". So I thought, why not do this:

timer = int ((getTimer ())/60000)

timer2 = int ((getTimer ())/60000)


And in the next frame/stage:

timer = int ((getTimer ())/60000 - timer2)


But all I get is the same value. At first I thought that If a put a, for example, getTimer value in a var, then it remains constant, keep the same value that the timer had in that specific time. And therefor should my script work, but it doesn't. Why?

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