MovieClip does not receive Custom Event

I have a problem understanding Events and event handling.
I have a movieClipA wich contains several other movieClips (a1,A2,A3, etc..)
MovieClipA is parent of movieClips (a1,A2,A3, etc..)
In movieClipA I use the following code:
addEventListener ( "Pieter", pieterFnP ) ;
dispatchEvent(new Event("Pieter"));
private function pieterFnP (e:Event) {
        trace ("PIETER - Parent");
} // Is fired when recieving Event
In movieClips (a1,A2,A3, etc..) I use the code
addEventListener ( "Pieter", pieterFnC ) ;
private function pieterFnC (e:Event) {
         trace ("PIETER - Child");
} // Is NOT fired ?
When I execute the application, function "pieterFnP" is fired, but "pieterFnC" NOT.
Thank you.
Pieter

In the Flash manuals I see/read; events traveling from the stage down to the object and then bubling up.
Quote::
When an event occurs, it moves through the three phases of the event flow: the capture   phase, which flows from the top of the display list hierarchy to the node just before the   target node; the target phase, which comprises the target node; and the bubbling phase,   which flows from the node subsequent to the target node back up the display list hierarchy.
My First attempt was Capturing events send by the Child objects. But then I had the problem that after the child object was gone, the eventhandler stil existed. Pointing to a null Child object. This behaviour is also described in the Flash manuals. But I never could pin-point which variable (object) still contains a 'reference' ? to the event object.
So I thougth about a different approach. Which seams to me, was the logical solution, meaning Bubbling down and up.
My design approach was to define a child DisplayObject, which perform some action, after recieving a event from is parent. So I don't have to keep track of all the created objects. More like the Idea of fire and forget.
Ok, I go back to my virtual drawing board
Thanks,
Pieter

