I have a flash .swf file inwhich I embed into my flex
application. In the flex application I have a login. In the flash
file i have buttons which control the navigation of the flash file.
I want to validate if the user is logged in before allowing the
buttons to work. Is this possible?
If you flash SWF is a SWF9 then you will be able to
communicate in a function-call fashion as if the flash SWF is a
component. Using SWFLoader, the content child is the flash SWF.
If you are using a SWF8 or anything earlier, you will need to
use LocalConnection. The reason is the SWF9 is ActionScript 3, just
like Flex, and they reside in the same Flash Player VM (virtual
machine). SWF8 and earlier are ActionScript 2 and must run in a
different virtual machine; this makes it possible for Flash Player
9 to play all previous Flash content.
LocalConnection allows for one-way communication between any
two Flash Players (or VMs).