Complete game within 20 sec

game limit is 1 min but if user will complete game within 20 sec then he will get 500 bonus points
how to code for this
//this is count up timer script
var intID;
var endTime = getTimer()+(59*1000);
makeTime();
function updateTimer() {
  var t = endTime-getTimer();
  if (t>0) {
  makeTime();
  showTime(t);
  } else {
  stopTimer();
  showTime(0);
  gotoAndStop("over");
  trace("lost");
function makeTime() {
clearInterval(intID);
intID = setInterval(updateTimer, 100);
function stopTimer() {
  clearInterval(intID);
function showTime(t) {
  dispTime.text = (t/1000) >> 0;

Wherever in your code where the game is ended, you need to check the time value to see if it is <20 seconds and add the bonus to the score if it is.

Similar Messages

  • Selecting Objects in Illustrator - selecting objects only completely contained within your selection box

    Hi
    Macbook Pro, Illustrator CC 2014.1.0
    When selecting objects in Illustrator using a selection box created by dragging a selection tool, everything that the box touches gets selected.  On programs like AutoCad, there are options to select only what is completely contained within the selection box.  This can be very helpful.  Can one do this in Illustrator?
    Thanks in advance

    I use Illustrator pretty often but I'm not at a level that I understand scripting.  Maybe I'm out of luck then.

  • Developer Studio:Exception:The message server did not respond within 60 sec

    Folks,
    I am getting this error in Developer Studio ( J2EE Engine Preference) , Can anyone please tell me what is the issue.
    Exception: The message server did not respond within 60 sec.Please check if the message server is running and if the socket connection has been established
    Thanks,
    Manish

    If the system information page is showing 3900, you should use 3900 in your studio settings.
    39xx is the new default for 2004s. It was 36xx with 2004. And xx is the instance number.
    Regards,
    Christophe
    Message was edited by:
            Christophe Benoit

  • Lion OK so far, except Windows 7 under BootCamp blue screens within 10 sec of login.

    Lion OK so far, except Windows 7 SP1 under BootCamp blue screens within 10 sec of login.  "Cache_Manager" stop: 0x00000034 is cited, suggesting driver issue, but maybe memory or HD corruption.  Memory (incl. 4 GB RAM) is fine and CheckDisk has been run on partition apparently fixing files hanging from multiple blue screens.  Blue screen not seen under Windows Safe Mode + Network.  Is there a Boot Camp driver issue with Lion?  Any suggestions?

    And you attempted to fix any bad sectors, yes?
    Did you download and use Boot Camp 4.0 drivers?
    The 3.0 was known for some people due to AppleHFS.sys AppleMNT.sys - rename to disable or use 3rd party HFS+ driver would help. HFS filenames with special characters will trigger a 'green bar' in Explorer if you open a folder with such filenames.
    As for drivers... you can try rolling back, restore point, uninstalling, even using 3.0 and upgrade to 3.2 until any issue with 4.0 is fixed and resolved (or bug acknowledged).
    One person (Boot Camp forum) had trouble with 4.0, and downgraded. Also, the Windows Boot Camp OS Switcher (BC control panel) would not function.
    It is always hard to rule out RAM. AHT (not sure how to run on Lion only but you have your OEM DVD), Memtest is more "nothing found" does not mean "no problem." Swapping out RAM is sometimes the only recourse. Windows DVD does have memtest included.
    Disk drives: the manuf. own utility (WD Lifeguard etc) is best tool to find problems, map out bad sectors, restore a drive to health.
    Have not seen any mention though.
    Boot Camp
    Apple Boot Camp Support
    Boot Camp 4.0, OS X Lion: Frequently asked questions
    Boot Camp 4 Lion Installation & Setup Guide (PDF)

  • J2ee connection error, "The Message Server did not respond within 60 sec"

    Hi,
    I am facing the error "The Message Server did not respond within 60 sec. Please check if the message server is running.." when connecting to J2ee through NWDS.
    I am able to reach the index page via http://<ip address>:53500/index.html but yet unable to reach through NWDS.
    I have tried various combinations of host and port names like:
    Message Server Host : <ip address>, <host name>
    Message Server Port : 3636, 3936
    but still no luck.
    I've also cross checked the value of message server port by navigating to http://<IP address>:53500/monitoring/SystemInfo too, it is 3636.
    The telnet test (telnet <ip address> <port Number>) draws a blank window.
    I know this problem has been posted again and again, but then I am unable to understand what is the solution to this.
    Can someone please help me in resolving this issue?
    Note: [link 1|Unable to Connect to the J2EE Server from Netweaver Developer Studio; & [link 2|Developer Studio:Exception:The message server did not respond within 60 sec; are already checked.

    Hi Robin,
    Although I still haven't received any info from my colleagues regarding the central instance..
    Just a quick query, if we have NW04 we use 36** and if it is NW04S then we use 39** , is this the only difference for message server port?
    If that is the case, as I mentioned earlier, I have tried both, and one gave me N/A(3936) while the other gave me 'message server did not respond' error(3636).
    I have the message server host name & port , Enqueue Server Host name & Port and SDM PID and Port details with me..
    Can this be anyway useful in establishing a connection?
    Waiting for your inputs...
    Best Regards,
    Vinay

  • Exception:The messege server did not respond within 60 sec.

    When I am deploying my application it is aborted and displaying the Error as
    'Deployment exception : Cannot determine sdm host (is empty). Please configure your engine/sdm correctly !'
    In Preferences >> SAP J2EE Engine I have specified a messege server host and its port.
    When I go to the Perspective J2EE Engine there I can see an error i.e.
    'Exception:The messege server did not respond within 60 sec.Please check if the messege server is running and if the socket connection is established'
    How to resolve this?

    Hi,
    I think the connection data is somehow not right.
    What is your message server host and port  being configured?
    I think the default message server port is 3601
    Regards,
    Vincent

  • Exception: The message server did not respond within 60 sec.

    Folks,
    I am getting this error in Developer Studio ( J2EE Engine Preference) , Can anyone please tell me what is the issue.
    <i><b>Exception: The message server did not respond within 60 sec.Please check if the message server is running and if the socket connection has been established</b></i>
    Thanks,
    Manish

    Hi,
    I think the connection data is somehow not right.
    What is your message server host and port  being configured?
    I think the default message server port is 3601
    Regards,
    Vincent

  • HT4623 My iphone is draining like crazy. i gets completely empty within 06 hours while idling... i am baffled.. please help

    My iphone is draining like crazy. i gets completely empty within 06 hours while idling... i am baffled.. please help

    There's an app on the phone that is stuck sending data, or trying to send and failing, and in an infinite loop. Mail can do this if you have an Exchange account or iCloud account. Sometimes a corrupt calendar entry or contact can cause this.
    But first, if you have either type of account go into Settings and turn it off, then reboot the phone (hold HOME and SLEEP until an Apple logo appears). If the problem goes away you have identified the culprit. If you turn the account back on and the problem does not come back no further action is required.
    If this doesn't fix it you have to find the app. Any app that exchanges a lot of data (Facebook, Whatsapp, etc) is a possibility.

  • Write the data into a file in 10 ms interval within 10 sec

    Hi,
    I'm trying to write the data into a file when I press a OK button and the data should write in a file every 10ms interval. After pressing the OK button the process will stop after 10 sec.
    I've attached my VI.
    Problem is that I'm getting the result every ms. How can I get the data every 10ms? So it'll come 1000 data within 10 sec.
    For other calculations purpose I'm using Amplitude and Level Measurements block to get the mean DC voltage, so when I change the Samples to Read and Rates, the process is getting stuck.
    Any kind of suggestion is appreciable.
    Thanks,
    Chotan
    Attachments:
    DAQ_Time_Checking_For10s_02.vi ‏131 KB

    See example attached, if needed
    Nghtcwrlr
    ********************Kudos are alwayzz Welcome !! ******************
    Attachments:
    Example.vi ‏36 KB

  • Anyone around here with an apple developer program membership who lives in the us and wants to participate in entering the atari  indie developer challenge for pong? I have the great idea required, ample coding skills and a completed game design document.

    If you have a membership with the apple developer community or know anyone who has and also resides within the united states, please contact.
    The purpose is to partake in http://www.atari.com/pongdeveloperchallenge
    The initial game design document is fully completed and the ideas expressed in it are more than strong enough to compete for the top prizes.
    I'm well versed in different programming languages (c, scheme, js, assembly, python,...) as well as being a proficient sound designer and musician and a skilled graphics and animation manipulator myself. Assistance with the actual development would appreciated but is not really necessary.
    Winnings and proceedings arising from participation would distributed most fairly. If you know anyone besides yourself that is able to help out, you would also be rewarded financially from an ensuing victory.
    Reply to this post, pm or send  a gmail to aelgoa
    Have a good one
    Marnix

    If you have a membership with the apple developer community or know anyone who has and also resides within the united states, please contact.
    The purpose is to partake in http://www.atari.com/pongdeveloperchallenge
    The initial game design document is fully completed and the ideas expressed in it are more than strong enough to compete for the top prizes.
    I'm well versed in different programming languages (c, scheme, js, assembly, python,...) as well as being a proficient sound designer and musician and a skilled graphics and animation manipulator myself. Assistance with the actual development would appreciated but is not really necessary.
    Winnings and proceedings arising from participation would distributed most fairly. If you know anyone besides yourself that is able to help out, you would also be rewarded financially from an ensuing victory.
    Reply to this post, pm or send  a gmail to aelgoa
    Have a good one
    Marnix

  • I can't press done to complete game center account creation

    I've just bought iPad 2 today. I want to make my apple ID available for game center so I do what the instructions said. When I've got to the screen that want me to enter the Nickname, I complete every field there and press done. After that, the screen went loading, and it came back to the same old screen that want me to enter the Nickname. I try many nickname but it won't work. How can I make game center work with this apple ID I already have.Thank you for your answer and sorry for my bad English.

    Bump. Same problem here on new iPhone 4s.

  • [F8-AS2] MC code needed to complete game

    Hi,
    I have a game (stage size 600x350) and a bee that flies
    randomly left to right then right to left across and off the stage.
    That part works great but every now and then it flies too high to
    the top of the stage cutting off part of the movie clip. I would
    like it to not fly higher than y.130 or lower than y.200. This is
    what I have so far and would appreciate some assistance (movie clip
    instance is named "bee") to complete this game. Thanks very much.
    if(_root.bee.direction=="left"){
    _root.bee._x=-250;
    _root.bee.speed*=-1;
    _root.bee._xscale*=-1;
    _root.bee.direction="right";
    _root.bee._y=200 + Math.floor(Math.random()*(10-200+1));
    else{
    _root.bee._x=1000;
    _root.bee.speed*=-1;
    _root.bee._xscale*=-1;
    _root.bee.direction="left";
    bee._y = Math.max (130, clipY);
    _root.bee._y=200 +
    Math.floor(Math.random()*(10-200+1));

    you should google or search this site for optimization (general) techniques and then try to apply that to your code.

  • HT5293 Why does wireshark (1.12.0) crash within a sec after connecting it to XQuartz (2.7.7) ?? have tried to re-install, it doesn't work.

    i have 10.9.4 on my mac, and i need Wireshark to work, because we use it in lectures (in my education,, i'm not english speaking by birth)..
    I have installed Wireshark 1.12.0 and there no prob starting up when its not connected to XQuartz, but it kinda needs that program to work..
    So i've installed the latest version of XQuartz (2.7.7) and now Wireshark just keeps crashing.. i've shut it down, opened it again and it crashes within 1-2 sec.
    I've tried to delete and re-install, did not work..
    Anyone that can help me fix this????

    I got it to work..
    restarted my laptop for the 50th time, opened the program, almost cried, about 2 min. after I opened the program the window showed..
    So now it works, but it loads veeeeeery slow.. But i can live with that..
    And no, that's the only thing i havn't done.. To answer your reply..

  • Mail bombs out within 30 secs of launching - how can I recover?

    Get following report soon after launching mail - what can I do to recover? I can't access my past mail (I do have a back up from a week ago, but would prefer not to have to recover from that.
    Fraser
    Process: Mail [344]
    Path: /Applications/Mail.app/Contents/MacOS/Mail
    Identifier: com.apple.mail
    Version: 4.4 (1082)
    Build Info: Mail-10820000~1
    Code Type: X86-64 (Native)
    Parent Process: launchd [130]
    Date/Time: 2011-02-27 15:22:16.282 +0000
    OS Version: Mac OS X 10.6.6 (10J567)
    Report Version: 6
    Interval Since Last Report: 187012 sec
    Crashes Since Last Report: 11
    Per-App Interval Since Last Report: 181391 sec
    Per-App Crashes Since Last Report: 6
    Anonymous UUID: E9EA9559-C1AD-4E4E-91F5-EF38A418BF74

    Unfortunately, that did not solve the problem. I moved my com.apple.mail.plist file. Started mail and manually configured one of my mail accounts and within a minute or so of starting to download mail, it crashed with exactly the same error. I then repeated the procedure with another mail account incase it was due to a bad message in the first account - same error. I have a hunch that it might be a corruption in my addressbook - On Saturday night my mobile phone OS had an over the air upgrade. When I sync'd on Sunday (using standard apple sync) there were a lot of conflicts to be resolved and addressbook bombed out. Address book appears to be fine now but it is the only thing I can think of. Is there a way of launching mail without it attaching to the addressbook so I can try this theory out?
    Any other ideas?
    thanks, Fraser

  • Airport Express (2009 model) powers off within 30 secs

    I have used my airport express for a couple of months. I went to use it a few days ago, plugged it into the mains socket and reset it. Since then, when I turn on the power, the initial green light comes on followed by less than 25 secs of the amber flashing light - then no light at all.
    Is my AE faulty or is there anything else I need to do.

    Welcome to the discussions!
    You didn't indicate whether you had tried a Factory Default Reset in your post, so if you haven't already done so, try the reset as follows:
    Pull the AirPort Express (AX) from power
    Hold in the reset button and keep holding it in as you plug the AX back in to power
    Release the reset button in 8-10 seconds
    You will need to reconfigure your device again after the default reset. If you try this reset a few times and the device still does not respond correctly, it is very likely that the AX is defective and will need to be replaced.

Maybe you are looking for

  • Why isn't my browser supported?

    One of the challenges of delivering desktop-quality software inside a browser is, well, the browser itself. For more details on our approach to browser support, its challenges, etc. please see the posting on the Acrobat.com blog. http://blogs.adobe.c

  • TS3297 your request is temporarily unable to be processed

    I get a 5002 error when trying to buy music from the itunes store. I cannot change my account details either as I get the message that the request is temporarily unavailable. This was fine until this week

  • Can EE Customer service call me on my phone? I can not call to UK from abroad

    URGENT Can EE Customer service call me on my phone?  I can not call to UK from abroad

  • Aperture 2.0 - first impressions are very good!!

    I downloaded and installed the trial. My hobby is underwater photography so I need an application that provides flexibility with expose. I have imported photos and I am very impressed with how they have turned out. Aperture 2.0 is the best I have use

  • OATS - CapturePage (Web) while working in Forms

    Hi all, Has anyone come across the following before: I'm running a script in Forms. Whereas 'Forms Screen Shot' works perfectly to capture Forms screen shots, I'm having trouble capturing the web based output from one of the Forms in OATS. I tried us