My Timer and Score keeps returning to 0 Themai

Is the main problem I've seen is my score and the timer. I made it so when you collect 5 points for recycling, you are taken to another page with facts, and when you are taken back to the game that the score goes back to 0 and the timer then goes to 0 as well. Any ideas. Here is my script so far.

STADIUM:

Stop();

Adds a new table

var score = 0;

Made a new chart

var a = new Array()

push objects on the list

a.push (bat);

a.push (bot);

a.push (CAN1);

a.push (CAN2);

a.push (Box);

a.push (Glass);

a.push (Milk);

a.push (News);

a.push (Phone);

a.push (pizza);

var = 75 countdown

addEventListener (Event.ENTER_FRAME, countdrops);

function countdrops(e:Event) {}

countdown.

if (count < = 0) {}

count = 75;

has [Math.floor (Math.random () * a.length)] .addEventListener (Event.ENTER_FRAME, sensors);

}

}

var droppedText:TextField;

var caughtText:TextField;

var: score: uint = 0;

* Bat.addEventListener (Event.ENTER_FRAME, sensors)

Bot.addEventListener (Event.ENTER_FRAME, sensors)

CAN1.addEventListener (Event.ENTER_FRAME, sensors)

CAN2.addEventListener (Event.ENTER_FRAME, sensors)

Box.addEventListener (Event.ENTER_FRAME, sensors)

Glass.addEventListener (Event.ENTER_FRAME, sensors)

Milk.addEventListener (Event.ENTER_FRAME, sensors)

News.addEventListener (Event.ENTER_FRAME, sensors)

Phone.addEventListener (Event.ENTER_FRAME, sensors)

Pizza.addEventListener (Event.ENTER_FRAME, moveme) * /.

var timeDisplay:TextField = new TextField();

addChild (timeDisplay);

var startTime:int = getTimer();

addEventListener (Event.ENTER_FRAME, showClock);

function showClock(event:Event) {}

//milliseconds spent

var timePassed:int = getTimer() - startTime;

//Compute minutes and seconds

var seconds: int = Math.floor (timePassed/1000);

var minutes: int = Math.floor (seconds/60);

seconds = minutes * 60

//convert to the chain of the clock

timeString var = minutes + ":" + String(seconds+100).substr (1,2);

//show in the text field

timeDisplay.text = timeString;

}

function moveme(e:Event) {}

Sent down point 3 pixels per image

e.target.y e.target.y + 5 =

{if (Bin.hitTestPoint (e.target.x, e.target.y, true))}

e.target.removeEventListener (Event.ENTER_FRAME, sensors);

e.target.y =-40;

score ++

if (score > 4) {}

removeEventListener (Event.ENTER_FRAME, showClock);

removeEventListener (Event.ENTER_FRAME, countdrops);

Bat.removeEventListener (Event.ENTER_FRAME, moveme);

Bot.removeEventListener (Event.ENTER_FRAME, moveme);

CAN1. RemoveEventListener (Event.ENTER_FRAME, moveme);

CAN2. RemoveEventListener (Event.ENTER_FRAME, moveme);

Box.removeEventListener (Event.ENTER_FRAME, moveme);

Glass.removeEventListener (Event.ENTER_FRAME, moveme);

Milk.removeEventListener (Event.ENTER_FRAME, moveme);

News.removeEventListener (Event.ENTER_FRAME, moveme);

Phone.removeEventListener (Event.ENTER_FRAME, moveme);

Pizza.removeEventListener (Event.ENTER_FRAME, moveme);

stage.removeEventListener (KeyboardEvent.KEY_DOWN, KeyPressedDown);

stage.removeEventListener (KeyboardEvent.KEY_UP, KeyPressedUp);

stage.removeEventListener (Event.ENTER_FRAME, moveChar);

stage.removeEventListener (Event.ENTER_FRAME, moveBin);

removeChild (timeDisplay);

gotoAndPlay (4)

return

}

caughtText.text = "" + score

trace (score)

{ } else if(e.target.y>stage.stageHeight) {}

}

}