Similar Messages

  • Eventhandlers of children of application can not receive custom event dispatched by application

    Hello dear Adobe community,
    hope you can help me with this issue.
    When the application dispatches a custom event, the child uicomponent can only receive the event by using Application.application.addEventListener or systemManager.addEventListener. Simply adding a listener, without application or systemmanager, does not allow the event to be received by the child component.
    I want to be able to use the addEventListener and removeEventListener without SystemManager or Application.application, or could you provide a better workaround? How can I use the addEventListener, do I need to overwrite EventDispatcher, which I wouldnt like to do?
    Just to clarifiy, if i remove the systemManager in front of addEventListener(CustomEventOne.EventOne,sysManHandleCE,false) it will not add it and will not fire. 
    The code below is an example for this problem that the event is not getting fired in the right moment. The mainapplication got only a button with the customEventOne that gets dispatched.
    public
    class MyCanvas extends Canvas{
    public function MyCanvas()
    super();
    width=300;
    height=300;
    addEventListener(FlexEvent.CREATION_COMPLETE,handleCC,false,0,true);
    private function handleCC(event:FlexEvent):void
    removeEventListener(FlexEvent.CREATION_COMPLETE,handleCC);
    addEventListener(CustomEventOne.EventOne,handleCE,false,0,true);
    addEventListener(Event.REMOVED_FROM_STAGE,handleEvt,false,0,true);
    systemManager.addeventListener(CustomEventOne.eventOne,sysManHandleCE,false,0,true);
    private function handleEvt(event:Event):void
    trace("In removed from stage handler");
    systemManager.removeEventListener(CustomEventOne.EventOne,sysManHandleCE);
    trace(hasEventListener(FlexEvent.CREATION_COMPLETE));
    trace(hasEventListener(CustomEventOne.EventOne));
    trace(hasEventListener(Event.REMOVED_FROM_STAGE));
    private function handleCE(event:CustomEventOne):void
    trace("I got it");
    private function sysManHandleCE(event:CustomEventOne):void
    trace("I got it");
    public class CustomEventOne extends Event
    public static const EventOne:String = "EventOne";
    public function CustomEventOne(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
    super(type, bubbles, cancelable);
    override public functionclone():Event
    return newCustomEventOne(type,bubbles,cancelable);
    Thank you in advance,
    Michael

    I think you need to look at event propogation. The object that dispatches an event will be sitting on the display tree. The event propagates up the tree to the roots. Your canvas should be attached to the application, but even then it sits lower in the tree branches than the event dispatcher, so it won't see the event being dispatched because the event is not propagated to the children of the object that dispatches it but to the parent of the object that dispatches it.
    So, your canvas is a child of the application, but dispatching the event from the application means that the canvas doesn't see it because events are notified up the tree using the parent link, not the child links.
    You may wish to investigate how the display list and event propagation works and then the MVC pattern.
    Paul

  • Analytics does not load custom events

    Using "Analytics Administration" I created an event named PORTLETEVENTSA. The event created fine. The corresponding table "ASCFACT_PORTLETEVENTSA" and view "ASVFACT_PORTLETEVENTSA" also created fine.
    I restarted the Analytics service. But there are error messages in the "analyticsui.log" like this one:
    Skipping event: PORTLETEVENTSA due to invalid definition! Table name must begin with 'ASFACT_'.
    So the custom event did not load as it was expecting "ASFACT_" instead of "ASCFACT_". But why?
    The query web service says "event not found".
    Where did I go wrong? Maybe I did not configured something or do I need to do something else to register the event correctly.
    Any help would be highly appreciated. Thanks.

    Did you figure this out ?
    the query in their documentation also refers to ascfact
    query = "select count(*), method.value " + "from ascfact_demo_event fact, ascdim_page_name page, ascdim_event_method method " + "where fact.page_name = page.id and fact.event_method = method.id " + "group by method.value";
    I'll keep posting to this thread if i find something.

  • My schedule does not receive invitations to events

    My schedule does not receive invitations to events, i Have a icloud Account, my invites arrive to my friends, but theyr never arrive, why?

    Hi matthuynh,
    Welcome to the Apple Support Communities!
    I understand you are not receiving iMessages when you are not connected to the internet. You will need some sort of data connection to receive an iMessage, Wi-Fi or cellular data. If you are connected to data and are still not receiving iMessages please you the information in the following article to isolate and resolve the situation.
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Please let me know if I can be of further assistance.
    Have a great day,
    -Joe

  • FTP-adapter does not register subscribed events

    I have installed an FTP-adapter and configured it to receive messages. I have created an application with the same name and set up a subscription to an event from an generic adapter. I have another db adapter also subscribing to the same event, and this works fine. However the ftp adapter does not receive the subscribed event. I have checked the MESSAGEINFOIDTABLE table, and the subscription between the FTP adapter and the genric adapter is not registered here. I have tried to resintall the adapter several times using different names etc, but it does not seem to register. Anyone had this situation before, or does anoyone have any tips?

    Audun,
    This is very strange. You haven't got 2 environments have you? Developing on one, but looking at another? Sorry for the dumb question, but I've done that before!!
    If you have 1 event, 1 publishing and 2 subscribing, then your count on the MESSAGEINFOIDTABLE table for this event should be 3.
    Have you tried pushing the metadata in iStudio to your FTP Adapter? Or restarting the FTP Adapter?
    You've definately subscribed to the correct Business Object and Event when mapping your message from Common View to Subscribe view?
    Your repository may be all screwed up. This can happen. iStudio doesn't have the best history! When you've reinstalled the adapter again, or re-designed the message again and again, you could have orphaned objects all over the place preventing proper message design taking place.
    As a sanity check, stop all services connecting the repository (iStudio, Adapters, OEM, sqlplus etc.) Save / backing up your current repository using the "oaiexport" script.
    Once you done that, drop the existing repository, and create a new fresh one. (use the "hubschema" -drop, then -create script).
    Just try creating that same single message design again with just one publishing and one subscribing adapter.
    If you still have the same problem, then I think it is one for Oracle Support.
    Good luck,
    Yan

  • Phone does not receive incoming calls

    Please help.  Verizon can't seem to.  My phone does not receive 90% of its incoming calls or messages.  I have been told to delete all of my messages and call logs- no use.  I have tried removing the battery and resetting the phone.  I did make sure the phone was not in "do not disturb" mood- it is not.  People who call me say that it doesn't ring, just goes straight to voice mail even though the phone is on.  Very frustrating problem as my 6 year old phone before seemed to give me better service.  I feel like a child who is only allowed to make outgoing calls!  Please help.  All suggestions are welcome.  Thank you.

    Check the Call Forwarding section. There are two options to select. One says Forward All Calls and the other says Forward Unanswered Calls. Make sure Forward All Calls is not selected. That would cause all calls to go to the number specified which may be your voicemail. To get there from the home screen click the Phone icon > push the option button (left of the trackball) > click options > click Call Forwarding.

  • My iPhone does not receive call phones

    My problem is that most of the time my iPhone does not receive phone calls. I can call, send and receive sms, mail works, wifi, everything. But most of the incoming calls are not received, therefore my iPhone is not reliable as a phone. I have updated the firmware, I have reset it several times, but nothing changed. If I make a call phone and don't switch my iPhone, the person I have call can call me back and likely I would receive the call!!??? Someone can help me to fix my problem? Thank you in advance.

    Hi,
    Try testing the iPhone without any accessories.
    This article: http://support.apple.com/kb/HT1737 provides general tips that will resolve most issues related to making and receiving calls.
    Try contacting the cellular service provider, if the issue persists after trying the tips in the article above. This article: http://support.apple.com/kb/HT1937 provides support resources for iPhone service providers.
    -Jason

  • Titles are not visible, they show up on timeline as a grey box no text  does not effect other events or projects

    titles are not visible, they show up on timeline as a grey box no text  does not effect other events or projects. could this have something to do with motion

    Without seeing the timeline it sounds as if they've been off. Maybe you pressed the V or the role is switched off in the timeline index.

  • Why my 2006 mac mini does not receive updates

    Why my Apple 2006 mac mini does not receive updates

    To see if you are ready for 10.5, read:
    https://discussions.apple.com/docs/DOC-2275
    To see if you are ready for 10.6, read:
    https://discussions.apple.com/docs/DOC-2455
    To see if you are ready for 10.7, read:
    https://discussions.apple.com/docs/DOC-2465

  • Error : Contract does not match customer and item information[OSCI.ManufSN]

    I need to add Service Call from Service Contract through DIAPI. "Mfr. Serial no" is set as  "Unique serial no by" in system general settings.
    Creating two Customer Equipment Card from the cfl provided on Service Contract in Item Tab and Internal serial is blank in created Cutomer Equipment Card.
    One is terminated and other is active have the same ItemCode but different customers then while adding Service Contract I am paraller generating service call through DIAPI but the system is throughing error - "Contract does not match customer and item information [OSCL.IntrnalSN]"
    Thanks
    deepak gaur

    HI,
    Service Contract can be for a specific customer
    The contract type cound be (Coverage):
    1. including all items (Type Customer) in this case the dates of the coverage is defined in the head!
    2. Including specific serial numbers
    3. Including item groups
    The status every case should have to be Enabled/Approved  for valid contract (OCRT.Status = 'A').
    In case of Do not forget to set the valid from and valid to dates to define in the system the coverage. (header and items tab from/to dates)
    Now, If you create service all, the system will use the first possible Service Contract. IF you have more: you have to select the contract manually.
    Ex:
    1. One for customer including all items
    2. One for a specific serial number
    Best Regadrs,
    János

  • Outlook 2010 does not receive rss messages

    Hi,I have recently uninstalled a freeware VPN.
    After that outlook 2010 does not receive messages (bizarrely firefox works fine, but internet explorer does not)!
    I keep receiving error code: 0x800c0008
    I made sure that it is properly uninstalled.
    Thank you for your help!

    Hi,
    Have you subscribed any RSS Feeds before? Please go to File > Info > Account settings > "RSS Feeds" Tab and check if all the feeds are healthy (connection successful?). Remove them to check
    whether you would still receive the error code anymore.
    More information:  http://office.microsoft.com/en-001/outlook-help/unsubscribe-from-an-rss-feed-HA010024271.aspx
    The following KB could help you solve your issue.
    Troubleshooting error messages that you receive when you try to send and receive e-mail in Outlook and Outlook Express
    http://support.microsoft.com/kb/813514
    In addition, I would like to suggest you ask this in the Outlook Forums:
    http://social.technet.microsoft.com/Forums/en/outlook/threads
    Hope it helps.
    Regards,
    Blair Deng
    Blair Deng
    TechNet Community Support

  • TS4002 Hello, icloud receive messages from gilly hicks, but does not receive messages from another personal account... this is happening me since one week and i dont know how to solve this.... error in the mail delivery system says not valid IPv4 SMTP err

    Hello, icloud receive messages from gilly hicks, but does not receive messages from another personal account... this is happening me since one week and i dont know how to solve this.... error in the mail delivery system says not valid IPv4
    SMTP error from remote mail server after RCPT TO:<[email protected]>:
       host mx6.me.com.akadns.net [17.158.8.114]: 550 5.7.0 Blocked - see https://support.proofpoint.com/dnsbl-lookup.cgi?ip=184.173.9.56:
       [email protected]
    i do alse receive from gmail....
    please help... what is happening!!!!

    Just to recap, this is a collection of ports I have collected over time for people who needed this information when setting up the HP ePrint app so that they could view their email from within the app.  I am certain other applications also need this information.  Although lengthy, I could not find a more comprehensive place to retrieve this information.  Feel free to post additional information, faulty information, or other related topics below as this is simply a collection of data and it would be practically impossible to test all of them. Thank you!
    Don't forgot to say thanks by giving "Kudos" if I helped solve your problem.
    When a solution is found please mark the post that solves your issue.
    Every problem has a solution!

  • Not Receiving Sync Event

    Hello, All!!!
    I am creating one Application with the FMS 3.
    I am creating a connection on the FMS 3.
    I can see that user is connected to the Flash Media Server3.
    But I am unable to receiving the Event of the Sync of the
    Remote Shared Object.
    Even I have tried the documentation Sample named
    "SharedBalls" Application of the FMS.
    Even in this application I am not Receiving Sync
    Event.
    I am using Flash Prof CS4 and Windows 7.
    Help me to solve this...
    Thanks in Advance.....

    Hi,
    Using the same application which you have mentioned, i am able to get the sync event triggered at the client side. But i tried in WIndows XP as client. Can you pls give me the exact player version which you are publishing and the flash player associated with the Flash CS4. Which version of FMS are you using?
    Regards,
    Janaki L

  • TS2755 My ipad does not receive messages, the bubble in the green background. My iphone does.

    My ipad does not receive messages, the bubble in the green background. My iphone does.
    I can use my ipad to send messages, but it only moniltors the ones i send with the ipad. All the other messages I get on my iphone are missing.
    Any idea why?

    "The bubble in the green background" indicates the message was an SMS (cellular text) message.  If the background were blue, it would mean the message was an iMessage.
    The difference is important.  Your iPad is not a cellular telephone.  It cannot send or receive cellular text or MMS messages.  It is, however, an Apple device which means it can communicate using Apple's iMessage to/from other Apple devices (typically over WiFi).

  • Flash plugin does not receive mouse clicks

    Sometimes adobe flash plugin does not receive mouse clicks. For example it happens with youtube old player. Is there some way to fix it? Is this well known bug or i am just having bad luck?

    geniuz wrote:
    You must provide more details, for instance what WM/DE are you using and what driver for your VGA (Intel, ATI, Nvidia).
    Anyways, in certain WM's the following helps before starting firefox or w/e:
    export GDK_NATIVE_WINDOWS=1
    There was a thread about this somewhere in the forums. Use the search function.
    Thanks that works

Maybe you are looking for