I can not reset a timer flash AS3?

I wrote clear following a timer so that it counts form 0 again. The timer is not reset, it will just stop and it save the last count.

The trace output is: 34900 and I want it to be 0. How to do?

myTimer.reset ();

myTimer.removeEventListener (TimerEvent.TIMER, timerListener);

trace (getTimer ());

Here is the complete code for my project: (The comment linse are for me, not for you)

Stop();

var i: int; i = 0;

var c:int; c = 0;

var timer_check:uint = 0;

var removeCheck:Boolean = true;

var brand: Number = 0;

var timerOff:Boolean = false;

Var list: Array = [];

timed var: uint = 16;

for (var p:uint = 1; p < = 44; p ++)

If you want to add more photos traditionally 44 to the new number of images

{

List.push (p);

}

Shuffle (List);

good var: Array = [];  copy

var test: Array = [];

Copy (List, Good);

Copy (List, testing);

good = good.splice (0.18).  cut the first 18 elements

var PIC: Array = list.splice (0.9);

test = testing.slice (0.45)

Shuffle (testing);

var myTimer:Timer;  Second: re-arrangeing some nine picturs using 'if' conditions:

myTimer = new Timer (1000,34);

myTimer.addEventListener (TimerEvent.TIMER, timerListener);

function timerListener (e:TimerEvent): void {}

timed;

Time.Text = "duration:" + timed.toString ();

Time.x = 340; Time.y = 7;

If (timed == 0 & & removeCheck) 16000 getTimer() > 18000

{

Timed = 16;

for (var removeOldPic:uint = 0; removeOldPic < 9; removeOldPic ++)

{

This ['p' photo [removeOldPic]] .x plus 5000;

}

PEAK = list.splice (0.9);

c = 0;

removeCheck = false;

}

If (getTimer() > 34000) after completing the timer 34000

{

Time.x = 5000;

PicGraphic.text = "image:" + (picCounter) m:System.NET.SocketAddress.ToString () + "/" + numberOfTestingPictures.toString (); "."

PicGraphic.x = 280; PicGraphic.y = 7;

for (var removeNewPic:uint = 0; removeNewPic < 9; removeNewPic ++)

{

This ['p' photo [removeNewPic]] .x plus 5000;

}

YesYes.x = 465; Nono.x = 165; YesYes.y = 300; Nono.y = 300

contine remove event listeners *.

timerOff = true;

myTimer.reset ();

myTimer.removeEventListener (TimerEvent.TIMER, timerListener);

trace (getTimer ());

}

While (< 9 c)

{

If (c == 0)

{

This ['p' photo [c]] .width plus 175;

This ['p' photo [c]] .height plus 175;

This ['p' photo [c]] .x plus 132;

This ['p' + photo [c]] there = 60;

}

If (c == 1)

{

This ['p' photo [c]] .width plus 175;

This ['p' photo [c]] .height plus 175;

This ['p' photo [c]] .x plus 312;

This ['p' + photo [c]] there = 60;

}

If (c == 2)

{

This ['p' photo [c]] .width plus 175;

This ['p' photo [c]] .height plus 175;

This ['p' plus photo [c]] .x is 492;

This ['p' + photo [c]] there = 60;

}

If (c == 3) / / new line

{

This ['p' photo [c]] .width plus 175;

This ['p' photo [c]] .height plus 175;

This ['p' photo [c]] .x plus 132;

This ['p' plus photo [c]] there is 240;

}

If (c is 4)

{

This ['p' photo [c]] .width plus 175;

This ['p' photo [c]] .height plus 175;

This ['p' photo [c]] .x plus 312;

This ['p' plus photo [c]] there is 240;

}

If (c == 5)

{

This ['p' photo [c]] .width plus 175;

This ['p' photo [c]] .height plus 175;

This ['p' plus photo [c]] .x is 492;

This ['p' plus photo [c]] there is 240;

}

If (c == 6) / / new line

{

This ['p' photo [c]] .width plus 175;

This ['p' photo [c]] .height plus 175;

This ['p' photo [c]] .x plus 132;

This ['p' plus photo [c]] there is 420;

}

If (c is 7)

{

This ['p' photo [c]] .width plus 175;

This ['p' photo [c]] .height plus 175;

This ['p' photo [c]] .x plus 312;

This ['p' plus photo [c]] there is 420;

}

If (c is 8)

{

This ['p' photo [c]] .width plus 175;

This ['p' photo [c]] .height plus 175;

This ['p' plus photo [c]] .x is 492;

This ['p' plus photo [c]] there is 420;

}

c ++ ;

}

}