OF FACT PAGE:
Stop();
Cont.addEventListener (MouseEvent.CLICK, start);
Continuous function (event:MouseEvent) {}
gotoAndPlay (3);
}
var b = new Array()
b.Appuyez ("glass can be recycled almost never. He wears. »)
b.Appuyez ("most bottles and jars you use contain at least 25% of recycled material.")
b.Appuyez ("the energy saved by recycled just one bottle could light a bulb 100 watts 4 hours.")
b.Appuyez ("recycled paper uses 70% less energy.")
b.Appuyez ('98 tons of various resources are required to make a ton of paper.")
b.Appuyez ("75% of every tree that is cut down for paper No is not used in a paper product.")
b.Appuyez ("we get through almost 3 billion disposable diapers each year in the United Kingdom only and about 90% of them end up on landfill sites.") Disposable diapers were 500 years to decompose. »)
b.Appuyez ("every ton of recycled paper saves 17 trees.")
b.Appuyez ("glass can be melted down to make new glass. Recycling centers must sort glass by color. »)
b.Appuyez ("in France, most grocery stores sell drinks in glass bottles that can be returned for a new filling.")
b.Appuyez ("cut into thin strips and tied together plastic bags can be reused to knit or crochet bags, handbags and clothes.")
b.Appuyez ("buying used clothing at a consignment or thrift stores help save energy because it prolongs the life of a garment.")
b.Appuyez ("recycling one aluminum can saves energy - enough that you can run a TV for three hours or a four-hour 100 watt bulb.")
b.Appuyez ("steel boxes are used for packaging of more than 1,500 different kinds of food, according to the Steel Recycling Institute.")
b.Appuyez ("every year, we have need of a forest the size of Wales to provide all of the paper we use in Great Britain.")
b.Appuyez ("an average person throws 74kg of organic waste annually, which equals 1 077 banana skins.")
b.Appuyez ("each day 80 million food and drinks cans end landfill - what is cans of food a year and a half per person.") In one year, each person could fill a bathtub with the content of these cans. »)
var textNumber:Number = Math.floor (Math.random () * b.length)
textField.text = b [textNumber]
Thanks in advance

One way would be to have all the this initialization code a front bezel frame of SCENE real where the interactivity occurs, and when you return to the page MAKES you'll which frame and not the one entered with the code in it.

Another way would be to make the FACT page a movieclip and control its visibility instead of equity in a separate section that you are traveling to.  In this way, that you never leave STEP section so that the code will not be reset.

In both cases, you must have the code STAGE extended for the duration of the timeline so that the current values are kept.

Tags: Adobe Animate

Similar Questions

  • Please can someone advise what I need to do to get rid of a pop-up window? The window says "(ce Mac ne peut pas connecter à iCloud en raison de problème avec, j'insère mon adresse d'e-mail ici)." I entered my iCloud password several times and it keeps pop

    This window continues to appear even if I get back my password to iCloud as requested.

    < image edited by host to remove personal information >

    Bed of the window pop up. "The Mac cannot connect to iCloud due to a problem (insert my iCloud email address). ICloud Open preferences for this problem".

    I did it many times and it keeps popping up. I have restarted my computer, deleted the history etc, but it always appears. Any suggestions please

  • My date/time settings mobile keep returning to time and dates in the past frequently, is there a fixx for this problem?

    My Lenvo V570 keeps returning to different dates/time in the past, and he is only 6 months old? It has Windows 7 64 bit os. At an i5 QuadCore Intel processors inside. Is there a software fix or patch to stop this problem?

    Lisa,

    A low CMOS battery can sometimes various issues, including slow, locking unexplained performance issues as well as others.

    It is quite rare, but the battery is relatively easy to replace, check the manual of your computer/motherboard for replacement details.

    Generally, the battery is a watch battery "CR2032", about the size of a nickel.

    I have yet to see a laptop whose battery is easy to replace...

    Here is a simple test to check if the battery needs to be replaced:

    1. Start the computer in Mode without failure.
    2. Set the date and time.
    3. Stop the machine.
    4. Remove the battery from bit and disconnect the machine from the sector.
    5. Wait at least 24 hours.
    6. Start the computer in Mode without failure.
    7. Check the date and time.
    If the time is incorrect then you are probably dealing with a flat battery from motherboard. You will probably get the machine to replace unless you have good skills in disassembly of electronic components.
  • Smartphones blackBerry how to remove an email 'saved' from your torch? (I'm constantly four new messages on the phone all the time and can't get rid of them!)

    Hi all

    I am somewhat a dufus and a few minutes ago has managed to highlight four emails (that I had intended to remove a small group), but managed to click on the "SAVE MESSAGE" by mistake. (Touch screens, bloody!)

    It has a small window saying "BACKUP MESSAGES", and since then, even if later I deleted the four emails, have a permanent icon red STAR on two of my email accounts, which indicates that there is a session of NEW MESSAGES waiting to be read - but are not everything.

    Also - at the top of the screen on the home page of the torch, in the same vein where the SOUNDS and the GLASS GROSSISSANT icon, I constantly for the symbol for 4 EMAILS sitting there, which usually only appears when there are actually four new e-mails waiting to be read. When I actually select the email icon, it only shows nothing - it's because there is NO NEW MESSAGES!

    Jeezzz... It was like him for 20 minutes, but he's really starting to annoy me! I did a power of battery pull reset hoping that it would open up when it re-initialized - but he didn't. The * beep * things me are still there watching. It seems that I have now deleted these four emails I've "saved", that I now can't access it to "possibly" the.

    Oh, and I do not use Exchange or something like that. I just got a bog standard torch, which simply reads a number of my POP email accounts Therefore, they are not saved on a Server Anywhere, as they were (at least 2 days) old emails that were downloaded on my computer for a long time and are no longer sitting on a server anyway - so God only knows where they have in fact been saved to.

    Help!

    HM.  Good, I don't save my messages, but let's try it.

    Open a folder of messages, press the BB menu button and select view folders.  There must be a folder for saved messages available.

  • I've updated Firefox about a dozen times now and it keeps returning to 3.65 and telling me I should update. What a waste of time. Is this a common problem? I am running Windows 7 Ultimate 64-bit.

    I got messages from Firefox should I put updated since Version 4 of Firefox. I tried to update the version 2 or 3 times on each firefox. Usually, it ends and shows me that I have updated. But the next time I start firefox, it's back to version 3.6.23 again and telling me that I should update. I feel like I'm in Groundhog Day. I remember to update this computer to Version 4 of Firefox, Version 5 and yesterday in 7.1. What is going on?

    More system details list in the first post does not display the relevant changes to general.useragent prefs, so you probably didn't put up-to-date and always run the version of Firefox 3.6.23.

    You can check via help > on the window.

    If there are problems with the implementation at day then best is to download the full version and uninstall the currently installed version and remove the Firefox program folder to remove all remaining files.

    • Uninstall your current version of Firefox.
    • Do not remove the data of a personal nature when you uninstall the current version or you lose your bookmarks and other data in the profile folder.
    • Delete the program folder Firefox before installing newly downloaded copy of the Firefox installer.
    • It is important to remove the Firefox program folder to delete all the files and make sure that there is no problem with the files that were the remains after uninstallation.

    Your bookmarks and other profile data stored in the Firefox profile folder and will not be affected by a relocation, but make sure that you do not select delete data of a personal nature if you uninstall Firefox.

  • Correction of my date of birth - tried several times and he keeps asking rest me my security questions (no ANSWER them but reset them). Shut up always back on reboot issues. There is no 'save' button once you make the correction.

    In the account settings my date of birth is incorrect (year) - I tried several times to fix it, but it keeps forcing me to reset my security instead of just answering q. No 'Save' button then tried just 'enter' or 'done'... once more, I get looped back to reset my Q & a I'll be ten years younger, if that's what Apple wants, but it should be fixable.

    Contact Apple:

    Contact Apple for assistance with the security of the Apple ID - Apple Support accounts

  • I get a major update, KB2538242, to install, I installed 31 times now, but keeps returning

    It's ALL new for me. I don't know if I'm answering Dena or I answered myself. In any case, I have Windows Vista Home Premium 32-bit, IE 9. No remedy online were working. Microsoft Solution Center & Community, no responses.  I called Microsoft and got a tech and after 4 hours on the phone, it has been resolved. The tech had to install a program called Revo Uninstaller Pro 2.5.8.  A ran this program and then installed Windows Installer. And which clarifies that headache.  The problem was that I couldn't install some updates. I kept getting an error code 80070641 and another error code just the number 641.

    Now I got another problem, I receive a significant update to install.  I installed this update 31 times now and he comes back and it was installed successfully every time. The update is as follows - update of security for Microsoft Visual C ++ 2005 Service Pack 1 Redistributable Package (KB2538242).

    Separated from the:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_other-windows_update/updates-not-responding-error-code-80070641/446c108b-3222-46F9-AD2C-05dd231fd071?page=6&TM=1335901630660

    Hi the Micksterr,

    Glad to know that the problem is resolved. So, now, you are dealing with the same update offered several times after its installation. Follow the troubleshooting steps in this document and let us know it they solve your problem.

  • How can I set the time and date of return on the office toolbar?

    After a lightning storm and some internal power outtages I noticed my clock disappeared from the office toolbar.  How can I get that back?  It is not no matter what another user of the user profile because I am the only user of this desktop computer...

    Type Notification area in the search box to start.

    Select Notification area icons in the list

    Select icons system Turn On or Off, at the bottom left

    In the drop-down next to the clock menu, select enabled.

  • When I download Thunderbird, it continues to freeze every time I open it. I uninstalled and reinstalled several times, and it keeps it doing.

    It is said that it does not.

    What is your anti-virus software?

  • How can I change the opening page? my previous email provider not exisits more time and it keeps saying "cannot find server" (of course!). I want to change it to open to my g-mail account

    do not know what Search words to get a response... If you can provide THE answer please do. (to avoid the multiple steps) It should be simple... How to change Firefox page opens.

    is my old email account, that doesn't exist longer... you want to change to open again e-address.

    Thank you!

    This page should endeavour to raise your GMail Inbox

    Simple steps to set the home page:

    1. Tools > Options > General\
    2. Above: when Firefox starts: start my homepage.
    3. «"" «Home page, type or paste the URL you want for your home page»»» "
    4. Press 'Ok' at the bottom of the dialog box

    References:

  • I try to get the WI-FI for the 1st time and it keeps asking for my security key where can I find it

    When I try to register on WiFi in theRV Park that we want more security key code where can I find it

    You must ask the RV Park which is the key. It is something that would be set in the router itself.

    I hope this helps.

  • Since upgrading to Windows 10, nd despite reinstall Lightroom, Lightroom from the Creative clouds just keeps crashing.  I've now reached the point that I can't export and must work only on 1 image at a time and keep constantly opening and closing

    Since the upgrade to Windows 10 and despite reinstall it Lightroom. Lightroom from the Creative clouds simply crashes.  I have now reached the point that I can't export and only works on 1 image at a time and constantly keep opening and closing of the software

    Hello

    Please go the Edit option in the library Module, then go in the preferences.

    Go to the performance tab and uncheck the option "use graphics processor.

    Restart lightroom, and see if Lightroom works.

    Please let us know if it helps.

    Kind regards

    Tanuj

  • Delete one sentence at a time and keep the rest

    Hi all

    I wonder how can I do this in the jargon

    I have an XML file that contains 4 sentences. I load these phrases in Director and I would like to allow my users to delete words from the NCB at a time and keep the rest. For example

    Phrase1
    Statement2
    Phrase3
    Phrase4

    If the user selects a 2,3,4 must remain in the display area. If 2, 1,3,4 must remain in the area of the display and so on. The process must continue until there is only one sentence in the window (one of the 4) where the user must open a window of message (game over).

    Do you have any idea how to do that?

    This behavior removes a line when clicked and displays the
    message when there is a single line on the left. You can easily modify it to display
    the message when there are 2 lines to the left, 3, or whatever. It also records the
    complete original list and restores the Member on sprite end.

    Of course, you have to fix induced unintentional line breaks
    your browser/player news.

    property spriteNum, pPhrasesLeftForCompletetion, pPhrases

    on beginSprite me
    pPhrases = sprite (spriteNum) member.text.
    end

    on endSprite me
    Sprite (spriteNum).member.text = pPhrases
    end

    on mouseDown me
    If sprite (spriteNum).member.line.count > pPhrasesLeftForCompletetion then
    lineNumClicked = sprite (spriteNum) .pointToLine (the mouseLoc)
    Sprite (spriteNum). Member.Line [lineNumClicked]. Delete()
    numChars = sprite (spriteNum).member.char.count
    If sprite (spriteNum).member.char [numChars... numChars] = BACK then
    Sprite (spriteNum). Member.Char [numChars]. Delete()

    If sprite (spriteNum).member.line.count =
    pPhrasesLeftForCompletetion then
    updateStage
    Alert ("complete game")
    end if
    end if
    end

    on getPropertyDescriptionList
    Description = [[:]
    description of the addProp, #pPhrasesLeftForCompletetion, [#default: 1]
    [#format: #integer, #comment: "how many phrases on the left indicate full"]
    return description
    end

  • How to transfer pictures from iphone to PC and keep the date, time and place

    How to transfer pictures from iphone to PC and keep the date, time and place

    Hello Grumpelfuerer,

    Thank you for using communities of Apple Support.

    If I understand your message that you want to import your photos from your iPhone 6 s, as well as for your Windows PC. I would like to save my photos on my computer as well. There are two ways to do this. You can use the iCloud photo library allowing to synchronize photos between your devices or import your photos to your PC using Windows Photo Gallery. This article will provide you with the steps that you can use for both options:

    Import photos and videos from your iPhone, iPad or iPod touch

    Best regards

  • While I'm a game my moniyor go black but returns again and it keeps it but what is happening just currently

    Ideas:

    • While I'm a game my moniyor go black but returns again and it keeps it but it's just resentlyesently happens.
    • No error messages error message show
    • Recent changes you made to your computer just to allow the recommended for window update
    • What you have already tried to fix the problem just

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Doris,
    We need more information about your problem.

    What version of Windows and Service Pack do you use?  (e.g. XP Home SP3, Vista Home Basic SP1, etc...)
    This happens with only one game or it comes up with several games\applications?
    If this only happens with one program, which is the program?
    What are your system specs? (PC make\model, speed of processor, amount of RAM, videocard make\model, hard drive size and space available)

    Please post back with the requested information if you still experience this issue.

    Do the system to boot and see if that clears up the issue. Mike - Engineer Support Microsoft Answers
    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for