great!  : )



2006/5/22, Xavi Beumala <[EMAIL PROTECTED]>:
Hi Carlos,

that was it!!

Thanks so much
X.

On 5/22/06, Carlos Rovira < [EMAIL PROTECTED] > wrote:
Hi Xavi,

I don't know if this could be of help to you:

http://www.darronschall.com/weblog/archives/000224.cfm

Please tell me if is related to your problem

Best,

C.



2006/5/22, Xavi Beumala <[EMAIL PROTECTED] >:
Hi all,

I'm launching a popUp with a custom component inside through PopUpManager. This custom component has a button that when pressed dispatches an event. The launcher application is subscribed to this event but the event never gets to the listener.

Here's the code:

FILE: Launcher.mxml

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml " layout="absolute"
                creationComplete="init()">
    <mx:Script>
        <![CDATA[
            import mx.containers.TitleWindow;
            import mx.managers.PopUpManager ;
           
            public function init():void {
                addEventListener("testEvent",myListenerFunc);   
            }
           
            public function launch():void {
                var win:TitleWindow = PopUpManager.createPopUp(this,TitleWindow,true) as TitleWindow;
                win.title = "Hello World";
                PopUpManager.centerPopUp(win);
                win.addChild (new FloatingPanel());
                //win.addEventListener("testEvent",myListenerFunc);
            }
           
            public function myListenerFunc(evt:Event):void {
                trace ("aquĆ­");
            }
        ]]>
    </mx:Script>
    <mx:Button label="launch" click="launch()"/>
</mx:Application>

FILE: FloatingPanel.mxml

<?xml version=" 1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml " width="100%" height="100%">
    <mx:Script>
        <![CDATA[
            import flash.events.Event;
       
            public function launch():void {
                dispatchEvent(new Event("testEvent",true));
            }           
        ]]>
    </mx:Script>
    <mx:Button label="hello" click="launch()"/>
</mx:Canvas>

Am I missing something about event bubbling? If I uncomment the line //win.addEventListener("testEvent",myListenerFunc); then all works fine. But in the code I'm working on can't use this workarround because I don't know which will be the raised events.

Thanks in advance
best
X.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS






--
::| Carlos Rovira
::| http://www.carlosrovira.com

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS






--
::| Carlos Rovira
::| http://www.carlosrovira.com

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to