myTimer.start ();

//-----------------------------------end---------------------------------------------

programming keys

var picCounter: uint = 0;

var numberOfTestingPictures: uint = randomRange (30,40);

yesyes.addEventListener (MouseEvent.CLICK, fl_ClickToGoToWebPage);

function fl_ClickToGoToWebPage(event:MouseEvent):void

{

PicGraphic.text = "image:" + (picCounter + 1) m:System.NET.SocketAddress.ToString () + "/" + numberOfTestingPictures.toString (); "." Code is repeated for updating its data

for (var iyes:uint = 0; agreed < 17; agreed ++)

{

If (tests [picCounter] == good [Agreed]) {brand ++ ;}}

}

Don't forget to repeat the changes of what follows if "Declaration".

nono button

If (picCounter > = numberOfTestingPictures) / / finising the game and appearing the score

{

YesYes.x = 5000;

Nono.x = 5000;

bar.x = 5000;

This ['p' test [picCounter]] .x plus 5000;

stage.removeEventListener (Event.ENTER_FRAME, appearingPic);

var fine: Number = (mark / (picCounter + 1)) * 100;

score. Text = "your score is:" + fine.toFixed (2) + '%'; "."

score.x = 225; score.y = 200;

XT2 there = 400; playAgain.y = 300;

PicGraphic.x = 5000;

}

picCounter ++;

}

var negativeMark:uint = 0;

nono.addEventListener (MouseEvent.CLICK, fl_ClickToGoToWebPage1);

function fl_ClickToGoToWebPage1(event:MouseEvent):void

{

PicGraphic.text = "image:" + (picCounter + 1) m:System.NET.SocketAddress.ToString () + "/" + numberOfTestingPictures.toString (); "."

for (var ino:uint = 0; ino ino; < 17 ++)

{

If (tests [picCounter]! = good [ino]) {negativeMark ++ ;}}

}

If (negativeMark > 16)

{

brand ++;

negativeMark = 0;

}

If (picCounter > = numberOfTestingPictures) / / finising the game and appearing the score

{

YesYes.x = 5000;

Nono.x = 5000;

bar.x = 5000;

This ['p' test [picCounter]] .x plus 5000;

stage.removeEventListener (Event.ENTER_FRAME, appearingPic);

var fine: Number = (mark / (picCounter + 1)) * 100;

score. Text = "your score is:" + fine.toFixed (2) + '%'; "."

score.x = 225; score.y = 200;

XT2 there = 400; playAgain.y = 300;

PicGraphic.x = 5000;

}

picCounter ++;

}

stage.addEventListener (Event.ENTER_FRAME, appearingPic);

function appearingPic (event: Event)

{

If (timerOff)

{

This ['p' test [picCounter]] .width plus 175;

This ['p' test [picCounter]] .height plus 175;

This ['p' test [picCounter]] .x plus 312;

This ['p' plus test [picCounter]] there is 112;

for (var tc = 0; tc < testing.length - 1; tc ++)

{

If (tc! = picCounter) {this ["p" + test [tc]] .x = 5000 ;}

}

}

}

XT2.addEventListener (MouseEvent.CLICK, exitbutton2);

function exitbutton2(event:MouseEvent):void {import flash.system.fscommand; fscommand ("quit");} System.Exit (0) ;}

playAgain.addEventListener (MouseEvent.CLICK, resetAllTheGame);

function resetAllTheGame(event:MouseEvent):void

{

i = 0;

c = 0;

timer_check = 0;

removeCheck = true;

brand = 0;

List.Length = 0;

Timed = 16;

Good.Length = 0;

testing. Length = 0;

PEAK. Length = 0;

picCounter = 0;

gotoAndStop (1);

}

