Help please resetting a listener

Hi,
Im trying to create a game for my 1 year old in flash that
shows a letter on the screen. He has to press that letter on the
keyboard to move on to the next letter.
So far Ive got this...(for letter a)
Code:
stop ();
var myListener:Object = new Object();
myListener.onKeyDown = function() {
if (Key.getCode() == 65) {
play();
Key.addListener(myListener);
the problem is, when I get to letter b and put this...
Code:
stop ();
var myListener:Object = new Object();
myListener.onKeyDown = function() {
if (Key.getCode() == 66) {
play();
Key.addListener(myListener);
"a" still works. How can I make it so the listener, "resets"
or "forgets" any previous letter?
Thanks!
Rich

Use Key.removeListener;
Your code:
stop ();
var myListener:Object = new Object();
myListener.onKeyDown = function() {
if (Key.getCode() == 65) {
// remove this listener and move on...
Key.removeListener(this);
play();
Key.addListener(myListener);

Similar Messages

  • Is there a way to reset my messages account, I can't get iMessage to work on IPad nor Mac osx. Help please this is really frustrating.

    Is there a way to reset my messages account, I can't get iMessage to work on IPad nor Mac osx. Help please this is really frustrating.

    Hi,
    Is there an iPhone involved ?
    If not, what happens  if you remove the Apple ID on the iPad and then set it in Airplane Mode (allow a couple of minutes at this point) followed by re-adding the Apple ID ?
    What, if any error messages are appearing on the Mac when you try to launch the App or Login to the iMessages server ?
    Is the Apple ID linked to an iCloud account ?
    In Messages 7 (Mountain Lion) this did not seem to be important but it seems it is in Mavericks/Messages 8
    9:14 pm      Friday; April 11, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • When I try to reset my iPad mini it keeps asking for  a passcode! have tried restoring, connecting to iTunes and looked for the 'set up as new iPad' notification, but nothing is working? can anyone help please?

    I know my passcode is correct but when I try to reset my iPad mini it keeps asking for  a passcode! have tried restoring, connecting to iTunes and looked for the 'set up as new iPad' notification, but nothing is working? can anyone help please?

    If the iPad was running iOS 7,  iCloud: Find My iPhone Activation Lock in iOS 7
    http://support.apple.com/kb/HT5818
    How can I unlock my iPad if I forgot the passcode?
    http://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.html
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    Saw this solution on another post about an iPad in a school environment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just cancelling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • Help please - An email address that I rarely used several years ago got reset to someone else's apple ID in place of the email account they used to create their account. How can this happen?

    A friend accused me of switching an email account that I used several years ago to send them photos on Flikr (gmail) for their Apple ID - in other words of.messing with their account. I only used the gmail account to post / send them and several other people photos on a few occasions and have not used the account since. I forgot that I had it. When this friend couldn't access their iTunes account the store discovered that the email had been reset to my very old gmail address. How is this possible? Now, they are accusing me of hacking in although no purchases were made and nothing was done with the account. Still, my reputation is at stake. Could they have done it in error? It looks bad for me. Help please.

    I made up the names edward and daniel, it's not actually anyone's email address, so no need for concern.
    In practice, I'm sure you're right that I would have fewer problems with a longer, more complex email address. But in principal, the problem remains. I could sign up for the Apple ID
    1234.NoOneWillEverUseThisAddress.5678@gmail
    and someone else could sign up for the Apple ID
    1234.NoOneWillEverUseThisAddress.5678+1@gmail
    and apple would have no problem with it, even though for all intents and purposes it's the same email address. So the problem is not just the ambiguity of my, to use Dahveed's words, overly simplistic and unsophisticated, email address:
    there is a fundamental flaw in the way Apple links email addresses to accounts that allows for this ambiguity.  If they followed the same conventions that gmail did, there would be no possibility of this problem.

  • Safari 5.0.6 repeatedly crashes.  MacBook Pro 10.5.8  I've emptied cache and reset to no avail.  I've tried solutions found in other threads.  Help, please.

    Safari 5.0.6 repeatedly crashes.  MacBook Pro 10.5.8  I've emptied cache and reset to no avail.  I've tried solutions found in other threads but the more advanced don't seem to apply to me. Help, please.

    Not sure what other tests they could run for me. I've pretty much run all the tests I can using Drive Genius and Tech Tool Pro 5. Is there anything they use that I don't know about??

  • I would like to reset my balance on the account. Help please.

    I would like to reset my balance on the account. Help please.

    Contact iTune Support
    http://www.apple.com/emea/support/itunes/contact.html

  • After my iphone4S update to 7.0.6, it have a problem that keep searching network then no service show on display. Can't call. I have try check sim card, reset network settings, and restore my iphone. Still not working at all. Need help please.

    After my iphone4S update to 7.0.6, it have a problem that keep searching network then no service show on display. Can't call. I have try check sim card, reset network settings, and restore my iphone. Still not working at all. Need help please.Urgent.TQ

    Izit software or hardware? Confuse:(
    Only can use wifi now.
    Any way thanks guys for ur suggestion:) amishcake and simes

  • Please help, I reset my Apple Id and my iMessage is working properly on my iPhone but now all of the conversations on my Macbook say "offline"

    Please help, I reset my Apple Id and my iMessage is working properly on my iPhone but now all of the conversations on my Macbook say "offline"

    Hello sydney235,
    You may need to update your MacBook Air with your new Apple ID password.
    OS X Mountain Lion and later: Open the Messages app, select Messages > Preferences, then click the Accounts icon.
    If you signed out before changing your Apple ID password, click Accounts and enter your current Apple ID to sign in.
    If you're still signed in with your previous Apple ID password, click Accounts, then select your previous Apple ID from the list of accounts. Click Sign Out, then click Sign Out again when asked to confirm. Enter your current Apple ID to sign in.
    Apple ID: What to do after you change your Apple ID
    http://support.apple.com/kb/HT5796
    Cheers,
    Allen

  • My grandsons new Apple refurbed 35g ipad keeps locking up with a black screen amd nothing else. I have reset it many times pressing the home and off buttons together but uit keeps locking up. Help,please!

    My grandsons new Apple refurbed 35g ipad keeps locking up with a black screen amd nothing else. I have reset it many times pressing the home and off buttons together but it keeps locking up. Help,please!

    Thank you for trying to help. I followed your instructions, it took 6 hours to download, and then said it could not solve the problem (something to do with error 9?). It will have to go back to Apple - its only 3 days since it came out of the package and its very disappointing for him. Looks like I have to hang around in the Apple store in Plymouth all tomorrow until they can fix it, or will change it. Thanks for your help.

  • Apple shop changed my iphone 3gs today, got home and cannot join my wifi. both my mac and ipad is working on wifi. tried rebooting, resetting still doesnt hold the wifi, it's there for a sec then its not connected.help please?

    Hi,
    Apple shop exchanged my iphone 3gs today. got home but it doesnt pick up the wifi. first the correct supplier appears then it says not connected.
    both my mac and ipad is working on wifi (so did the previous phone) i ve tried rebooting, tried reset supplier...nothing works. can someone help please?
    thanks

    Yes, they should be able to verify that WiFi is working properly. If I just got a new phone & it didn't work perfectly, right out of the box, before I started restoring or whatever, I'd be right back where I got the phone.

  • My touch screen is not responding, I have reset the phone, plugged into different charger and tried to update it to itunes but they will not connect because I cannot put my passcode in, HELP please!

    My touch screen is not responding, I have reset the phone, plugged into different charger and tried to update it to itunes but they will not connect because I cannot put my passcode in, HELP please!

    ME TOO.  NOW MY IPHONE 6 PLUS IS SAME LIKE YOU.
    iphone is diabled- connect to iTunes because i forget passcode.
    i cannot connect iTunes because it's always asking to enter passcode on iphone.
    So, i cannot make restore my iphone 6+. And then, I cann't erase "device" in icloud.
    My iphone is new. No icloud. didn't connect to itune backage.
    That's why I try to connect iTunes but it need to enter passcode.
    So, my iphone just keep "iphone is disbled-connect to iTunes".
    IPHONE 6 PLUS

  • Please help me reset my canon Rebel T5 1200D to factory defaults. I do not have tools #3

    Please help me reset my canon Rebel T5 1200D to factory defaults.  I do not have tools #3

    Hi Vicki214!
    Welcome to the Canon Forum.
    Some menu options are not available when the camera is set to the Full Auto mode.  Turn the Mode Dial to P, Tv, Av or M, then search for the option you are looking for in the menu.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • 30Gb Gen 5 won't reset, Help please

    Hi folks
    Ipod started playing up today - very slow menu movement. had it in my dock when it froze. I pressed the off button on my dock remote and it switched off as normal. went back to it this evening and it switched on frozen. So I thought i'd do a reset. plug into computer, computer dings, ipod does not ap[ear on system. flicked onto hold. no difference.
    If the ipod won't go to hold how can i reset????
    Help please
    Bone finder

    Just found out you can reset with out it being linked to the computer. by holding the menu and center button down.
    Bone finder

  • My iPhone 4s was playing music now won't on my sony dream machine how do I fix. "This device is not supported by this I-phone".  I have turned  off phone unplugged sony and did the pin reset on bottom.     Help please I need my tunes

    My iPhone 4s was playing music now won't on my sony dream machine how do I fix. "This device is not supported by this I-phone".  I have turned  off phone unplugged sony and did the pin reset on bottom.     Help please I need my tunes

    Try plugging it up to your computer and launching iTunes and either resetting it to factory settings or resetting to last sync. Hopefully it just noticing it's plugged up to iTunes will fix it. This happened to my friend once and all she had to do was plug it into her computer and that fixed it.

  • After resetting apple ID password succesfuly, I am still unable to access to upgrade apps.  I keep getting the incorrect apple id password.  I don't know who to ask.  Help please

    I forgot the password for my Apple Id account on my Iphone;   I have followed the instructions on how to reset it many times over, I get the message that it was succesful but when I go to try to sign in using the new password I keep getting the message that I have entered the wrong password...   What to do?
    who do I ask?  When I try to get apple support it says that I will have to pay to get help from one of their technician.
    It is driving me crazy.  I am not able to upload apps in my Iphone because of it.
    HELP PLEASE!!!

    You need to switch of Find My iPhone with her Apple ID & password.
    If you no longer have your iOS device
    If you didn't follow the steps above before selling or giving away your iOS device:
    Ask the new owner to erase all content and settings as described above.
    If you're using iCloud and Find My iPhone on the device, you can erase the device remotely and remove it from your account by signing in to icloud.com/find, selecting the device, and clicking Erase. When the device has been erased, click Remove from Account. After you erase the device, you'll need to wait 24 hours before you can activate iMessage on your new device.
    If you're unable to complete either of the above steps, you should change your Apple ID password. Changing your password won't remove any personal information that is cached on the device, but it will make sure that the new owner can't delete your information from iCloud.
    Deregister iMessage if you're switching to a non-Apple phone.
    If you're using Apple Pay, you can also remove your credit or debit cards at iCloud.com. Just choose Settings to see which devices are using Apple Pay, then click your device and click Remove next to Apple Pay.

Maybe you are looking for

  • What is" LINE-COL2 = SY-INDEX ** 2."

    can u explain what is '' ** " FIELD-SYMBOLS <FS> LIKE LINE OF ITAB. DO 4 TIMES.   LINE-COL1 = SY-INDEX.   LINE-COL2 = SY-INDEX ** 2.  "what this will do   APPEND LINE TO ITAB. ENDDO.

  • Week Cal HD app removed from App Store because it is too similar to the build in calendar - what is your take?

    Apple apparently removed the Week Cal HD app from the App Store becuase it is too similar to the build in calendar app. I loved that app and am really annoyed that Apple removes an app I paid for, thus making it impossible for the developer to post a

  • Home Hub V2//Fax Connection

    I have recently installed the Bt Home Hub V2. and am using BT Talk with a normal touch phone,not hub phone. Is it possible to connect a fax through this line thus freeing up our home line. I have tried to do this but have only managed to send two fax

  • Printer button invisible in CRXI Designer

    Hi, I'm using CRXI Developer under Windows Vista and XP. Under Windows XP, the dialog "page setup" contains a button "printer" (frame "print options"). This button is invisible under Vista (and Windows 7). The same effect happens with the RDC/VCL com

  • Data Scrolling Issue

    I have an application that shows a thumbnail image inside of a cell in a DataGrid.  Not every row must have a thumbnail but can.  If you have few enough items in the datagrid so that scrolling isn't necessary then you add 2 thumbnails at the top of t