i completely agree with Jeff - using the events is the best way to go.

If, for some reason that doesn't work for you, you can always reference the 
application 
using mx.core.Application.application, which is a reference to the top top 
Application 
(even if your swf is loaded inside another application's swf.

You can also traverse the parent application(s) for nested apps with any 
component's 
parentApplication property:

http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/
wwhelp.htm?context=LiveDocs_Parts&file=00000644.html



--- In flexcoders@yahoogroups.com, "Battershall, Jeff" <[EMAIL PROTECTED]> 
wrote:
>
> Your custom component should dispatch its events. The parent application
> which should be listening for them. 
> 
> Something like this might work:
> 
> <comp:MyComp itemClicked="popUpWindow(event)"/>
> 
> Jeff
> 
> -----Original Message-----
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Megan
> Sent: Wednesday, August 23, 2006 1:15 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Functionality Between Components and the Main
> Application
> 
> 
> Hi! I've been trying to figure out how to do this sort of thing, and
> thought I'd ask before messing with it anymore.
> 
> I have a toolbar that's in its own component, and it has some buttons on
> it that will open new windows/popups. What I need to have happen is,
> when one of the buttons gets clicked, the window pops up inside a
> container that's on the main application. Right now they show up at the
> top corner of the toolbar.
> 
> I gave the VBox in the middle of the main application an ID, but when I
> try to tell the toolbar to open the window there, it gives me an error
> because that ID doesn't exist inside the toolbar...
> 
> I've also tried telling the button to run a function in the main
> application to open the popup but it tells me that I'm "calling a
> possibly undefined method through a reference with static type Class".
> 
> I hope that makes sense. Any ideas?
> 
> Thank you!
> 
> 
> 
> 
> 
> 
> --
> 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

<*> 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