////////////////////////////////////////////////////////////////////////////////////////// ///////////////////

function randomRange(minNum:Number,_maxNum:Number):Number / / this function generates a random number

{

return (Math.floor (Math.random () * (maxNum - minNum + 1)) + minNum);

}

function removeDuplicate(arr:Array): void {}

var i: int;

var j: int;

for (i = 0; i < arr.length - 1; i ++) {}

for (j = i + 1; j < arr.length; j ++) {}

{If (arr [i] = {arr [j])}

arr.splice (d, 1);

}

}

}

}

function shuffle(array_shuffle:Array) {}

var p_array_shuffle:int;

var t_array_shuffle: *;

var ivar:int;

for (ivar = array_shuffle.length - 1; ivar > = 0; ivar-) {}

p_array_shuffle = Math.Floor ((Ivar+1) * Math.Random ());

t_array_shuffle = array_shuffle [ivar];

array_shuffle [ivar] = array_shuffle [p_array_shuffle];

array_shuffle [p_array_shuffle] = t_array_shuffle;

}

}

function copy(copyA:Array,copyB:Array) in two table copy, the source table is first

{

for (var copy_counter:uint = 0; copy_counter < copyA.length - 1; copy_counter ++)

{

copyB [copy_counter] = [copy_counter] may;

}

}

myTimer.reset ();

myTimer.removeEventListener (TimerEvent.TIMER, timerListener);

trace (getTimer ());

You draw a completely different timer. getTimer() is Mississippi, since the movie started playing and has nothing to do with the myTimer Timer.

Tags: Adobe Animate

