var ref_mc:Button = Button ( createChild ( Button ) );
ref_mc.addEventListener("click", Delegate.create ( this, onClick ) );

function onClick(event_obj:Object):Void
{
    trace("clicked the mofo");
}

----- Original Message ----- 
From: "Mark Wales" <[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Wednesday, October 26, 2005 3:24 PM
Subject: RE: [flexcoders] Usage of CreateClassObject & CreateComponent



If you don't mind a follow-up question from someone else, how do you
then listen for the events that will come from the new Button that is
created?

For example, I've tried calling "clickBroadcast" but it didn't seem to
work.

Thanks,

-Mark 


-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: Wednesday, October 26, 2005 2:19 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Usage of CreateClassObject & CreateComponent

<mx:Script><![CDATA[

import mx.controls.Button;

function onInit()
{
    createChild ( Button );
    // or
    createClassObject ( Button, "my_btn", getNextHighestDepth() );
}

]]>
</mx:Script>
----- Original Message ----- 
From: "Libby" <[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Wednesday, October 26, 2005 2:49 PM
Subject: [flexcoders] Usage of CreateClassObject & CreateComponent


Can you use these methods (CreateClassObject and/or CreateComponent)
inside of a class to create a mxml compound object? It doesn't work
for me but that doesn't mean much : )

If it is possible to do this, a snippet example would be very helpful
as I have about given up.

Thanks,
Libby






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
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 
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 
Yahoo! Groups Links



 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to