We need to be able to communicate between two swfs (both
written in flex 2.0.1), one loaded into the other with a SWFLoader.
Have read about using the content property of the swf loader, but
we get the following errors:
1 Error #1034: Type Coercion failed: cannot convert
mx.containers::Canvas@162660a1 to flash.display.MovieClip.
2 Error #1069: Property ShowTotal not found on
_Expenses_mx_managers_SystemManager and there is no default value.
Yep, the two most difficult things about working with
SWFLoader are data types and timing.
First, a reference your loader will need to be in instance
scope. This will not do what you expect:
swfPage.id = "expenses";
It will not make the loader available using the "expenses" id
as a reference. I see you are not trying to do that and are using
the "swfPage" variable, which presumably you have declared in
Next, there are two steps to the timing issue. Even though
the loader is "ready", the app that is being loaded is probably
still instantiating. You need to listen for the application's
complete event, before interacting with the content app.