Stop Event Bubbling w/ VidPlayer Component

Hello
I am having trouble with event bubbling when using the flash video player
I've tried several methods to stop the player,before submitting here - but nothing I've tried seems to work
The example is posted at http://64.50.167.136/~natures/NaturesReflections.html
The scenraio is:
The site loads great - the buttons function correctly
When the fourth button is click - it loads a frame with an embeded FLV player
(the default vid player Flash uses when importing video into the swf)
When the fourth button is click (Cheetah Coloring System)
The video starts to play
When any other button is clicked
The video continues to play
The embeded vid clip is named movie1
and i've tried using move1.stop();
but that stops the entire swf
Any suggestions on how to stop the movie - when another button is clicked?
Thank you for your time and attention
COde used for the buttons::::
btn1_mc.addEventListener(MouseEvent.MOUSE_DOWN, bhp1DownHandler);
function bhp1DownHandler(event:MouseEvent):void {
gotoAndStop(15);
btn2_mc.addEventListener(MouseEvent.MOUSE_DOWN, bhp2DownHandler);
function bhp2DownHandler(event:MouseEvent):void {
gotoAndStop(16);
btn3_mc.addEventListener(MouseEvent.MOUSE_DOWN, bhp3DownHandler);
function bhp3DownHandler(event:MouseEvent):void {
gotoAndStop(17);
btn4_mc.addEventListener(MouseEvent.MOUSE_DOWN, bhp4DownHandler);
function bhp4DownHandler(event:MouseEvent):void {
gotoAndStop(18);

don't embed your flv in your swf.  add an flvplayback component to your frame where you want the flv to be displayed, assign it an instance name (say flv) and use:
flv.source="pathtoyourvideo.flv";
and, if publishing for fp 10, use:
flv.unloadAndStop();
when about to exist that frame.
if publishing for fp9, use:
flv.stop();

Similar Messages

  • Stopping Event Propagation

    Hi All,
    Am facing some issue in event propagation.
    I have a Application component with in which I have a link button. The Application has a mouseDown event listening for it and the link button has the click event listening for it.
    I have a requirement where in if i click on the link button i got to show an image and on again clicking on the link button hiding the image. Basically toggling the hide/show of image on click of the link button. This works fine as expected.
    Now I have mouseDown listening on the Application, where in If I click any where else in the Application again the Image show be hidden and only on click of Link button it should be shown.
    But since I have the mouseDown listening on the Application, whenever I click on the Link button the image is showing properly but then after that when I click the link button again to hide the image, then since two events are getting triggered  the Image is never getting hidden. It always shows up.
    THE FIX I NEED is that when i click on the link button, the parent event should be stopped from bubbling and hence only the Link Button's Click should be called and not the Application's mouseDown.. And in else other places, its fine to have the Application's mouseDown event called.
    I Tried event.stopPropagation () and event.stopImme()...but in vain.......... PLS HELP

    "Jimmy Jeeves" <[email protected]> wrote in
    message
    news:g8va3c$ak4$[email protected]..
    > Hi!
    >
    > I want to provide hotkey in my html webpage. (I am using
    >
    http://code.google.com/p/js-hotkeys/)
    > I also have a chat module in Flex. When I am typing some
    text in the flash
    > object, I don't want the hotkeys to be enabled.
    >
    > I tried to stop the propagation from the flash but it's
    not working.
    >
    > From what I know, the html events are propagated from
    the child to the
    > parents. So if I stop the event from my flash object it
    has to be ok,
    > right?
    >
    > See my example. If I display an Alert from the callback,
    it is displayed,
    > so
    > it works. Why the event is still propagated?
    >
    > Thanks
    >
    > public function reportKeyDown(event:KeyboardEvent):void
    > event.preventDefault();
    > event.stopPropagation();
    > }
    >
    > this.addEventListener(KeyboardEvent.KEY_DOWN,
    reportKeyDown);
    >
    I don't think you can preventDefault on key events. You could
    probably use
    ExternalInterface to tell the web page not to listen for the
    hot keys for a
    while, though.
    HTH;
    Amy

  • Problem with checkbox and Event.stop(event)

    Hello,
    I cannot change the checkbox in a row, if the Event.stop(event) is fired on checkbox. My aim is, that the event OnRowClick is stoped, if I change the checkbox in the row.
    <rich:extendedDataTable id="requestTable" value="#{requestListHandler.normalisedRawRequestList}" var="req"
                             rows="#{requestListHandler.limitRows}" selectionMode="single">
                             <a4j:support event="onRowClick" action="#{requestListHandler.viewRequest}">
                                  <f:setPropertyActionListener value="#{req}"
                                       target="#{requestHandler.selectedRequest}" />
                                  </a4j:support>
                            <rich:column>
                                       <h:outputText value="#{req.offerListSize}">
                                            <f:convertNumber type="number" />
                                       </h:outputText>
                         </rich:column>
                             <rich:column id="checkBoxColumns">
                                       <h:selectBooleanCheckbox onclick="Event.stop(event);"
                                            value="#{req.firstInterpreterTimeChecked}"/>
                         </rich:column>
    </rich:extendedDataTable>I know I am using richfaces, but I have problem with sun-ri component <h:selectBooleanCheckbox..../>.
    Have you any idea?
    Manu
    Edited by: Argonist on Jun 16, 2009 8:27 AM
    Edited by: Argonist on Jun 16, 2009 12:25 PM

    I had the same problem. I read you post and was so disappointed that no one had answered you. But I have a good news for you :) My team leader managed to solve this awkward problem.Add to h:selectBooleanCheckbox style="z-index: 20;" so that it is "above" the table row that fires its own onclick event.

  • Event Bubbling Custom Object not inheriting from control

    One of the new things flash flex and xaml have are ways which
    the event easily bubbles up to a parent that knows how to handle
    the event. Similar to exceptions travel up until someone catches
    it.
    My goal is to use the frameworks event system on custom
    objects. My custom objects are:
    ApplicationConfiguration
    through composition contains:
    SecurityCollection which contains many or no SecurityElements
    and
    FileSystemCollection.cs which contains many or no
    FileSystemElement objects
    ect ect basically defining the following xml file with custom
    objects.
    [code]
    <ApplicationConfiguration>
    <communication>
    <hardwareinterface type="Ethernet">
    <ethernet localipaddress="192.168.1.2" localport="5555"
    remoteipaddress="192.168.1.1" remoteport="5555" />
    <serial baudrate="115200" port="COM1" />
    </hardwareinterface>
    <timing type="InternalClock" />
    </communication>
    <filesystem>
    <add id="location.scriptfiles" value="c:\\" />
    <add id="location.logfiles" value="c:\\" />
    <add id="location.configurationfiles" value="c:\\" />
    </filesystem>
    <security>
    <add id="name1" value="secret1" />
    <add id="name2" value="secret2" />
    </security>
    <logging EnableLogging="true"
    LogApplicationExceptions="true" LogInvalidMessages="true"
    CreateTranscript="true" />
    </ApplicationConfiguration>
    [/code]
    basically these custom objects abstract the xml details of
    accessing attributes, writing content out of the higher application
    layers.
    These custom objects hold the application configuration which
    contains the users options. The gui application uses these
    parameters across various windows forms, modal dialog boxes ect.
    The gui has a modal dialog that allows the user to modify these
    parameters during runtime.
    basically i manage: load, store, new, edit, delete of these
    configuration files using my custom objects.
    Where would event propagation help in custom objects like
    described above?
    ConfigurationSingleton.getInstance().ApplicationConfiguration.CommunicationElement.Hardwar eInterfaceElement.EthernetElement.RemoteIPAddress
    =
    System.Net.IPAddress.Parse(this.textBoxRemoteEthernetIpAddress.Text);
    The EthernetElement should propagate a changed event up to
    the parent ApplicationConfiguration which would persist this to the
    registry, db, file or whatever backend.
    currently this logic is maintained else where. I serialize
    the root node which compositely serializing the nested nodes and i
    check of the serialization is different from that in the backend
    … This tells me if the dom was modified. It works but i would
    like an event driven system.
    how should i implement bubbling using custom objects?
    3 implementation ideas:
    1) A simple way is to implement a singleton event manager:
    EventManager.RegisterRoutedEvent
    http://msdn2.microsoft.com/en-us/library/ms742806.aspx
    I like this idea but how can you tell which object is nested
    in who… this way the event can be stopped and discontinue
    propagation?
    2) If i use binders as discussed in Apress’s book:
    Event-Based
    Programming Taking Events to the Limit
    basically a binder connects the events between seperate
    objects together… although it would work for my app, I would
    like a more generalized approach so i can reuse the event system on
    future project.
    3) how does flash flex handle this..
    objectproxy.as?
    http://www.gamejd.com/resource/apollo_alpha1_docs/apiReference/combined/mx/utils/ObjectPro xy.html#getComplexProperty()
    >Provides a place for subclasses to override how a complex
    property that needs to be either proxied or daisy chained for event
    bubbling is managed.
    how does these systems all work....? Reflection ?
    this way i can simulate this on my own custom classes.
    Thanks!

    I have a strong sensation that the OSMF project is quite dead.
    no new submits since 2010, the contact form on the offical OSMF
    project website http://www.opensourcemediaframework.com/
    returns a PHP error.
    and many unanswered questions about OSMF in this forum.
    i think it would be wise to not use OSMF if possible, although
    I'm also stuck with it since we are utilizing HDS/PHDS
    protocols which are utilized in the framework.
    otherwise its quite a head-ache.
    I'm unable to get to a video element coming from a proxied element
    that is being produced via an HDS connection.
    and haven't found any solution that works.

  • Need to stop playback of an FLVPlayback component when navigate away from page!

    I have an movieclip playing as auto start on the first page of my website.  The component continues to play when I navigate away from the page.  How can I stop the playback of the movie if it has not completed when navigation away from the page is invoked.  I have search and am unable to find such an event using an FLVPlayback component.  Presently there is no code in actionscript to display here.
    thanks

    Hi, this is the entire code that is placed on the timeline in frame 1 of the AS line.  There is now an error and the FLVPlayer component, which is also begin in frame 1. At this point there is one method that I thought should work when the vTinesDayBtn is clicked.  However, is not.
    The error is:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at ewddSite_fla::MainTimeline/vTines()
    ArgumentError: Error #1063: Argument count mismatch on ewddSite_fla::MainTimeline/stoppedVid(). Expected 0, got 1.
    The code is:
    stop();
    import flash.events.*;
    import flash.display.*;
    import fl.video.*;
    import fl.video.FLVPlayback;
    function stoppedVid() {
      vidPlay.stop();
    vTinesDayBtn.addEventListener(MouseEvent.CLICK, stoppedVid)
    function vTines(evt:MouseEvent):void {
    gotoAndStop(20);
    vidPlay.stop();
    function engagements(evt:MouseEvent):void {
    gotoAndStop(25);
    function weddings(evt:MouseEvent):void {
    gotoAndStop(30);
    function births(evt:MouseEvent):void {
    gotoAndStop(35);
    function birthdays(evt:MouseEvent):void {
    gotoAndStop(40);
    function graduations(evt:MouseEvent):void {
    gotoAndStop(45);
    function anniversaries(evt:MouseEvent):void {
    gotoAndStop(50);
    function specEvents(evt:MouseEvent):void {
    gotoAndStop(55);
    function memorials(evt:MouseEvent):void {
    gotoAndStop(60);
    //main.addEventListener(MouseEvent.MOUSE_DOWN, mainPg);
    vTinesDayBtn.addEventListener(MouseEvent.MOUSE_DOWN, vTines);
    engageBtn.addEventListener(MouseEvent.MOUSE_DOWN, engagements);
    weddingsBtn.addEventListener(MouseEvent.MOUSE_DOWN, weddings);
    birthsBtn.addEventListener(MouseEvent.MOUSE_DOWN, births);
    bDaysBtn.addEventListener(MouseEvent.MOUSE_DOWN, birthdays);
    graduBtn.addEventListener(MouseEvent.MOUSE_DOWN, graduations);
    annivBtn.addEventListener(MouseEvent.MOUSE_DOWN, anniversaries);
    spEventsBtn.addEventListener(MouseEvent.MOUSE_DOWN, specEvents);
    memorialsBtn.addEventListener(MouseEvent.MOUSE_DOWN, memorials);

  • Reverse event bubbling/dropping

    Hi!
    I use custom components to organize my application. Event
    bubbling from a nested component to the application works fine. Is
    it also possible to notify any component tested in the application
    with an event triggered by the appplication or another component at
    the same level?
    THX

    Components have to listen/register to receive events, either
    during the capture or bubble phase. So a child component can listen
    for a component by its using parent.addEventListener( "eventname",
    eventHandlerFunction );

  • Report generation toolkit and signal express user step : problem of closing reference in "Stop" event

    Hi all,
    I'm trying to make a package of Vis to easily make Excel reports with Signal Express. I'm working on LabVIEW 8.2.1.
    I'm using the report generation toolkit, so I build a .llb from my project which contains all the hierarchy of my steps, but also the hierarchy of dynamic VIs called.
    I have made some steps, like "Open Workbook", "Write Data", etc.
    My steps run well, excepts one step : "Close Workbook".
    If my "Close Workbook" step is firing on "Run" Signal Express event, I have no error, so my reference is properly closed.
    But if my "Close Workbook" step is firing on "Stop" Signal Express event, I have an error "1", from "Generate Report Objectrepository.vi".
    I feel that I'm trying to use a reference which has been killed in the "Stop" step...
    I would like to know what exactly do Signal Express on "Stop" event and why my close function does'nt run well.
    Thanks,
    Callahan

    Hi Callahan,
    SignalExpress (SE for short) does the following on the Stop event:
    1. Takes the list of parameters that SE found on your VI's connector pane, and sets the values that the user set from the "Run LabVIEW VI" configuration page, if any.
    2. Then tells the VI that SE is running the Stop event by setting the Enum found on your VI's front panel. This in turn should produce some boolean values telling your VI to execute the Stop case.
    3. The VI is then run, with those values and states.
    4. SE checks to see if any errors where returned.
    5. Since this is the Stop event, SE releases the reference to the VI which it possesses.
    Questions for you would be, is the reference to your Workbook linked to a control on your connector pane, or held in a uninitialized Shift Register. If it's held in a Shift Register, SE would not be aware of it, and would not be able to affect that reference.
    Hope that helps. Feel free to post your LLB if it doesn't.
    Phil

  • How to start/stop Event Mgr. and RFID information server?

    I take over our form RFID admin (who quit) position.
    I cannot find any document which tells me How to start/stop Event Mgr. and RFID information server.
    Even the "Sun Java System RFID Software 3.0 Administration Guide" does not have this piece of info.
    Would you please help? Points guaranteed. Thanks!

    Ashley you are still not clear to me.
    Please mention what applications are these??
    Is it SAP Event Manager??
    What is the RFID Information server??
    Is it SAP based, or some other vendor??
    How is the integration done?
    Thanks

  • Listening in main application for event coming from custom component

    I have a custom component that im using for a login.  i watch videos and tutorials on how to pass variables between custom components and application. the problem im having is that must tutorials or explanation have you put the event on the custom component and then it refers to some function within the main app.
    Is there a way to just listen on the main app when that event kicks off? ive been trying for hours and i know there has to be something im missing it cant be that hard. any help i would really appreciate.
    Thanks
    Miguel

    Sounds like you're asking about addEventListener():
         <fx:Script>
              <![CDATA[
                   import mx.events.FlexEvent;
                   protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
                        comp.addEventListener("test", testHandler);
                   private function testHandler(e:Event):void {
                        trace(e);
              ]]>
         </fx:Script>
         <local:TestComponent id="comp"/>
    Add an event listener on your custom component (first string is the 'type' of the event).

  • Handling Event of a custom component

    Hi,
    I created a TwoStateButton from an AbstractButton. As long as it has two states, There's a repaint() occuring when the user clicks on it and it is written within the component.
    I want to also handle the click event from outside the component (actionPerformed, something like that), how can I do this?
    I am relatively new to Java but for God's sake don't answer "Use a JtoggleButton instead". My main goal is to understand the component creation and event handling in Java.
    Thanks,
    Vince D.

    Forget about it, I discovered it myself... Sorry for interrupting
    Vince D.

  • Error on boot: "STOP c0000135 unable to locate component csrsrv.dll not found reinstalling the application may fix the problem"

    I am running Windows Server 2003 R2 (I know it's old, I'm in the process of upgrading it now to 2012) on an old HP ProLiant server. It's worked for ages, but yesterday morning it booted up with the blue screen of death, saying:
    STOP c0000135 unable to locate component csrsrv.dll not found. Reinstalling the application may fix the problem.
    I have tried coping the file from C:\WINDOWS\ServicePackFiles\i386\csrsrv.dll to C:\WINDOWS\system32\ using a WS2003R2 recovery disk, but it still doesn't work. I'm not sure what to do now...
    I do have backups, but I'd prefer just to get this server back up and running so that I can continue to migration so that I can decommission it permanently and put it out to pasture...
    Any help and guidance is greatly appreciated.
    Thanks in advance!

    If copying the DLL does not help then I would recommend doing a system state restore from a backup.
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

  • Custom Event Bubble

    I'm new to flex and how it handles Event Bubbling.  I can make a custom event work with this code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   applicationComplete="init()" name="app">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import flash.events.Event;
                import mx.controls.Alert;
                private function init():void {
                    addEventListener("myEvent",testListener);
                    var testEvent:Event = new Event("myEvent",true);
                    dispatchEvent(testEvent);
                private function testListener(event:Event):void {
                    Alert.show("Trigger Worked");
            ]]>
        </fx:Script>
    </s:Application>
    But when I break out the code so the Event fires in a class the parent does not catch it.
    MyEvent.as file:
    package comp {
        import flash.display.MovieClip;
        import flash.events.Event;
        public class MyEvent extends MovieClip{
            public function MyEvent() {
                var testEvent:Event = new Event("myEvent",true);
                dispatchEvent(testEvent);
    TestEvents.mxml file:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   applicationComplete="init()" name="app">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import comp.MyEvent;
                import flash.events.Event;
                import mx.controls.Alert;
                private function init():void {
                    addEventListener("myEvent",testListener);
                    var tempEvent:MyEvent = new MyEvent();
                private function testListener(event:Event):void {
                    Alert.show("Trigger Worked");
            ]]>
        </fx:Script>
    </s:Application>
    I know I'm missing something simple.  Could someone please point me in the correct direction.
    Thanks,
    Sol

    Thanks for the help!!!  I got it to work using most of your code.  The only change I had to make was move the dispatchEvent out of the construtor and into it's own function.  That way the listener is definded before it fires.
    Now I noticed you added the listener to the object itself is this bubbling?  I thought if you have bubbling turned on the main app can have the listener and if a child fires an event it would bubble up.  If the listerner is not on the MyEvent class it does not work.
    Here is the new Working code if you take the : tempMyEvent off this line:
    addEventListener(MyEvent.MY_EVENT, myEventHandler);
    it does not work
    Should it?  Should the event bubble up and still be fired?
    Below is working code:
    MyEvent.as
    package comp {
        import flash.display.MovieClip;
        import flash.events.Event;
        public class MyEvent extends MovieClip{
            public static const MY_EVENT:String = 'myEvent';
            public function MyEvent() {}
            public function disEventTest():void {
                dispatchEvent(new Event(MyEvent.MY_EVENT,true));
    TestEvents.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   applicationComplete="init()" name="app">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import comp.MyEvent;
                import flash.events.Event;
                import mx.controls.Alert;
                private function init():void {
                    var tempMyEvent:MyEvent = new MyEvent();
                    tempMyEvent.addEventListener(MyEvent.MY_EVENT, myEventHandler);
                    tempMyEvent.disEventTest();
                private function myEventHandler(event:Event):void {
                    Alert.show("Trigger Worked");
            ]]>
        </fx:Script>
    </s:Application>
    Thanks again for your help this will at least get me moving forward again.
    Sol

  • Updating component within awt-event thread of another component

    Hi,
    I'm having trouble updating (repainting) a component inside the awt-event thread of another component. The component I want to update is a JFrame with a JLabel that lists the progress of the original component's action that triggered the event. I can get the frame to pop up but it's content is never fully painted and never refreshed.
    I've tried using invokeLater() (the frame ran after the original awt-event had finished) and invokeAndWait() (blocked the original awt-event) and running the computational intensive parts of the original component's action in SwingWorker threads (no difference) but all to no avail.
    What I want to do is similar to a progress bar so I think it should possible. Any suggestions? Thanks, Matt

    Are you calling yield() or sleep(...) on your Thread?

  • Stop event

    Hello all,
    Is it possible to run a custom VI after the stop button has been pressed in Signal Express?
    I have the desired functionality working with a conditional repeat loop, but the data logging does not work.  Therefore, I am wanting to know if there is some sort of stop event in Signal Express we could use.
    Thanks,
    Steve

    Sorry for the cryptic message.  I was going on 4 hours of sleep that day.
    We are using LVExpress 2009.  I figured out the issue with the datalogging not working in the conditional loop.  Apparently, I had inadvertantly enabled some start criteria in the recording options.  Once that start criteria was removed, the data logging works fine.
    The original question I had though was really concerning a stop event when the user presses the stop button.  I have  a test running where the several channels of thermocouple data and pressure transducer data are being acquired.  We have writtent the LVExpress program to monitor one of the thermocouples and if the temp falls outside our predefined range the test will shut down.  We are doing this via a limit test in LVExpress.  The physcial test is endurance testing of an industrial gas compressor.  The hardware we are using is a 6024E daq card connected to a SCXI 1000 chassis with a couple of the 1102 modules and one of the relay modules (I forgot the NI number of that module).
    When the LVExpress program is started it begins to acquire data and also turns on the electric motor used to drive the compressor via control of a variable frequency drive.  The LVEXpress program performs the limit test and if the temperature is within the acceptable range it sends a boolean true signal to a custom LV vi that has been inserted into the LVExpress project.  If the temperature is outside the acceptable range it sends a boolean fals.  The custom vi is nothing more than a small daq assistant vi that open or closes channel 1 on the relay module within the SCXI chassis.
    The issue arises when a user clicks the stop button.  Prior to implementing and fixing the issues involved with the conditional loop, if the LVExpress program was run continuously if the stop button was pushed the motor on the compressor would continue to run because the relay remained in the "on state".  I tried to incoporate an operator interface using a switch, but the swicth would not bind itself to the inputs on the custom vi within the LVExpress project.  Therefore, I was wondering if there was a stop event that is raised when the stop button is pushed.  If so, I could include my custom vi such that it would shutdown the motor.
    My ultimate work around was to use a conditional loop.  This worked well as the loop would acquire and log data continuously until either the limit test failed or the stop button was pushed.  Once execution exited the conditional loop, it would goto my custom vi which would switch the relay and turn of the motor prior to the end of the project.
    However, while I do have a work around in place I am still curious if there is a stop event where code could be placed once the stop button is pressed within LVExpress.
    Thanks,
    steve

  • Calling event called in a component but set in another?

    I have two components, both called from my main application. I've added an event listener in one of the components, but when I try to dispatch the event in the other component, nothing happens. Can anyone explain why this is please?

    It sounds like you have the following:
    Component A - has a listener attached for some event.
    Component B - dispatches the event.
    Assuming this is a correct interpretation, it's pretty clear why nothing happens. You have a listen attached to A, but A never fires the event. It is B that fires the event, but you are not listening to it. Attach the listener to B and have the handler function perform whatever operation is desired on A.

Maybe you are looking for