- main.mxml (my main application); and
- local.mxml (the application I'm loading into main.mxml -
just contains a simple TitleWindow with a label that can be
manipulated by buttons clicked in main.mxml)
I then changed this slightly so that I could make use of the
PopUpManager. The reason I did this was so that I could load
local.mxml (or rather the compiled SWF file, local.swf) into a
TitleWindow CUSTOM COMPONENT and therefore allow users to move it
aroundf the screen like a normal windows app. (It's at this point
where you guys can start chipping in and telling me I'm doing it
all wrong!) This then left me with:
- main.mxml (containing PopUpManager to open
- localWindow.mxml (a TitleWindow component that uses
SWFLoader to load local.mxml into itself)
- local.mxml (the application I'm loading into
localWindow.mxml - just a white canvas with a label I want to
access from main.mxml)
Since local.mxml is just a canvas, when I load it into
localWindow.mxml (a TitleWindow custom component) it looks just the
same as the Adobe example but with the added benefit that the
window can be dragged around the screen.
My problem now is that I'm unsure how to access the methods
and variables in local.mxml from the main.mxml application. I
obviously still need to use SystemManager but I'm not sure how.
Can someone please point me in the right direction?
I have been having the same problem and this is what I came
up with...and it's not pretty. I would like to know the right way
to do this, but this worked:
I don't really understand this. I know eventually I type cast
to Object so that I can call any method I want. Without that I get
a "Call to possibly undefined method" error.
If I just do Object(loader.content).doSomething(); I get a
runtime error: " ReferenceError: Error #1069: Property doSomething
not found on _FlexApp_mx_managers_SystemManager and there is no
This all seems very convoluted and I'm sure I'm missing
something. Does anyone know the right way to handle this?