1 Reply Latest reply on Jun 17, 2008 6:50 PM by *gsb*

    LocalConnection woes

    BrianG_DJI
      I am trying to play a SWF created in Flash 8 through a swf loader in Flex 3. I want to pass a value to a variable in the SWF from the Flex app. I also want to pass a value back from the SWF to a variable in the Flex App. According to everything I've read, the only way to use this is through LocalConnection. I looked at some examples online and tried to set my files up accordingly. I couldn't get it to work. So I tried to set up a very simple test based on one of the examples I found. Even that did not work. What am I doing wrong?!
      Here is the code from my simple test's Flex File -- When I try to compile it gives me the following errors. At line 7 - "1046: Type was not found or was not a compile-time constant: LocalConnection" And at line 9 "call to a possibly undefined method LocalConnection"
      I am developing with FlexBuilder 3, on Mac OS 10.4, with Firefox as my default browser.
      Any help will be greatly appreciated!
        • 1. Re: LocalConnection woes
          *gsb* Level 1
          I actually use the ExternalInterface for such communications. Of course, if the user disables Javascript, it fails, but ...

          The ExternalInterface is synchronous and allows a return value as well. There are some examples out there for that as well.

          Greg