Optimization: Game using the timer. Should I use onEnterFrame listener

I have an app to teach English. You have 20 seconds to answer each questin and progress / timer bar sinks.

I think I read somewhere that the timer takes a lot of CPU, so if we schedule 20 seconds to answer each question, then the timer is still active.

We could use the onEnterFrame event handler just add seconds per image.

Is it much better for our CPU because the game is a bit slow.

the timer does not take a lot of cpu.  It is the function of listener that can occupy a lot of cpu, especially if you call him several times per second.  your timer function performed once in 20 seconds is not a problem.

Tags: Adobe Animate

Similar Questions

  • The time between VISA W/R

    I use VISA in communication series with PIC18F4550 (mcu, USB copy series), I found if I read immdiately afte writing, I can't get the right data all the time. It seems that the time should be at the same time between write and read funciton, and delay must be greater than 0.35 sec.

    Fact delay is necessary or I used to misuse Scripture VISA and playback function?

    Also look at the use of the chariot of termination and the setting of time-out to your advantage.

    1 turn on the tank of termination (depends on YOUR DEVICE PIC18F4550, read the instructions)

    2 set the timeout to something MUCH longer than necessary. (like 1000 ms)

    Write then followed the reading. No delay, bytes read no. to the port

    For the bytes of lonely bytes expected reading feature request.

    The Read function will wait for the full message that ends with the chariot of termination and will return with your message as soon as he gets the chariot of the termination. Or will he wait until the timeout before giving up on your device.

    You can then decide what to do with if time-out error message never comes.

    I have devices that take more than 3 seconds to answer because they have to go do something before they can meet. Some of my exhalations runs to as high as 10 sec. I have set the timeout on the fly, based on the order that I send.

  • I use my MacBook Air as a desktop computer. Should I leave the charger plugged all the time or should I drain the battery and then recharge? What is the best for the battery?

    I use my MacBook Air as a desktop computer. Should I leave the charger plugged all the time or should I drain the battery and then recharge? What is the best for the battery?

    Keep the computer plugged in whenever possible.

    If you keep the computer always connected, make sure that at least twice a month

    Run it on battery until battery charge level falls to about 40-50%.

    Please don't completely discharge the battery. Discharge the battery completely will reduce wear and tear on the battery.

    For more information:

    Section: To optimize the battery life

    http://support.Apple.com/en-us/HT204054

    Citing at the bottom of the linked article.

    "The question is often asked:" should I disconnect my laptop from the mains when not in service? Under normal circumstances it should not be necessary because as soon as the lithium-ion battery is full, a properly functioning charger will stop the load and load the pad will only engage when the battery voltage drops to a low level. Most of the users do not remove AC power, and this practice is safe. »

    http://BatteryUniversity.com/learn/article/bu_808c_what_the_user_can_do

  • When downloading using firefox I should save the download, and then must go to the download file to start the download. When I download using internet explore I can run a download at the time where as it is downloaded. Can I change a setting somewhere?

    I use Windows 7 with firefox as my default browser. When I download a program using firefox, I wonder if I want to save the file, and then must go to the download folder to start the download. When I download using internet explorer, I gives me the ability to run the download at the time where it is downloaded instead of save the download. Is there a setting I can change to allow me to run downloads when using firefox instead of record?

    Hi shortwedge3,

    You can use the OpenDownload2 extension for the run option when downloading files with Firefox

  • Satellite L650-16w - cannot run game using the old GPU driver

    first of all I had to say that my English is not very good, so if there is a German support it would be easier for me to write with German support.

    2 weeks ago, I bought a new toshiba Satellite L650-16w.
    After installing my favorite game, I'm trying to start this game, but I can't because of this error message: "3DGM gm_OpenGLError, param err error:"not enough memory"", last error win32 #8 "»

    After that, I tried the latest driver and installed the driver version 8.723.2 on the home page of toshiba, the amd driver does not work, but the error is still there.
    I tried many things but I wasn't able to run this game on my computer.
    I'm sure it's a problem with the driver because when I uninstalled the drivers launched the game! (there was only the installed windows vga drivers).
    Unfortunately, I had a low fps rate of relay with windows drivers, so I was unable to play this game without the pilots.

    I hope someone can help me to launch this game and there is no solution to run this game on my pc.

    My oem is windows 7 64 bit, and Yes this game still works on win 7 64 bit because I got to play this game on an another win 7 64 bit system.

    Hello

    Usually, you should always use Toshiba driver because drivers are supported for GPU overheating protection.
    If you want to use other drivers, then you can do this at your own risk.

    I googled a bit and found two pages that provide updated ATI drivers the:
    www.OmegaDrivers.net/
    www.laptopvideo2go.com/

    Perhaps one of the pilots of the mentioned pages would you play this game for sure.

  • Hello.  Y at - it a means or an application to stop locking the screen EXTREMELY annoying on the Apple Watch.  It's clearly a myopic element for the Apple team because I can't even use the timer without being incredibly bored.  Thank you.

    Hello.  Y at - it a means or an application to stop locking the screen EXTREMELY annoying on the Apple Watch.  It's clearly a myopic element for the Apple team because I can't even use the timer without being incredibly bored.  Thank you.

    Hello

    You can enable the detection of wrist as well as an access code and unlock it with the iPhone:

    • On your iPhone, in the application of the watch, go to: My Watch (low left tab) > General > wrist Detection - this turns on.
    • On your iPhone, in the application of the watch, go to: Watch My > Passcode > Passcode turn on (choose a Simple 4 digit access code or a longer).
      • Also in the password settings screen, select Unlock with iPhone.

    After putting on your wrist, your watch don't unlock then after whatever you do first: unlock your watch manually or unlock your iPhone. Then, it will remain unlocked until you delete the monitoring of your wrist, when that it locks automatically.

    You can also set your watch to the screen to reactivate automatically when you lift your wrist, even select what is displayed on the screen to wake up:

    • On your iPhone, in the application of the watch, go to: Watch My > General > screen Wake:
      • Active screen Wake on revival of wrist, and;
      • Choose if the watch should resume last activity or see the Face of the watch.
  • Problems with the use of variables at the time of the SV - Loudness.vi

    Hello

    I'm rather new to Labview and will have questions, get my Time-Varying Loudness calcuations out correctly. Attached is my current VI and a .csv file of my data set (calibrated in PA. sampling frequency = 50 kHz for 5 seconds). It does not produce what I expected when I run the VI. Here are my questions:

    Time-Varying Loudness:

    (1) what are the signals so much? There are hundreds of lines, but I only expect one.

    (2) why my category axis are not a range from 1 to 24 years as bark should be?

    1/3 octave Band Analsysis:

    (1) why is it incorrect? Them should not be a linear increase the frequency...

    Data on the one hand be hurry and make a squeek. It is a transient noise that happens about 2 seconds. But, how could I go do a waterfall (Time (s), Frequency (Hz), Amplidtude (sones)) of this signal? Is there an easy way? or do I have to do all three signals and add to make a parcel?

    Thank you very much for your help! Let me know if you need more infromation,

    -Troy

    p.s. I have included a picture of the results as well.

    Hi Troy,

    (1) the SV specific volume VI 'chunks' given in blocks of 2 ms and returns then these as individual plots specific Loudness vs. Sone.  The colored lines that you see in your chart are representative of the 2 500 2 periods of time ms in your acquisition of five seconds.  Each of these plots contains 241 points, however they are ten sample "gradually", one for each sone.  The digital filter buffer takes a bit to fill and kick in properly, however, so you can give your first rows (0-. 02 seconds or more) scrutiny before using them - you can see a number of unexpected zeros around the lower sones.

    2) since you use a chart, the x-axis will be increments every race following (the previous data is stored.)  If you only want to display the most recent data, I would recommend switching to a chart, which is found in the chart controls palette.  Also, see above (#1) why the x axis are longer than 24 points.

    (3) remember that dB is a unitless measure and cannot be used in reference to another value. A typical reference for sound is 20 uPa, but you will probably need even out your data entry and determine/set dB reference.  You can take a look at the voltage from the snout to the Cloaca EU.vi scale (EU means equalized units) and from the snout to the Cloaca Set dB reference.vi.  In your case, I think the plot of Octave shows your dB from a default value of 1.  The values should be accurate with respect to the other, but you must provide a reference value to calibrate the scale.

    (4) I think that this VI is a good example how to do to create a cascade:

    Display cascading for Octave (DAQmx)

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/5562

    You will need to break up of your waveform into pieces, just like the specific volume VI, but the basic concept is roughly the same (take piece of waveform, take octave measure of the piece, add octave output measure cluster to cluster table, repeat for the rest of the waveform display)

    Phew!  It was a bit of information.  Let me know if this makes sense and don't be intimidated by the detail and/or unknown functions or methods - you're definitely on the right track, or to ask it to at least the right questions.

  • The MRT.exe program keeps using 50% of my cpu all the time, how do I stop

    I really need help... After you install the update for the MRT. EXE for it can always stay less and its made my computer run slow and my cpu runs at 10 degrees warmer... I need help it is so frustrating.

    First of all, most of the people who respond on this forum is not related to Microsoft.  Unless the machine is identified as a "Support Engineer" or "Microsoft moderator system" or similar, he or she is not employed by Microsoft.  Thus, one who you "connected direct to" was not one of our "associates".

    MRT.exe is the Microsoft Malicious Software Removal Tool.  A new version of this tool is included in the critical updates each month on "Patch Tuesday" (the first Tuesday of the month).  It must run once - at the time download you - where and then be dormant for the rest of the month, except if you manually start upward.

    Apparently, the nameless person with which you handled has not well understand this.

    Have you ever received a message indicating that the MRT found something?

    Click Start > run and then type the following in the run box, and then click OK
       
    %SystemRoot%\Debug

    A Windows Explorer window will open and you should see - at least - a file named mrt.log.  Well, you will see another file named mrt.log.old, which is the last newspaper of the month.

    Open the file with Notepad mrt.log.  You should see something like the following:

    ---------------------------------------------------------------------------------------

    Microsoft Windows Malicious Software Removal Tool v3.19, may 2011
    Began Wednesday, May 11 01:54:01 2011

    Summary of the results:
    ----------------
    No infections found.
    Malicious software removal tool Microsoft Windows has finished Wednesday May 11 01:57:25 2011

    Return code: 0 (0x0)

    If there is an ERROR in the log, post it here or see http://support.microsoft.com/kb/891717

    MRT.exe does not run continuously.  If so, something is wrong.

    MRT.exe should be located in c: Windows\System32.  If she is not there, look for your entire drive, making sure to check the search options "Search system folders", "search the hidden files and folders" and "Search subfolders".  If you find MRT.exe somewhere other than C:\Windows\system32, it is probably malware masquerading as the real Malicious Software Removal Tool.

    Everywhere where you find it, delete it.  You can download the latest version of the MRT here.

    I also suggest you analyzing your system with free MalwareBytes Antimalware and SUPERAntiSpyware.  Be sure to update both scanners before their execution.

    If, after you remove MRT.exe, you get an error at startup complain that MRT could not be found, download and run Autoruns.  Click the 'Connection' tab and look in the column 'Image path' the MRT.exe.  If it is not displayed in the connection tab, click the "all" tab and use the file > search tool.  A characteristic of the search of Autoruns tool is that you must move the selection under the element line "found" before you "Find Next."  Once you find the entrance with MRT.exe, delete it.

  • Website of the project [should I use 8,16 or 32 bits/channel?]

    Which should I use, 8,16 or 32 bits/channel.

    ORCH.

    Images for the web should always be 8-bit - usually JPG or PNG.

    JPG is best for photos, while the PNG is best suited for graphics with solid colors.

    Use save for Web to optimize images and to define the appropriate pixel dimensions. File > export > save for web.

    There is also new functionality to export, but with the exception of web has more options.

  • When you use the plan of photography can I be connected to the internet all the time? Data are always deducted when using Photoshop or Lightroom?

    When you use the plan of photography can I be connected to the internet all the time? Data are always deducted when using Photoshop or Lightroom?

    You should not have a permanent internet connection.  You should only be connected when the software must check whether the subscription is still valid.

  • Wait for the timer using a random time

    I created the workflow that 99% of the time. The 1% that they do not work is because they are trying to post data to a wiki via a call to rest JSON at the exact same second based on the workflow runtime in vCO. If I put in a task wait time I can't understand how I would go about setting the attribute to wait a random amount of seconds. If I just said to wait 1 minute it will still work in the same question which won't help. Also, by saying that it runs to a point in the future not working as both the workflow would use the same code to decide the future time.

    Did someone come up with a way to generate a random number (do you think seconds) with a maximum which could then be passed to the attribute? This would not guarantee but should significantly increase my chances of several workflow calling is not the wiki at the same time. Yes, ideally the wiki would be able to handle this but it can't so I have to find a workaround. Thanks for any help.

    var num = Math.floor(Math.random()*(max - min)+min);
    System.log("Random Number between "+min+" - "+max+": " +  num
    

    You can go there. Just to provide a value for the min and max and you will have a random number generated

  • Please, I do not paid my plain of adobe, so hd it s cancelled... ok... but only on a few days, I paid. My payments, today, it's okay, bur, all the time I've opened my train, I get messages talk only, I have a few days to use my software... like "you hav.

    Please, I do not paid my plain of adobe, so hd it s cancelled... ok... but only on a few days, I paid. My payments, today, it's okay, bur, all the time I opened my train, I get messages talk only, I have a few days to use my software... like "you have 02 days expire your Adobe CC '... I try to charge my computer... and many other ways to solve this case, but I didn t have successul... Someone help me? TKS!

    You bought the CC on 24-01-14, which was cancelled & then you bought new CC 07/09/14, the error message you receive is due to the cancellation because the server tent to remember, please disconnect & reconnect the CC Office application to activate the new cc. The problem should be solved.

    You have 20 GB of space, stating that you have active CC.

    Concerning

    Baudier

  • Use the Timer event or keyboard in the same frame

    Hello

    I am trying to create a model of proof-of-concept/work for an exercise of e-Learning, that I can build and then on. 16 words are presented randomly (no times) split into frames to 1000ms each. The user can react either by pressing/touch a button or not urgent/touch the button. If they do not press/touch the button the should forward an image after 1000ms randomly framework/Word depending on (Timer event). If they decide to touch / push button (mouse event) before the auto-advance (event Timer) 1000ms, it must move immediately to the next random chassis/Word and do not wait for the rest of the 1000ms.

    I can create a feature on the first image to move randomly, use a Timer event listener or the mouse event listener. But I can't understand how to use both. In addition, while the Timer event seems to work OK on the first image, iteration on executives, the mouse always event occurs, if selected by the user, other than the first image frames.

    (An alternative would be to use one area of text on a single image, the way random words, the array of 16 words.) But that would present a similar problem to change after 1000ms or if the button is press/touch, change immediately.)

    So far, with modest skills in AS3, I could not get my brain around using these events and on the frames.

    Any help would be appreciated.

    Kind regards

    Then mark this answer as being correct.

    This thread is far enough from the original version so, start a new thread if you have a different problem.

  • Can I use the Time Capsule wireless for multiple computers without using it as a router?

    I am looking for an external backup for 2 computers drive.  I have a desktop iMac and MacBook Air.  I like the idea of being able to back up my MacBook Air wireless, but I need to make sure that it will work the way I need to.

    I already have a wireless router that works well for me, I don't need the time Capsule to act as a router. I'm just needing a wireless backup drive.  So, the question is, can I use the only time Capsule as a storage device for backup of wifi or do I also have to use it as a wifi router?  My fear is that the router service is not as good as the router, I currently have.  I live in a big House of 2 floors, making it very difficult to receive a strong signal throughout the House.

    can I use time Capsule only as a backup wireless storage device or do I also have to use it as a wifi router?

    Time Capsule need to connect to your router/modem existing using wired Ethernet wired, permanent.

    If you plan to use the time Capsule to back up your Mac with the help of the application Time Machine on every Mac, the Mac will have to save on the wireless signal Time Capsule for the process to be officially supported by Apple.

    While it is possible to turn off wireless on the Time Capsule and try to save it to your existing wireless network... and it pourrait work... but there will be no Apple support backup problems... so it would be a good idea to plan to use Time Capsule wireless backup purposes.

  • Why am I getting the message «It seems that you did not start Firefox for a while...» "When I use it all the time?

    It may have been a recent update, but it says that I have not used Firefox for a little while when I used it this morning. What is only a function of the update? I expect that if Firefox knew how long since I used it, it would not give this message.

    Ignore this message!

    From what I've observed, a Firefox update will cause Firefox 'watching' the time of the profile file stanps and perhaps trigger this alert. I do not know exactly what or how many parameters involved in Firefox "decide" display this alert message, but as long as you are not having problems with Firefox do not respond to it.

Maybe you are looking for