Do center popup in the popup itself, passing "this" as the parameter, and use custom events to pass data to and from popups:
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
Flex / AIR Development, Training, and Support Services
interesting... so basically i would create custom packages and events, and use them to import and export data?
one of the solutions i found was to just use the titlewindow as an array of elements and assign my data to those elements like
videoTtlWin = new videoDataPopup(); videoTtlWin = PopUpManager.createPopUp(this, videoDataPopup, true) as videoDataPopup; videoTtlWin["allVideos"].dataProvider = displayAllVideoData; videoTtlWin["appliedVideos"].dataProvider = appliedVideoData; videoTtlWin["moveToApplied"].addEventListener(MouseEvent.MOUSE_DOWN, moveToAppliedVideos);
im not sure if this is good programming practice tho.... probablly has a lot of security drawbacks.. yes?
If you have a model-view or MVC architecture, the popup would access the
data model and you wouldn't need code that assumes the set of properties on
the popup. However, if you do want to make such an assumption, there should
be no reason to use ["allVideos"] if you've typed the videoTtlWin as
videoDataPopup, you should just be able to use videoTtlWin.allVideos.
Which way to go is more or less up to you and where you want to have
When the popup is "done" it should probably dispatch a custom event
containing useful information otherwise the code has to assume something
about the set of properties in the popup again. But again, it is the same
trade off. You'll spend more time creating those abstractions but then it
will be easier to swap things for different implementations later. If you
don't need that or don't have time, then make assumptions about the
properties and you should be fine.