addEventListener is not listening

I have Central.mxml, which is the application.
In my project, in the subfolder called view are FileA.mxml and FileB.mxm.

I stripped the code to a minimum. I can't understand why the method addEventListener in Central.mxml does not listen to the dispatchEvent in FileA.mxml, which has the metatag like this:

< mx:Metadata >
[Event (name = 'iHaveChanged', type ='flash.events.Event "")]
< / mx:Metadata >

I'd appreciate any pointer, you may have.

Code attached:

Central.MXML

<? XML version = "1.0"? >

"" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml '

xmlns:view = "view.*".

Width = '100% '.
Height = "100%".

creationComplete = "init ()" "
>




< mx:Script >
<! [CDATA]
Import mx.controls.Alert;
view of the import. FileA;
Mx.events import. *;

[Bindable] public var test: String;
public var fileA:FileA = new FileA();




public void init (): void
{
onCreationComplete();
}



private function onCreationComplete (): void
{
Application.application.addEventListener ('iHaveChanged', aHasChangedHandler);
fileA.addEventListener ('iHaveChanged', aHasChangedHandler);
}



private void aHasChangedHandler(e:Event):void
{Alert ("aHasChangedHandler");
var a: FileA = e.currentTarget as FileA;
var aProp:String = a.text_input_FileA.text//"blah;
Alert.Show ("aProp =" + aProp);

var fileb:FileB = new FileB;
fileb.varB = aProp;
fileB.text_input_FileB.Text = aProp;
}

[]] >
< / mx:Script >



< mx:Box id = "applicationBranding".
Width = '100% '.
direction = "horizontal" >
< mx:Text text = 'editor of ZZZ. "
fontSize = "24".
/ >
< / mx:Box >
< mx:Label text = "Publication creation and delivery" color = "yellow" / >
< mx:ApplicationControlBar id = "applicationControlBar".
Width = '100% '.
>
< mx:LinkBar id = "moduleLinkBar".
direction = "horizontal".
horizontalAlign = "left".
dataProvider = "publisherViewStack."
/ >
< mx:Spacer width = "100%" / >
< mx:LinkButton id = "logoutbutton" label = "Logout" / >

< / mx:ApplicationControlBar >



< mx:ViewStack id = "publisherViewStack".
Width = '100% '.
Height = "100%".
>

< id see: Home = 'Home'
label = "Home".
/ >

< view: id FileA = "filea".
label = "filea".
/ >

< view: FileB id = "fileb.
label = "fileb.
/ >

< / mx:ViewStack >


< / mx:Application >
---------------------------------------------------------
FileA.mxml

<? XML version = "1.0" encoding = "utf-8"? >
"" < mx:VBox xmlns:mx = ' http://www.adobe.com/2006/mxml '
xmlns:view = "view.*".
Width = '100% '.
Height = "100%".
creationComplete = "init (); »
>

< mx:Metadata >
[Event (name = 'iHaveChanged', type ='flash.events.Event "")]
< / mx:Metadata >

< mx:Script >
<! [CDATA]
Import mx.controls.Alert;
Mx.events import. *;
[Bindable] public var varA: String;

public void init (): void
{

}



private void onSomethingHappened(e:Event):void {}
Tell parent application he needs to change the variable b
Alert.Show ("onSomethingHappened");
var newEvent:Event = new Event ('iHaveChanged');
dispatchEvent (newEvent);
Alert.Show ("dispatchEvent");
}


[]] >
< / mx:Script >

< mx:TextInput id = "text_input_FileA" text = "lele" change = "onSomethingHappened (event)" / >
< / mx:VBox >

-------------------------------------------------------------------------
FileB.mxml

<? XML version = "1.0" encoding = "utf-8"? >
"" < mx:VBox xmlns:mx = ' http://www.adobe.com/2006/mxml '
xmlns:view = "view.*".
Width = '100% '.
Height = "100%".
creationComplete = "init (); »
>


< mx:Script >
<! [CDATA]
Import mx.controls.Alert;
Mx.events import. *;

[Bindable] public var varB:String;

public void init (): void
{
Alert.Show ("varB =" + varB);
}

public function getVarB (): String
{
Alert.Show ("getVarB =" + varB);
return varB;
}




[]] >
< / mx:Script >

