Problem removing listener after reload

Note: Using AS2, Flash 8
Here's the setup:
I'm developing a small game based on Wheel of Fortune. The
.swf for the game is loaded into another flash application on
another developer's end. Their application is build like a
slideshow. (switching from one .swf to the next, one of which is my
game)
I have a "board" of letter spaces and an input text field for
guessing the phrase.
The user can either hit letter keys to guess letters on the
board OR click in the input field and guess the phrase. The input
field has onSetFocus and onKillFocus function to prevent both
happening at the same time. Once a user has entered text in the
field, they can either hit a button or press enter to check if it's
the right answer.
Attached at the bottom is a simplified example of the
listeners for key presses and the input field's functions:
Thankfully, all this code works fine, but only the first time
around. If you go back to the game again, it doesn't work the same:
If you start typing in the input field, letters pop up on the board
too. (Which, of course, is not supposed to happen)
I've been able to test this by testing the movie (Ctrl-Enter)
and then hitting Ctrl-Enter again to reload.
After doing a trace(Key._listeners.length); I get 1 the first
time and 2 the second time.
What this tells me is that on the second time around, even
though the input_txt.onSetFocus function should be removing the
keyListener, the keyListener.onKeyDown function is still executing
because there are now 2 keyListeners. (1 is removed, but the other
continues to execute)
I've tried attempting to remove the keyListener before any of
the code above executes, but it seems to have no effect.
How is it possible for there to be 2 listeners by the same
name?
How do I make sure that there is only one listener active?

This is an interesting problem. The Key._listener array must
still live in the cache while Flash is in operation, it seems if
you close down the program and then reopen (like if you shut down
the browser and came back) this doesn't happen, but on reload it
most certainly does.
I have a solution for you. Loop through the array and remove
all registered listeners on reload, place the code below previous
to the registering of the 'keyListener' object:
Hey, what did I win! ;)

