The creationComplete event in the custom component should fire automatically (when creation is complete ;).
If you want to fire off an event by hand you would do a dispatch event: dp3.dispatchEvent(new FlexEvent(FlexEvent.CREATION_COMPLETE)); The component should already have a listener registered using the function "functionHandler". Also the (event) pass through is optional. An Alert.show() or trace() within this function will be your best determination if it's firing. I'm not sure if the event gets fired until after its added to the display list. You might also play with the creationPolicy on the parent. Darin Kohles, Application Developer [EMAIL PROTECTED] Digital Positions, Inc. 2289 Peachtree Road NE Atlanta, GA 30309 404-351-8878 support phone 404-351-2366 main phone 404-351-4055 fax http://www.d-p.com/ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Mason Sent: Wednesday, August 22, 2007 5:05 PM To: [email protected] Subject: [AFFUG Discuss] creationComplete Ok, I'm got a wacky problem. It's probably easy and I'm just not see it.. I have an app that is using some open source code. The code has a custom Panel that in the mxml has a creationComplete call.. creationComplete="functionHandler(event);" Now I'm wanting to custom create these Panels on the fly so I'm doing this in AS... Here's an example... private function createPanel():void { var dp3:customPanel = new customPanel; dp3.title = "Panel 3"; dp3.x = 300; dp3.y = 50; dp3.width = 200; dp3.height = 200; v1.addChild(dp3); } Now what is the proper way to apply the creationComplete call to this so the event handler can work properly? Thanks in advance, John Mason [EMAIL PROTECTED] 770.337.8363 www.FusionLink.com - ColdFusion and Flex hosting Now offering ColdFusion 8 Enterprise hosting FREE Subversion hosting ------------------------------------------------------------- To unsubscribe from this list, simply email the list with unsubscribe in the subject line For more info, see http://www.affug.com Archive @ http://www.mail-archive.com/discussion%40affug.com/ List hosted by http://www.fusionlink.com ------------------------------------------------------------- ------------------------------------------------------------- To unsubscribe from this list, simply email the list with unsubscribe in the subject line For more info, see http://www.affug.com Archive @ http://www.mail-archive.com/discussion%40affug.com/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