< mx:TextInput id = text = "{getVarB ('text_input_FileB')}" / >
< / mx:VBox >

This seems to work:

Tags: Flex

Similar Questions

  • Siri "is not listening.

    Hello!   It's quite strange.

    My iphone connects via bluetooth to the sound of my car with no problems.

    I press the HOME button and speak to Siri all the time in the car.   It works nice.

    But... When I'm NOT in the car, Siri will not listen.  I'm talking about, and it's like I don't have.  I'm not trying to say that he does not understand me.  It's as if I never spoke.

    Any ideas?

    Thank you in advance.

    I have the same problem - a strange combination of software and hardware.

    The microphone on the phone works but not with siri

    If I plug in headphones I use siri through the external microphone.

  • Port 902 does not listen on TCP

    We recently moved to VM 6.0 (vCenter on 3018524) and I currently have problems with the backup of all my vm servers.  We use CommVault (with which I opened a support ticket) and identified that the software could not connect on port 902.  After a lot of troubleshooting, thinking that the firewall were the cause, but were not that we killed all the firewall on the devices concerned without change... we noticed that the VC was not listening on port TCP 902... It is listening on UDP 902 however.  I spent a few hours combing through the internet trying to find a decent solution... but unable to find one.  Anyone here have any ideas on why this is happening?

    OK... Well... Finally got a solution.  It is a multi-part problem.  First of all, the people of CommVault sent me on a merry chase in a bad way.  What they were saying was that I MUST have 902 TCP open on the Virtual Center... but instead, I had to open TCP 902 on the hosts.  Of course... once that was identified, we saw that 902 was indeed not open on the hosts for this cluster.  Which led us in the way of the realization that there was a misconfiguration on the virtual switches distributed on this group.  Once this was corrected, everything started to work properly.

  • Why when I open my old files HAVE they not listen to samples or any content turns white?

    Why when I open my old files HAVE they not listen to samples or any content turns white?

    Hello

    We have published a 19.0.1 hotfix that resolves this problem in discussion on this topic. Please apply the patch to your creative cloud application. The creative cloud application checks the update once a day, so you may see the update immediately.  If you want to force the check for an update at the beginning please logout and log back into the creative Cloud application.

    Link to 19.0.1 release notes: https://helpx.adobe.com/illustrator/kb/illustrator-cc-2015-crash-bug-fixes-19-0-1.html

    Kind regards

    Ashutosh

    The name of the Illustrator team engineering

  • app.addEventListener is not defined

    Hello

    I'm building a pallet via scriptingUI. I am trying to create a palette that changes depending on what you selected. Isn't this possible in AE?

    This is a test code just to get out of trouble:

    function SelectionViewer()

    {

    var selectionViewer =;

    this.buildUI = function (thisObj)

    {

    Dockable panel or pallet

    var pal = (thisObj instanceof Panel)? thisObj: new window ("palette", "selectionViewer", undefined, {resizable: false});

    Var = pal.add ("statictext", 2, 2, 201 (20) and "Selected Item");

    }

    Methods

    selectionViewer.updateSelected = function()

    {

    testText.text = app.project.activeItem;

    }

    This.Run = function (thisObj)

    {

    this.buildUI (thisObj);

    app.addEventListener ("afterSelectionChanged", selectionViewer.updateSelected);

    };

    }

    new SelectionViewer () .run (this);

    It gives me this error:

    "Cannot run the script on line 24. Funtion app.addEventListener is not defined.

    Any help?

    Thank you

    Wagner

    I think that the 'events' are only the keyboard and mouse events that occur within your group (click, mouseover, etc..)

    Dan

  • Litener is not listening

    Hello
    I'm working on the database to oracle 10g and HP - UX.
    The database taken down for a few days. Now I've done it upward, but the listener does not listen to this database.

    LSNRCTL > status
    Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=mgfpdmdb) (PORT = 1521)))
    STATUS of the LISTENER
    ------------------------
    Alias LISTENER
    For HP - UX TNSLSNR version: Version 8.1.7.4.0 - Production
    Beginning of November 3, 2010 03:32:47
    Availability 15 days 6 h 47 min 35 sec
    Draw level off
    Security ON
    SNMP OFF
    Parameter Listener of the /opt/appl/oracle817/network/admin/listener.ora file
    The listener log file /opt/appl/oracle817/network/log/listener.log
    Summary of endpoints listening...
    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=139.74.246.61) (PORT = 1521)))
    (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC)))
    Summary of services...
    Service 'LGDATA' has 1 instance (s).
    'LGDATA' instance, State LOAN, has 1 operation for this service...
    Service 'WASFO1' has 1 instance (s).
    'WASFO1' instance, State LOAN, has 1 operation for this service...
    Service 'WASMIG' has 1 instance (s).
    'WASMIG' instance, State LOAN, has 1 operation for this service...
    The command completed successfully
    LSNRCTL >

    Here, my "PROD2" name database is missing.
    What is tryined to recharge the listener...

    LSNRCTL > reload
    Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=mgfpdmdb) (PORT = 1521)))
    AMT-01169: the listener has not recognized the password
    LSNRCTL >

    I get this error...

    Files of the listener is

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = mgfpdmdb) (PORT = 1521))
    )
    )
    )

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PROD2)
    (ORACLE_HOME = / opt/appl/oracle1020)
    )
    (SID_DESC =
    (SID_NAME = PROD8T)
    (ORACLE_HOME = / opt/appl/oracle1020)
    )
    (SID_DESC =
    (SID_NAME = WASFO1)
    (ORACLE_HOME = / opt/appl/oracle817)
    )
    )


    # - ADDED BY TNSLSNR ON JANUARY 18, 2006 12:07:11 -
    #PASSWORDS_LISTENER = sphT668z
    #--------------------------------------------


    Any idea... . How to disable this password... .or how to save my database to him...

    You stop listener, is not the production could...

    You can kill the session to the listener as

    $ps - ef | grep tns
    $ kill-9

    and then change the listener.ora file

  • several addEventListener does not work

    Hello

    I try to activate 2 buttons at the same time in the timeline panel, but does not work...

    Here is the code:

    this.tastogiu.tasto.addEventListener ("click", fl_ClickToGoToAndPlayFromFrame_1.bind (this));

    function fl_ClickToGoToAndPlayFromFrame_1()

    {

    This.MC.Play ("stepuno");

    This.Play ("required");

    This.tastogiu.Play ();

    }

    this.tastosu.tastodue.addEventListener ("click", fl_ClickToGoToAndPlayFromFrame_2.bind (this));

    function fl_ClickToGoToAndPlayFromFrame_2()

    {

    This.MC.Play ("stepunoout");

    This.Play ("consulenzaout");

    This.tastosu.Play ();

    }

    Thank you!

    multiple addeventlistener works, then you call two functions in a single click listener, but this.mc and this.play cannot display more than 1 frame at a time, so they will display the last image, they are directed to display ("stepunoout" and "consulenzaout", RESP).

    If you try to run the this.mc and this.play to play the frames sequentially, you need code to do this using a loop (like enterframe or timer) or use the code on different periods (which is not necessarily a good idea).

  • Please help, event listener is not listening

    Hey, I'm stuck trying to use a code that I used in the past to pass args via an event listener. I need to find a way to do

    That's what I'll do, using an inline function. I do not completely understand how it all works, but we know that in an FLA open it works and the other is not. The thrown error is #1178: any attempt of property inaccessible spotlightBox via a static reference type... "SpotlightBox is the name of the function that I'm moving data.

    The main difference in the two DFL is that, in the broken, it is built inside a loop for. But do not know how this is a problem. If you have some tips I would be very happy. My work time is tomorrow and I'm stuck.

    It is used inside a block for each sprite:

    addEventListener (MouseEvent.ROLL_OVER, function onRoll_Over(e:Event) {spotlightBox (e, new Array("5"))});

    And here's the function:

    function spotlightBox(e:Event,_arg:Array):void
    {
    trace(arg[0]);

    }

    use:

    addEventListener (MouseEvent.ROLL_OVER, function(e:Event) {spotlightBox (e, new Array("5"))});

    function spotlightBox(e:Event,_arg:Array):void
    {
    trace(arg[0]);

    }

    but your main problem uses a with() statement to add listeners.  It probably won't work.

  • Can not listen using bluetooth headphones with music Apple after updating iOS 10

    I've updated my iPad to iOS 10 Air yesterday. This morning, I plugged my bluetooth headset and tried the Apple music (specifically, the NPR radio station). It sends output to the speakers of the iPad and not the bluetooth headset, and after several attempts does not connect to the bluetooth headset. I checked the bluetooth connection and verified that I could hear Siri through headphones. But Apple music seems not to want to use bluetooth headphones, whatever it is I'm looking for.

    Any suggestions or help would be greatly appreciated.

    Hi the edema,

    It is my understanding that you are experiencing some problems with Apple's music stations on your iPad don't play no not by your Air Bluetooth headset. I listen to music Apple all the time and I know it's nice to be able to listen to the radio stations with headphones. I will do my best to help you.

    As you have noted that you can hear Siri through Bluetooth speakers, you can also try a different like YouTube app to see if you can hear the audio from there through your headphones? In addition, if you do not already made, conclusion of the music app and reopen it and try to play the station again. This happens just this specific station or any station you are listening to?

    Even if you did the following steps part of this article, to get help to connect a Bluetooth accessory with your iPhone, iPad or iPod touch device, there are a couple of additional ones that can help.

    1. Make sure that your device iOS and Bluetooth Accessory are close together.
    2. Make sure your Bluetooth accessory is on and fully charged or connected to power. If it uses batteries, test them to see if they need to be replaced.
    3. Restart your Bluetooth accessory.
    4. Make sure you have the latest version of iOS on your iPhone, iPad or iPod touch.
    5. On your iOS device, go to settings > Bluetooth and make sure Bluetooth is on. If you cannot turn on Bluetooth or you see a spinning gear, restart your iPhone, iPad or iPod touch.
    6. Cancel pairing the Bluetooth accessory, replace the accessory in discovery mode, then the pair and plug it in again.

    Thanks for stopping by Apple Support communities. See you soon.

  • iTunes not listen or download my TV shows.

    I am running iTunes 12.4.3 on El Capitan 10.11, currently connected to my account. I bought episodes of TV shows that I listened to before, but today they will not leak. When you try to download them, an error message appears saying that the episodes cannot be downloaded or the other. I rebooted my machine one or twice to nothing does, and iTunes displays up to date.

    Any advice?

    I bought Game of Thrones in the States and in streaming in France, but I don't think that would be a problem I've been streaming fine for the last few days.

    Any help is appreciated!

    Hello

    Your problem happens because of your change of places. Your purchase will apply only to the USA and you can not download them in another country.

    Jim

  • How do the 5 server not listening on ports 80 and 443

    I want to configure an Apache Server on a Linux virtual machine (using the last VirtualBox) on my Mac running El Capitan 10.11.3.

    5.0.15 server is already running on the Mac (and I want to keep it, with the exception of web services). I have disabled the sharing in the web server user interface, but it was not enough, Apache listening ports 80 and 443, prohibiting VirtualBox to listen to them and transmits them to the Linux virtual machine.

    So I put comment out these lines in /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf:

    #listen 80

    #listen 443

    8008 #listen

    #listen 8800

    8443 #listen

    8843 #listen

    After a restart, Apache seems not to listen to ports 80 and 443 more. However, VirtualBox does not become the listener. I tried this command in the Mac terminal:

    -i sudo lsof: 80

    and nothing has been returned, suggesting that something in OS X still prevents VirtualBox to listen to ports 80 and 443. If I try to convey some random host port of Mac to port 80 in the virtual machine, then I can my virtualized server access from Safari on the Mac host via the custom port said. But I would use the standard port 80.

    Any help really appreciated.

    Instead of commenting, assign a specific IP for the server listen instead of * (which means that all the IP addresses). This is only to the server on port 80 and 443 in this config file. I sometimes give an additional IP address to the Ether. Your Linux Machine can connect to the second IP address or the first initial assigned to your server depending on your configuration.

    Server is very aggressive in it's use ports, he leaves so all services to operate, even if you have the use of ports to other IP addresses.

    Leo

  • Why can I not listen to music without wifi on my new ipod touch.

    I'm frustrated that I went out and bought a new ipod because that my last one broke, and I can't understand why I can't listen to my songs on it withought be connected to WIFI...

    Thank you!

    You use an Apple music subscription or is this music that you own and synchronize was to the iPod via iTunes? If his music Apple so won't make music available for listening offline by downloading the songs?

    If you have not connected to wifi in a while Apple music may require a temporary connection to validate that your subscription is still active, before he'll play songs downloaded offline. I don't know exactly how many times he needs to do this, but on my iPhone I can still play my downloaded music to Apple if I pass the iPhone in airplane mode.

  • Updated the player and now can not listen to internet radio stations - why?

    Updated to 14.0.0.145 the other day and now can't just listen to internet radios that worked fine before the update (WABC, WMAL, KSFO). The programs will not download. Podcast of WMAL works well. No problem with Youtube, etc...

    I have Windows 7 and IE 10.

    Can anyone help?

    Thanks in advance.

    I wonder if it¹s a cookie thing.  You could just clear your cookies and see

    What is happening.

  • Oracle 10g homepage not opening not... Oracle DB not listening to port 8080.

    I installed oracle 11g xe and home page did not come to the top. same thing happens when I installed oracle 10g xe. The homepage can be connected and run sql command line is also not not opening. I checked in services.msc that OracleServiceXE and OracleXETNSListener is running.

    Firewall is disabled. Using XP SP3. Already had Oracle 8i and uninstalled and deleted all remaining sound files manually.

    I opened cmd and typed-

    C:\ > SQLPLUS / as sysdba startup

    I got this result-

    SQL > startup ORA-01078: failure in the treatment of the system ORA-01565 settings: error in the identification of the files 'C:\oraclexe\app\oracle\product\10.2.0\serv er\dbs/spfileXE.ora' ORA-27041: could not open the OSD-04002 file: could not open the file S/O-error: (OS 2) the system cannot find the file specified. SQL > disconnected

    I typed-

    C:\ > telnet localhost 8080

    I got this result-

    Connecting to localhost... Could not open connection to the host, on port 8080: connection failed

    I did not the configuration changes to all files .ora and nothing is listening on port 8080. I deleted IE (off the frustration of slow speed), and only have Chrome, Firefox n Safari on my system. Does it matter?

    I also disabled WLAN n DB restarted but of no use... Check the LSNRCTL status given.

    LSNRCTL > status
    Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC_FOR_XE)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - production
    ction
    Start date December 2, 2011 10:00:30
    Uptime 0 days 0 h 21 min 31 sec
    Draw level off
    Security ON: OS Local Authentication
    SNMP OFF
    Default Service XE
    Listener parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\a
    dmin\listener.ora
    Listener log file C:\oraclexe\app\oracle\product\10.2.0\server\network\l
    og\listener.log
    Summary of endpoints listening...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = guddus-comp)(PORT=1521)))
    Summary of services...
    Service 'CLRExtProc' has 1 instance (s).
    Instance of 'CLRExtProc', status UNKNOWN, has 1 operation for this service...
    Service 'PLSExtProc' has 1 instance (s).
    Instance of 'PLSExtProc', status UNKNOWN, has 1 operation for this service...
    The command completed successfully

    For the removal of Win services, find out about 'sc' (sc delete).

    Path indicators system of additional Oracle installs (ora92...). Who installs is 'in progress' and who is uninstalled?

    What happens if you just to open a command prompt and run oradim?

    What is the oracle.key file exists in dir\bin House xe? What is its content?

  • Suddenly SIRI is not listening

    Installed version master Sierra gold several days ago. SIRI works very well. Not this morning. Citing SIRI brings dialog SIRI, but activity remains perfectly straight when I talk. Sound is set to the internal mic and the pref panel hears me. Have you tried to restart the Mac, disabling SIRI then on of pref.; no love. Any suggestions as what to following are welcome.

    Install the final version. There will be 2 issued GMs. Maybe your current No.

Maybe you are looking for