Similar Messages

  • Problem removing Listener Service in Clusterware 11g

    It appears that I already have a listener service as shown below, and I am having problem removing this service so that I can create another. I know that I can just add a new listener service for each node, though if anyone would share some insight on how I can remove this listener service ofr Oracle 11g Clusterware with two node cluster, I would appreciate your insight. Thanks
    rac1.respecti.com>./crs_resources.sh
    HA Resource Target State
    ora.rac1.gsd ONLINE ONLINE on rac1
    ora.rac1.ons ONLINE ONLINE on rac1
    ora.rac1.rac1.lsnr ONLINE ONLINE on rac1
    ora.rac1.vip ONLINE ONLINE on rac1
    ora.rac2.gsd ONLINE ONLINE on rac2
    ora.rac2.ons ONLINE ONLINE on rac2
    ora.rac2.rac2.lsnr ONLINE ONLINE on rac2
    ora.rac2.vip ONLINE ONLINE on rac2
    rac1.respecti.com>srvctl remove listener -n rac1 -l rac1
    PRKO-2203 : Listener is running on node: rac1
    rac1.respecti.com>srvctl stop listener -n rac1
    CRS-0210: Could not find resource 'ora.rac1.LISTENER_RAC1.lsnr'.
    rac1.respecti.com>

    Hi, Is there any tnslsnr process running on the node. To understand the problem better, enable the debug trace for the .lsnr resource. You can enable trace by executing the following command as root.
    crsctl debug log res "ora.rac1.LISTENER_RAC1.lsnr:5"
    crsctl debug log crs "CRSRTI:1,CRSCOMM:2,OCRSRV:4"
    Try to stop the listener.
    Examine the log files under CRS_HOME/log/$HOST/crsd/* and CRS_HOME/log/$HOST/racg/*
    Thanks & Regards
    -Harish Kalra

  • Crypto map removing itself after reload

    Hello,
    I just set up my site tot site vpn with a pix box and a cisco 3745.
    The pix box is fine but the 3745 when ever I reload it the crypto map is not applied to the interface after the reload.

    Hello,
    I did issue a write memory.
    sh ver
    Cisco IOS Software, 3700 Software (C3745-ADVENTERPRISEK9-M), Version 12.4(25), R                                                                             ELEASE SOFTWARE (fc2)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2009 by Cisco Systems, Inc.
    Compiled Tue 21-Apr-09 14:41 by prod_rel_team
    ROM: System Bootstrap, Version 12.2(8r)T2, RELEASE SOFTWARE (fc1)
    FIBERJGX-3745-01 uptime is 3 hours, 49 minutes
    System returned to ROM by reload at 01:32:53 UTC Fri Jul 5 2013
    System restarted at 01:34:09 UTC Fri Jul 5 2013
    System image file is "slot0:c3745-adventerprisek9-mz.124-25.bin"
    This product contains cryptographic features and is subject to United
    States and local country laws governing import, export, transfer and
    use. Delivery of Cisco cryptographic products does not imply
    third-party authority to import, export, distribute or use encryption.
    Importers, exporters, distributors and users are responsible for
    compliance with U.S. and local country laws. By using this product you
    agree to comply with applicable laws and regulations. If you are unable
    to comply with U.S. and local laws, return this product immediately.
    A summary of U.S. laws governing Cisco cryptographic products may be found at:
    http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
    If you require further assistance please contact us by sending email to
    [email protected]
    Cisco 3745 (R7000) processor (revision 2.0) with 243712K/18432K bytes of memory.
    Processor board ID JMX0837L5AU
    R7000 CPU at 350MHz, Implementation 39, Rev 3.3, 256KB L2, 2048KB L3 Cache
    2 FastEthernet interfaces
    DRAM configuration is 64 bits wide with parity disabled.
    151K bytes of NVRAM.
    31360K bytes of ATA System CompactFlash (Read/Write)
    125952K bytes of ATA Slot0 CompactFlash (Read/Write)
    Configuration register is 0x2102

  • [svn:bz-trunk] 23085: Fix test to explicitly remove an event listener after the test is finished .

    Revision: 23085
    Revision: 23085
    Author:   [email protected]
    Date:     2011-10-21 07:49:33 -0700 (Fri, 21 Oct 2011)
    Log Message:
    Fix test to explicitly remove an event listener after the test is finished. Not doing this was causing the test to throw an RTE.
    Modified Paths:
        blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/security/stream ing-amf/MessagingAuthProSendTest.mxml

    Thanks for the ideas regarding beforeInvoke, Ben.  I will try to check that out.  In my situation, here's essentially how my script is working...
    BeforeSave is invoked.
    Script makes a change to the document, which should be captured in the saved file.
    Document saves.
    Document appears saved for a moment, and then appears unsaved (asterisk in the document title).
    My biggest problem is that this behavior isn't consistent.  I have dozens of users, all running the same script, and the problem only occurs with certain users and at random times. I can move a problematic document from a user's machine to a different machine, and the problem doesn't occur there.  It's very difficult to troubleshoot because I can't reproduce it consistently.

  • My problem is that after upgrade to IOS 6.1.3 my iphone not sounds! dont have sounds notifications for whatssap, FB, mails and can't listen music and talk with skype without headphones or speakers! only have vibrator and sound for one coming call!! what c

    My problem is that after upgrade to IOS 6.1.3 my iphone not sounds! dont have sounds notifications for whatssap, FB, mails and can't listen music and talk with skype without headphones or speakers! only have vibrator and sound for one coming call!! what can i do!???? Thanks a lot for help me!!!!

    I have a nearly identical problem with my Ipad 3. Mine is the left channel. I've yet to find help, but have found a number of other posts on this and other forums discussing the issue. People have tried restore, reset etc. Also, cleaning the ports with compressed air or cotton swabs. It appears to be a software issue, but no one is sure.
    Along with the original poster, I'd appreciate any help.
    As far as the 'level 6' poster, if you're going to be rude, please don't bother. Hope it was just a bad day.

  • Problems with codepage after refreshing data from XML

    Hello,
    I've created a dashboard with XML connection.
    XML file with new data is created via macro in INPUT.xls Excel file. This INPUT.xls file was created through exporting spreadsheet from Xcelsius and then adding a macro to it, so text data should be this same codepade. Generated XML through macro have no errors and Flash file gets numeric data with no problems.
    But there is other problem with text's codepage. After reload there are some unidentified symbols in place of polish alphabet letters.
    What should I do to make it right? Is this a problem with codepage or something else?
    [Dashboard Before Refresh|http://lh4.ggpht.com/_Q8NK6X6PPLg/TGkLwo3sxZI/AAAAAAAAA_g/mkBiDdM4Gi4/s640/before_refresh.JPG]
    [Dashboard After Refresh|http://lh4.ggpht.com/_Q8NK6X6PPLg/TGkLwSx9fHI/AAAAAAAAA_c/3UeM2Gd3HvA/s640/after_refresh.JPG]
    If you have any idea hot to fix it, please let me know.
    Best regards,
    Bart Dlug

    Hello,
    I have header in my XML as follows:
    <?xml version="1.0" encoding="Windows-1250"?>
    Only then my XML file is displayed correctly in Internet Explorer preview. When I chagne it to UTF-8 I get some errors.
    [XML with windows-1250 codepage|http://lh3.ggpht.com/_Q8NK6X6PPLg/TGkUakDHjlI/AAAAAAAAA_o/lLlJFMcSaFQ/s800/codepage1250.JPG]
    [The same XML with UTF-8|http://lh5.ggpht.com/_Q8NK6X6PPLg/TGkUa8k4vyI/AAAAAAAAA_s/tdcZNqu7-i0/s800/codepage-UTF8.JPG]
    Error message means: Invalid character was found in text content. Error during processing resourcse file:///
    As I wrote before, my data is generated via macro in Excel, so I supose my data in this file has windows default codepage. Am I right?
    Do you think that I problem is XML file?
    Best regards,
    BD

  • My problems with WiFi after 10.5.8 update (and how I solved them)

    Hi, I also had problems getting online after last Leopard update. First I tried to delete all network related preferences (as posted here http://discussions.apple.com/message.jspa?messageID=9965959#9965959) but soon the problem reappeared.
    I need to connect to 2 different routers, one at home and another at the office. After doing what I said in my previous post (see above), I managed to connect to one OR the other, but not both. I had to delete my home config when I was at the office, and the other way around at home. (i.e. I only could connect when only ONE network was configured in Airport preferred networks).
    After some trying, I realized both of my router had their SSID hidden. I then broadcasted my home router SSID and, voilà, everything's fine.
    Hope this will help some of you getting around this nasty bug.
    Regards.

    Had issues with my WiFi router too, after upgrading my MacBook Pro 13" to 10.5.8. Not sure we're talking about the same issues, but my MacBook connected to my WiFi network, had also a IP address, but couldn't connect to any host, nor on the local network neither outside.
    After reading your post I tried to remove the network completely from the list of known networks and to set it up from scratch. Seems it works now...
    Thanks,
    Thomas

  • Opening iTunes shows an error- The program can't start because AVFoundationCF.dll is missing from your computer. Try reinstalling the program to fix this problem. ; Even after reinstalling iTunes doesn't start!

    When I start the iTunes program it comes up with this.. pls help!!
    "The program can't start because AVFoundationCF.dll is missing from your computer. Try reinstalling the program to fix this problem."
    Even after reinstalling iTunes doesn't start!

    Repair your Apple Application Support.
    Control Panel > Programs n Features (Win7) or Add n Remove Programs(XP) > highlight AAS, click CHANGE then REPAIR.

  • I am unable to edit information I have typed into a spacebar, this includes backspace, and when I highlight it, even after reloading the page

    I recently upgraded to Firefox 4 on my 3 yr old Macbook, though I am unsure if this is in fact connected. Now I am often unable to edit information I have typed into a search bar or text box (such as this one) even after reloading that page or pressing first the back, then the forward buttons. Has anyone else run into this, and does anyone know what is going on?

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    Create a new profile as a test to check if your current profile is causing the problems.<br />
    See [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting&#58; Make a new profile]]
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
    See http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Problem Removing FocusManager from Memory

    Ok, so I have a class that I use as a menu for my program. It has some Flash components and an instance of FocusManager in it. My base class instantiates this class collects the data from the user via the components and then removes the class and continues on with the program. The problem is that after I remove it and move on it is still being held in memory. The file I am using now was created in Flash CS4 and I then I run the profiler on it in Flash Builder 4. After I take the two snap shots and look at the loitering objects I can see that the FocusManager is still there and it is keeping my class there. Here is what the class looks like (I made it simple test one that does what the class from my application is doing):
    package
    import fl.managers.FocusManager;
    import flash.display.Sprite;
    public class TestMenu extends Sprite
      private var fm:FocusManager;
      public function TestMenu()
       init();
      private function init():void
       //Add code
      public function activateFM():void
       fm = new FocusManager(this);
      public function clearFocus():void
       fm.deactivate();
       fm = null;
    Is there something else that I am not doing? If anyone has some insight into this I would greatly appreciate it.

    What I meant is that instead of using whatever erase functionality (I wouldn't know one), the code inside the function modules of FG1 should clear all global data with CLEAR and REFRESH statements before returning to the calling program. Even better would be to not use any global data in FG1 in the first place, if possible, rather work with local data declarations only inside the function modules.
    Thomas

  • Problem removing a Exchange Federation Trust

    Hi, 
    I'm having a problem removing a Federation Trust.  I have removed the Organisation Relationship successfully. However when I go to remove the trust by Powershell  I get the following error
    [PS] C:\Windows\system32>remove-federationtrust "Microsoft Federation Gateway"
    Can't remove federation trust "Microsoft Federation Gateway". It's in use by the following organization(s): CN=Federation,CN=XXXXXX,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=XXXXX,DC=local
        + CategoryInfo          : InvalidOperation: (Microsoft Federation Gateway:ADObjectId) [Remove-FederationTrust], Or
       gsStillUsingThisTrustException
        + FullyQualifiedErrorId : A17E4A11,Microsoft.Exchange.Management.SystemConfigurationTasks.RemoveFederationTrusts
    I cant seem to make other changes to it either, I cant add a domain, remove domain.  I have seen references to delete the object in the Schema but dont really want to do that unless I know it wont cause other problems as I need to recreate this.
    Ian

    There are few things you need to make sure before you remove the federation, like permissions, TXT records etc.
    http://technet.microsoft.com/en-us/library/jj657500(v=exchg.150).aspx
    http://technet.microsoft.com/en-us/library/dd297972(v=exchg.141).aspx
    http://www.c7solutions.com/2012/03/fix-federation-trust-issues-after-html
    Cheers,
    Gulab Prasad
    Technology Consultant
    Blog:
    http://www.exchangeranger.com    Twitter:
      LinkedIn:
       Check out CodeTwo’s tools for Exchange admins
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Problem removing Zombie GS

    Hey all. Having a problem removing Zombie Gunship from my Game Center. Basically, I want to delete my current progress and start over, thanks to my nephew messing up my config.
    So, I've deleted Zombie GS and it prompts me to remove the data and that my progess will be removed from the leader boards. So I do all that, restart it, blah blah blah. After I've reinstalled the app, my old config/progress/money is still there.
    I've emailed the game company and of course no response. So what am I missing or doing wrong? Or is this a situation where I can never start over?
    Thanks in advance for the help.

    I've got the same problem. I am revisiting the game and I want to start again from scratch but it seems Game Center has other plans for me. Dammit Apple gestapo!

  • 10000: PPPoE session recovery after reload

    Hi.
    We have seen that there are a feature that recover the PPPoE sessions closed in one side and up in the other. This feature is called 'PPPoE Session Recovery After Reload '.
    In the feature navigator, we can see that this feature is available for 7200 series. It seems not available for 10000.
    But in the release notes of Cisco IOS 12.3(7)XI3,
    http://www.cisco.com/en/US/partner/products/hw/routers/ps133/prod_release_note09186a008040929e.html
    appears this bug as resolved:
    CSCsa46626
    PPP PADT messages are not sent by a PPPoX PTA router to a client when the PPPoX user is no longer connected to the PPPoX PTA router.
    This feature is enabled only within the BBA Group configuration using:
    bba-group pppoe pppoe1
    sessions auto cleanup
    This issue can occur when a Cisco 10000 Series router is used as a PPPoX PTA router, and there has been a network flap causing the PPPoX users to lose their connections. PPPoE will experience this issue when BBA Groups are in use. VPDN Group configuration does not support this feature.
    There are no known workarounds.
    We have tested the IOS 12.3(7)XI6, but the router (10000) doesn't send the PADT (auto cleanup). In 7200, it works correctly.
    Anyone have has this problem?
    Anyone can confirm if this feature is supported?
    Regards.
    Jose

    Hi Jose ,
    I checked it using feature navigator and noticed that cisco 10000 doesn't support ""PPPoE Session Recovery After Reload"" feature.
    The following platforms support the feature.
    1700
    1800
    2600
    2800
    3200
    3600
    3700
    3800
    7200
    7301
    7400
    Thanks,
    satish

  • VPN works only after reload

    Hello,
    I have a Cisco ASA5505 setup for VPN trough IPSec (L2TP). I can connect from wherever I want to it using the user and password.
    The only problem is that, after 2-3 days I have to reload the appliance because it denies connection on port 500 UDP. After the reload everything works fine again.
    Do you know how to handle this kind of problem? Is is a bug in the software or it could be only a misconfiguration?

    forget the diagnostics and launch airport utility and if a yellow button is showing, double click it and read what it says to correct.

  • IPhoto will not open even after reload

    I have remove iPhoto and reloaded from disc. Still getting the same error message. I am basically pretty frustrated at this point, any ideas?
    Interval Since Last Report: 13374 sec
    Crashes Since Last Report: 8
    Per-App Crashes Since Last Report: 8
    Anonymous UUID: 41254D60-DDE4-4A37-A55C-DB4E70D14C3F
    Exception Type: EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x0000000000000002, 0x0000000000000000
    Crashed Thread: 0
    Dyld Error Message:
    Library not loaded: /System/Library/PrivateFrameworks/iLifeSlideshow.framework/Versions/A/Framework s/iLifeSlideshowProducer.framework/Versions/A/iLifeSlideshowProducer
    Referenced from: /System/Library/PrivateFrameworks/iLifeSlideshow.framework/Versions/A/iLifeSlid eshow
    Reason: no suitable image found. Did find:
    /System/Library/PrivateFrameworks/iLifeSlideshow.framework/Versions/A/Framework s/iLifeSlideshowProducer.framework/Versions/A/iLifeSlideshowProducer:
    stat() failed with errno=5=

    I am at my wits end with iPhoto error messages and inability to reload it. It has worked fine until yesterday when I started getting the library not loaded error message. I deleted the app, removed the pkg files from HD/Library/Receipts and reloaded the app from my iLife CD as suggested. I have done this 6 times without success and continue to receive the same error message. During reinstall it runs for a long time saying loading packages. After reload there are no new pkg files in teh HD/Library/Receipts location. I do not know what to do next . . . I am open to any assistance.

Maybe you are looking for

  • Beans: class not found in web application of my own

    i am using tomcat 4.0 & j2sdk1.4.0 i have path like c:\myjspapp\ourproject\WEB-INF\classes my .jsp,.html,.java file r in /ourproject folder i dont want to store my files in /webapps folder of tomcat i want to store them in folder as mentioned above i

  • Issue while Creating the records in OAF by disabling one field.

    Hi Experts, I am having the scenario like this. From the OAF page I want to create the record by omitting one field(it is disable for OAF). Consider the folowing scenario.. I am having the following fields Empno,Empname,Salary,Job in the OAF page whe

  • Unable to install windows 8 on the mac

    how do I install windows 8 on the Mac I tried but cannot get past windows set up . Where do you want to install windows? I have highlighted Drive 0 Partion 4 and it comes up with this We couldn't creat a new Partion or locate an existing one.

  • PowerPc G4 Extended Desktop

    Hi there, I was wondering if someone could help me? I have a 533 MHz PowerPc G4 and have just attached 2 monitors... hoping for an extended desktop. 1 of the monitors connects to the VGA port direct and I also purchased a ADC to VGA Adapter to connec

  • LR3 Fix for Crash when using Develop Module

    Adobe tech provided the following fix for my system which crashed when switching to the Develop module. This is the  response I received from Adobe Tech.   Recreating the preferences file corrected the problem. Their help was right-on and appreciated