Simple counting the stopwatch will not stop.

Hello

I made a simple countdown timer, it works fine but I wish I had the sign next to the number % so it would look like a pre-order. But as I add the '%' sign to the function, the counting stops (100% more) ever and continues to count.

What Miss me?

var count: Number = 1;
var myTimer:Timer = new Timer (10);

myTimer.addEventListener (TimerEvent.TIMER, count);
myTimer.start ();

function countdown(event:TimerEvent):void {}

myText_txt.text = String ((count) + myTimer.currentCount);

myText_txt.text = String ((count) + myTimer.currentCount)+'%';


If (uint (myText_txt.text) > = 100) {}
myTimer.removeEventListener (TimerEvent.TIMER, count);
}


}

Thank you!

You should learn to use the trace() function to see why things don't work as expected.   The '%' is converting it to a uint not what you expect.  Trace uint (myText_txt.text) and you'll see why comparing the value of a string uint digital a number isn't going to work.  Try instead the following...

var count: Number = 1;
var myTimer:Timer = new Timer (10);

myTimer.addEventListener (TimerEvent.TIMER, count);

myTimer.start ();

function countdown(event:TimerEvent):void {}

myText_txt.text = String ((count) + myTimer.currentCount) + '% ';

If (uint (String (+ myTimer.currentCount (County))) > = 100) {}
myTimer.removeEventListener (TimerEvent.TIMER, count);
}

}

Tags: Adobe Animate

