I am just trying to figure out the scope of an embedded swf in a flex AS3 project.
I can't get the syntax quite right to set up event listeners for buttons instances on the stage of the embedded swf. These button instances need to do functions in the main project, so the functions and listeners cannot be contained in the published embedded swf. The button instances must be targeted from the main actionscript that embeds the swf in the first place.
I know this is possible, perhaps its the Shake and Bake Method as described on sites where the swf is embedded but with generic mimetype, and then is put through the loader.loadbytes...
it has to do with 'casting', and I have successfully made a timeline intact embed with my movie, but i have no idea how to target the buttons.. so they do nothing yet...
What i want is:
1. self-contained SWF (and accompanying FLA) with 1 button instance named say.. "home" on the stage.
2. apply the embedded SWF as a MovieMaterial to a Plane as the same movieclip scope in the next step.
3. access to that button instance of "home" on the stage when i embed... make an event listener with trace for when "home" is clicked so i can see how it is scoped.