Similar Questions

  • Can not reset the NVRAM 10.11.2?

    I can not reset NVRAM with the command + Option + P + R keys since I am under 10.11.2.

    When you use the command + Option + P + R that opens the window of recovery?

    An idea for new reset the NVRAM of the keyboard as before

    Thank you

    pwhy

    The operating system is not relevant to reset the NVRAM since the reset occurs before the OS is loaded again.  Try making sure that all four keys are pressed at the same time and kept pressed until the startup chime once and the computer is automatically restarted.

  • I can not reset my work going on in hotmail.

    I can not reset my work going on in hotmail.

    You will find support for Windows Live Hotmail in these forums: http://windowslivehelp.com/forums.aspx?productid=1

  • How can I reset the time

    Hello

    The function of the program was to indicate the elapsed time. When the program has been run and the switch set to true, the indicator showed the elapsed time. And then move the button to false, the stop indicator to indicate the elapsed time. How can I reset the time elapsed to indicate the time elapsed since 0 when the button switch again without pressing the button "stop"? The program is attached. Thank you.

    From your description, it seems that your code is way too complex. -What are you really trying to do?

  • How can I reset the time and date on Windows Vista?

    How can I reset the time and date on Windows Vista

    http://www.ehow.com/how_2056384_change-date-time-Windows-Vista.html

    http://www.Vistax64.com/tutorials/114989-date-time-change.html

    Read the information in one of the links above.

    See you soon.

    Mick Murphy - Microsoft partner

  • Hello, I can not download first time cs6 remove too early. Help, please

    Hello, I can not download first time cs6 remove too early. Help, please

    Hi Leon92,

    Pleaase follow the steps mentioned in the KB: http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html and try to install again.

    You can also only the direct link: http://prodesigntools.com/adobe-cs6-direct-download-links.html .

    Please follow the very important instructions before downloading.

    Kind regards

    Romit Sinha

  • can not reinstall the adobe flash player. Error message "brccmctl close"?

    I can't reinstall my adobe flash player.  I get a close message to the suite of programs, internet explore and brccmctl.  I closed the intern. exp., but I do not know what brccmctl is.  Help, please.  THN u

    @green13,.



    I understand that Adobe Flash will not update because of brccmctl.



    Have you tried HardBeatZ suggestions to search for the program?  The program that brccmctl means is ControlCenter3 which is software for Brother printers printing.



    By chance, you are using a Brother printer?  If so, you can ensure that any process of brother ended in the Task Manager (right click on the taskbar to get the Task Manager).



    The simplest option may be temporarily disable startup programs to update Adobe and then re-enable startup prorams.  This can be done by going to start, search for msconfig, the opening of this result and uncheck the startup items.  Once installed Adobe, go back to msconfig to activate startup programs.



    Let me know what happens.

  • I have a HP pavilion Elite and I can not reset my computer to factory settings?

    I continue to have this problem where I can not even open any app on the computer such as microsoftword and power point. Nothing works! I tried reseting the computer, but I did not eat for recovery. or a backup disk. I tried to download the recovery as some other Manager answers but it doesn't seem to work. I can't even personlize my background saying "Server Esecution failed" in everthing.

    Hello again Otaku.

    Sorry for my delay.  I was out of the office.

    It really depends on your warranty situation.  You can check the status of your warranty here.  Even if you are not in the security for costs which are incurred would be minimal, and these drives are incredibly useful to have.  Then, I highly recommend that you buy a game if you don't have any.

    Have a wonderful day!

  • Installation installation of Win Vista Home premium error Windows errors can not reset the deployment engine. to install windows, restart the installation.

    Original title: Error Installing Win Vista Home premium.

    I have a PC with Windows Vista Home Premium.  Suddenly, it wouldn't start.  I changed the boot CD ROM and put my Vista disc in and tried to do a "repair" that it came with missing engine or something like this.  After several attempts, I gave up and formatted hard drive losing all my data and programs (rather difficult to backup files when the computer does not start).  So, I tried a complete installation.  I put in the license code and he started the installation.  After a few minutes, the message came;  "Windows Setup could not reset the deployment engine.  to install windows, restart the installation.  I tried several times including completely turn off the computer for several minutes and try again.  I tried several times.  I thought oh well, I will install my Windows 7 program (this and never used).  Error on this installation was: your CPU is only good for 32 bit and Win 7 I have is a 64-bit version.  I'D RATHER INSTALL VISTA BUT need help on the error regarding the deployment engine.  Thank you, Lloyd

    Hello

    See if this solution works for you:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_install/Windows-Setup-could-not-reinitialize-the/f9e6f3e6-EA80-487F-8d86-36c793f7c152

    See you soon.

  • WRT54G can not reset or see the config page.

    Hello. I have a wrt54g that I have configured previously, including wep and mac filtering.

    I have access to the internet.

    Today I noticed that I can't access router config (checked 192.168.1.1 is worn by ipconfig/all).  I tried to connect both wifi and ethernet with disabled wifi.  Under firefox and IE tells me the config page could not load, server not (or order) answer.

    No password or logon screen fails just load the page.

    I tried to reset the router by unplugging the router and all the cables of e'net. I pressed the button of reset for 60 seconds.  When I reconnected it it has rebooted without any reset... he had the same SSID and WEP key. ?????

    At first I thought it was a problem of W7, because I just upgraded, but I can't reset or access to the page of Firefox, chrome or my iphone. Maybe the router is bricked as config is concerned.   ?

    Any suggestions?

    What you have said above, you pressed the reset button with the unplugged router.  That will do nothing.  Plug in the router and wait 60 seconds.  With the power on, press and hold the button of reset for 30 seconds and then release.  Wait 30 seconds and now the router power cycle.  Connect with your wired computer to 192.168.1.1 empty user name, admin password and reconfigure.

  • Too long and too big display settings, can not reset!

    I tried to do the CIO more then my husband could better see the screen, but now everything is elongated and too big! When I go to display settings, I can't reset because the 'Apply' button is off the screen and I can't click on it! Help!

    Press the ENTER key to apply the value.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Restore point:

    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-system-restore/

    Do Safe Mode system restore, if it is impossible to do in Normal Mode.

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    http://www.windowsvistauserguide.com/system_restore.htm

    Read the above for a very good graph shows how backward more than 5 days in the System Restore Points by checking the correct box.

    See you soon.

    Mick Murphy - Microsoft partner

  • Computer laptop Windows 8 can not reset/refresh or update to 8.1

    So 4-5 months ago, I got a new laptop with Windows 8, and everything was working properly until I had a nasty virus that locked my screen after connection, I managed to get rid of the virus, but I think in the process of my anti-virus deleted some system files.

    Since then, the Windows Security Center Service has been disabled, and if I click on turn on I get a screen pop up saying "you cannot start the Windows Security Center service."
    It was a little disturbing, but I don't give much thought but recently I wanted to move to 8.1 and it doesn't give me the error 'your Windows 8.1 installation could not be completed', after trying again 2 times I went to check if I could update and see if it works, it has not, after that I tried to reinstall , but which does not work either...
    I want to do a reinstall, recover all the original windows files and keep current partitions, I saved that I need and I'm pretty much ready, my question is how do?
    I got the key and I was able to make a dvd with installation, please help me.

    Hi Mihai,

    What is the brand and model of your computer?

    In the following procedure, you can download the ISO of Windows 8 and create a DVD.

    1. click here upgrade to Windows 8 with a product key, and then click the option "install Windows 8".

    2 run the configuration file (WindowsSetupBox.exe), who will start to download Windows 8 ISO.

    3 click "Install." by creating media

    4 if you decide that the installation program to create USB flash media player, or save the ISO file. If you choose the ISO, the ISO file is saved on your PC and you will be able to burn to DVD.

    Note: When you reinstall the operating system, select the partition on which the operating system is currently installed. No format/select all other partitions that can erase data on them.

    Your computer came preinstalled with Windows 8, you can also contact the manufacturer and verify that they can help you perform Update or reset.

    Hope that the information provided is useful. Do not respond if you need more help.

  • I forgot the administrator password & can not reset in!

    • I changed the administrator password last week and now I forgot what it was. I can't access or change the password, or reinstall windows. It asks password each time. I do not have a password reset disk.
    • Another user is available

    You can change your password to something that you remember another administrative user account. If you had only an administrative user account and you have forgotten the password, all is not lost. You can then follow the general recommendations for implementing user accounts in Vista that I will give you at the end of this post.

    All this requires a certain level of computer skills. You know better and that take the machine to a competent local computer tech (not a type of BigComputerStore/GeekSquad place) is the best solution for you.

    If you have an installation of Vista DVD (not a recovery DVDs), you can start the system with it. Select the default language, then select "repair your computer". Then select "Command Prompt". At the command prompt, type:

    NET user administrator / Active: Yes [press Enter]
    NET user [insert here the name of your user account] [insert the new password of user as 1234 here] [press Enter]

    [Note: do not enter the brackets!]

    Remove the installation DVD and restart the computer. Now, you will be able to connect to your user account by using the password that you set; for example, 1234.

    If you do not have a Vista installation DVD (only have a recovery disk), the computer mftr. may have given you the option to repair Vista (not a system recovery!) system in the diagnostic menu. This menu of diagnosis is the same one where you can choose Safe Mode. Get to this menu by repeatedly pressing the F8 key as the computer starts. If you do not have this option, you can make a bootable Vista file repair DVD in this link:

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    Note: All the Neosmart recovery disk downloads are torrent files. There is a good explanation of the torrent on the site Web of Neosmart files. You will need a torrent as muTorrent client to get the files. Torrent client will download the .iso file with which to create the bootable DVD. You will need to use third-party burning software such as Nero, Roxio or the free ImgBurn (http://www.imgburn.com ) to burn the image .iso image file, not in the form of data.

    Once you have fixed things, log on to the additional administrative account you will be made by the suggestions below and disable the administrator account integrated yet for security reasons:

    Start Orb > Search box > type: cmd
    When cmd appears in the above results, right-click and choose "Run as Administrator" [OK]. Now, you will get the command prompt. At the command prompt, type:

    NET user administrator / active: No. [Enter]

    Exit the command prompt.

    General recommendations for creating users in Vista:

    You absolutely don't want to have only one user account. As XP and all the other modern operating systems, Vista is a multi-user system with integrated system of accounts as default Administrator and comments. These accounts should be left alone because they are part of the structure of the operating system.

    In particular, you do not want one account user with administrative privileges on Vista because the administrator account integrated (normally only used in emergencies) is disabled by default. If you use as an administrator for your daily work, and this account is corrupt, things will be difficult.  It is not impossible to activate the built-in administrator to rescue things, but there may be more that you want to do. Better not to put you in a bad situation at first.

    The user account that is for your daily work must be a Standard user, with the extra administrative user (call it something like 'CompAdmin' or 'Tech' or similar) only it for elevation purposes. As a user Standard is recommended for security reasons and will help protect your computer against infections. After you have created "CompAdmin", connect to it and change your normal user account Standard. Then log on to your regular account.

    If you want to go directly to the desktop and ignore the Welcome screen with the icons of the user accounts, you can do this:

    Start Orb > Search box > type: netplwiz [Enter]
    Click continue (or provide an administrator password) when you are prompted by UAC

    Uncheck "users must enter a user name and password to use this computer". Select a user account to connect automatically by clicking on the account you want to highlight and press OK. Enter the password for this user account (when it exists) when you are prompted. Leave blank if there is no password (null). MS - MVP - Elephant Boy computers - don't panic!

  • Why can not reset my account microsoft xbox live

    I called microsoft several times asking them to update my email address and password and they ask me the password of the old e-mail address and I tell them that I do not remember a password seven year to a seven-year old e-mail and more sad about this is I'm stuck on my xbox live account and cannot sign in knowing that the old password e-mail address. Could someone help me you can email me at thanks a lot.

    Hello

    Check out these links:

    Xbox LIVE connection issues:

    http://support.Xbox.com/en-us/billing-and-subscriptions/Windows-Live-ID/Xbox-Live-sign-in

    Find your account Microsoft or the password:

    http://support.Xbox.com/en-us/billing-and-subscriptions/account-management/forgot-Microsoft-account

    Also check out this link to reset the password:

    https://account.live.com/ResetPassword.aspx

    For more information contact Xbox Forum:

    http://forums.Xbox.com/xbox_forums/xbox_support/default.aspx

    I hope this helps!

  • Suddenly, MB Pro can not save on Time Capsule

    A month earlier, out of nowhere, I get a time error message:

    "Backup failed."

    Time Machine could not save in "XXX Time Capsule."   Then in details:

    "Time Machine could not complete the backup for"XXX Time Capsule".

    "The backup disk image" / Volumes/XXX of MacBook Pro (4) .sparsebundle of the Time Capsule/XXX ' could not be found (error (null)) "." "

    Have restarted the T.C. and just updated the firmware - no help.  OS X version is up-to-date.  Nothing has changed I know. Full to 98% of the time Machine, but it has been like this for a long time and just deletes old entries, as it should.

    Any thoughts?  I was able to empty the contents of the time capsule, I suppose, if being near capacity could be the culprit.   ???

    Thank you!

    Being near capacity should not be the problem, but of course, everything is possible.

    If Time Machine backups are essential for you, I suggest that you check first of all in existing ones to another drive. Then erase the time Capsule drive and start a new Time Machine backup.

    You can do both archive and delete measures directly from AirPort Utility, as follows:

    • Run the AirPort Utility and then select the time Capsule.
    • Select Edit.
    • Select the disks tab.
    • For the process of archiving, select Archive disk...
    • For the delete process, select erase disc...

Maybe you are looking for

  • my button send is not put in evidence

    When I send a new email, the button send is not put in evidence and you can't tap to send mail, what is wrong

  • HP bac Bar

    I have the Bing bar HP installed but you don't see the option of smart printing? all ideas Thank you

  • Dell Latitude D610 dvd burner problems

    Help! I have a computer dell laptop latitude d610. It came with dvd - rom. I bought a dvd on ebay writer who was supposed to be plug-and-play. It plays CDs and DVDs, but when I burn a cd or dvd, it burns fine and they will play in other PC, but will

  • How to remove the internal contacts of Web site reports and remittances form?

    HelloThere used to be an article about it previously under the support of old, but I can't find them moreI would therefore delete the activities of people internally at my company of all Web site traffic reports and also to form presentations as it m

  • Click box not open URL, only in preview

    I put my boxes click to open in a new window, but they only work in Preview Mode.  When I publish to SWF they do not open and the project remains static.  I disabled blocker in IE and Chrome.  Help!