Similar Questions

  • the system will not stop after the new update

    System was updated with the new updated 05/24 and now will not shut without using the power button / stop what happened, how this can be corrected?

    FWIW, software Wacom has started to cause a problem with OSX 10.11.5. If you have installed you need to uninstall or check and see if the latest drivers Wacom released a few days ago helps. If you have any Wacom software, there are some others mentioned in the CSA programs that cause the same symptom. I don't remember which off the top of my head.

  • Program of the end but the computer will not stop

    When I shut down my computer I getEnd bc and end program 3ac errors and it will not be closed.

    Let's start by...

    http://www.Malwarebytes.org/

    Download and scan and remove anything it finds.

    --
    Gina Whipp
    Microsoft MVP (access)

    Please post all responses on the forum where everyone can enjoy.

  • Stuck in the dock icon. The system will not stop?

    After the Java Update 1.8.91, whenever a Java application had been opened and closed again, the Java icon remains on the bench of the accused.

    This isn't the real problem, stop via the Apple menu does nothing. The iMac not simply stopped. OS X 10.11.5. It is somehow in an intermediate state, where no other application opens more.

    Here's what I've tried so far:

    1. Force quit changes logo from Java to a Terminal logo = > icon remains docked, without stop down via the Apple menu.
    2. By dragging the icon Java/Terminal to the desktop or the trash can displays the text "Remove", but won't actually remove the icon. Needless to say: stop always is not possible.
    3. Since the iMac is set up for multiple users, I can change via the user menu in the login window, and here I can click on the icon/symbol of closure. After you enter the credentials of the administrator, the system stops... Finally.
    4. I have already completely uninstalled and reinstalled the latest version of Java (1.8.91). No change.
    5. The strange thing is, there is no Java process visible in the activity monitor or in the Terminal window when you use the top or ps commands...
    6. Disk utility = > first aid doesn't change anything either.
    7. In the console is a warning against a coreaudio with Java incompatibility... But I don't know how it might help the situation.

    I have no idea process to kill or what to install/uninstall in order to launch a 'clean' close.

    Advice or assistance is highly appreciated.

    Thank you.

    The software for a Wacom tablet is known to prevent the shutdown of OS X 10.11.5. If this software is installed and that you no longer use the device, please remove the software. Otherwise, check with the manufacturer for support or an update. Back up all data before making any changes.

  • Cessna aircraft landed but the brakes will not stop plan

    Cessna 172 in fsx, plane lands but the brakes don't plan.

    Hello

    Welcome to the Microsoft Community forums. Thanks for posting the question.

    The description indicates that you are facing any problems working with Microsoft Flight Simulator. I do not understand that you are facing a hard time with the same.

    For assistance with the question, I would say you contact Microsoft Flight Simulator support forums from the following link. They will be able to guide you to the best.

    http://www.Microsoft.com/products/games/FSInsider/community/pages/default.aspx

    See also:

    http://www.Microsoft.com/products/games/FSInsider/tips/pages/default.aspx

    Hope the information is useful. Feel free to post any questions related to the Windows operating system on the forum. We will be happy to help you.

  • What the widget glossary useful when the slide will not stop?

    This is my first day trying to learn 8 Captivate. I created a glossary widget on a white page thought it could serve as a valuable resource. When I preview the it, the widget doesn't even show until most of the other path in life and then stops. I must be missing something obvious, because apparently C8 creates films, not free timed pages. Thanks in advance for your suggestions.

    Rob............

    LOL, the only one of the Adobe engineers can say why it fails to appear for the type 'Play this slide' Preview.

    He does not appear for the next 5 slides or the project, or the preview of the browser?

    As there is an interaction, may Captivate must make before it can present it correctly.

    See you soon... Rick

  • Turn the circle with the slider will not stop in one account.

    Spinning circle with the cursor keeps turning into a single account.  Administrative accounts and others are very good.  It started after the recent release of Windows 7.  I'd appreciate any help.

    Thanks for the follow-up of Ramesh.  My idea of authorization has failed.  Since I knew what program is doing, I did uninstall it and reinstalled.  Who did the trick.

    As always, thanks for the help guys.

  • Loop will not stop when you press the stop button

    Hello

    I have a LabVIEW program that includes a number of loops, but one of my curls (which surrounds a series of functions "Write TDMS") has a Boolean stop that transmits a signal through two GOLD and functions in a control of the loop (see aea of interest). My problem is that when I press the button stop the loop will not stop and will continue to save and write data that I didn't need a file.

    Could someone please help with this?

    Kind regards

    Aaron Broady


  • 18 XPS does not start, the power light will not stop flashing

    I was upgrade this computer to Windows 10, I did install one instead, but the children had spyware which even then showing upwards. I did a refresh, there no I did an installation and finally got in windows. Some updates installed and restarted.

    The computer was bricked since. The only thing that happens is the LED which indicates the power above, the button will not stop flashing white light. Connected or not connected, after having held down the power button for 5, 10 and 30 seconds, the led stops flashing for a while and then again. I tried several points of sale. No idea if it is a coincidental breakdown.

    I'll change that.  I went back in and re-removed the cable from the battery.  I also removed the CMOS battery cable this time... I was at least an error message on the screen and access to the BIOS!

  • HP Officejet Pro 8500 A909 all: sorftware HP installation program will not stop running

    I recently uninstalled the software and drivers for my printer as suggested here.  I installed the drivers and software the latest complete features of the HP customer service.  Now the program will not stop running even after it has completely installed. The disc in the picture will not stop running and the window does not close.

    Hey @David146,

    Welcome to the Forums of HP Support!

    I see that you have some problems with the judgment of some installation of HP software to run on your PC of Windows 10. I can help you with that.

    To start, make sure that the printer is plugged directly into a wall outlet, not a surge protector. Once done:

    1. On your PC, press CTRL, ALT and DEL keys at the same time.
    2. Click Start Task Manager.
    3. Select the HP software from the list.
    4. Click end task.

    Please let me know the results after following the above. If you are unable to resolve your problem, please click on accept solution. If you appreciate my help, please click on the thumbs up icon. The two icons are below this post.

  • Look at the maps app will not stop

    When I look for direction in the maps on the watch application, it will not stop after that. I looked for directions to the airport, and then it does not cancel and kept taking me to the airport. I have ensured the application Maps on my phone was not working and he cancelled it but always watch will not stop.

    I tried it yesterday and now today the watch gives me directions to the airport.

    I tried to remove it from the docking, restarted my watch. Watch app from the phone Checked, but nothing works.

    Hello

    To stop your watch directions: open the Maps app on your watch > firmly press the display > press on for policy decisions.

  • The SPACEBAR keystroke will not stop.

    My iMac recently started having a problem where the system gets a touch SPACEBAR which will not stop. I think that is what is happening based on the spaces added to the text on the screen in different applications, and from the keyboard Viewer which shows the SPACEBAR constantly depressed.

    This isn't a device keyboard problem. I tried several keyboards. I also tried to unplug all connected to the mac and rebooting. The problem persists. I stop after several reboots (which seems a coincidence). I have also reset the PRAM, which seemed to have fixed, but now he is back (after about 24 hours).

    I don't know what else to try. I have not installed new hardware in the computer, since I bought it (upgrade of ram). It worked fine for 1.5 years.

    Try resetting the SMC by iMac SMC and PRAM reset, it may take several resets to work.

  • After the Macbook to Yosemite 10.11.15 update, it will not stop

    I have therefore updated the latest version of Mac OS x at 10.11.15. During installation, all work fine including the reboot and restart the macbook. But when I tried to stop my Macbook, it will not stop. The macbook has not frozen, but the tab is disappear after click on stop. Now, I have the macbook shutdown by pressing the power button / stop. Is there a solution?

    Software for Tablet Wacom has been proven to show this behavior. Uninstall or try to remove your connection point

  • Siri will not stop me give a military even if time the "time of 24 hours' has been disabled in my settings.  How do I change AM/PM?

    Siri will not stop me give a military even if time the "time of 24 hours' has been disabled in my settings.  How do I change AM/PM?

    What you have for country & region and what default language.

  • OfficejetPro8500 WirelessA909g: Officejet Pro 8500 Wireless will not STOP PRINT the PAGES of ALIGNMENT - HELP Please

    I do not see or understand what is my problem. Program will not stop alignment, after I print a page from my laptop or a page of the scanner screen. Does anyone have asolution to this situation. Please advise me how to eliminate program alignment running like a mad man every time I print a copy. Way in advance I thank you...

    Have you done the annular alignment process to stop it?

Maybe you are looking for