Here is great example (by Peter Ent) of localconnection applied between Flex and SWF v8
http://weblogs.macromedia.com/pent/archives/2006/07/using_actionscr.cfm
Hilary
 
--

 
On 7/13/06, Derek Vadneau <[EMAIL PROTECTED]> wrote:
You could use ExternalInterface to communicate between the two. It's as easy to setup as LocalConnection (maybe easier).

Check out this example:
http://tracethis.com/wp-content/playground/SWF9_SWF8_Comms/SWF9_SWF8_Comms.html

The content on the left is created by the SWF9 and the content on the right is a version 8 SWF. Typing in the top textfield of one side updates text in the lower textfield of the other side. And no _javascript_ involved.

With this you could communicate synchronously, even create Proxy/__resolve functionality to make most calls transparent.




On 7/12/06, JesterXL < [EMAIL PROTECTED] > wrote:

Yeah, basically. It's asynchronus communication. It's not as cool as
myLoadedSWF.gotoAndPlay(2), but those are the breaks.



----- Original Message -----
From: "flexnewbie06" < [EMAIL PROTECTED]>
To: <[email protected] >
Sent: Wednesday, July 12, 2006 9:37 AM
Subject: [flexcoders] Re: SWF Loader

Thank you for your response...I am not very familiar with
LocalConnection, however I have a general understanding...would I
need to create a "sender" lc in my Flex app and add a "receiver" lc
in my SWF to make the two communicate?

--- In [email protected], "JesterXL" <[EMAIL PROTECTED]> wrote:
>
> It's an AVM1Movie, not a MovieClip. Unfortunately, this prevents
you from
> talking to the SWF; you have to use LocalConnection, or some other
binary
> socket way.
>
> Have you tried with Flash 9 Alpha yet? I haven't had time but I
bet this'd
> work.
>
> ----- Original Message -----
> From: "flexnewbie06" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Wednesday, July 12, 2006 8:48 AM
> Subject: [flexcoders] SWF Loader
>
>
> I am trying to cast swf as MovieClip in Flex 2.0. The SWF was
> created with Flash 8...I get an coercion error...is this something
> that can not be done or maybe I am doing it incorrectly.
>
> I have posted the error and my code. Any Suggestions?
>
>
>
> TypeError: Error #1034: Type Coercion failed: cannot convert
> flash.display::[EMAIL PROTECTED] to flash.display.MovieClip .
> at EPlayer/::test()
> at EPlayer/___Button1_click()
>
>
> CODE:
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
> layout="absolute">
> <mx:Script>
> <![CDATA[
> import mx.core.FlexMovieClip;
> import mx.controls.SWFLoader;
>
> function test():void{
> var myMovieClip:MovieClip = MovieClip(mySWF.content );
> myMovieClip.gotoAndPlay(1);
> }
> ]]>
> </mx:Script>
>
> <mx:Panel height="406" width="525"
> paddingTop="10" paddingBottom="10" paddingLeft="10"
paddingRight="10"
> y="10" x="10">
>
> <mx:SWFLoader id="mySWF" source="RFP intro.swf" height="338"
> width="459"/>
>
> </mx:Panel>
>
> <mx:Button label="test" x="300" y="424" click="test();"/>
> </mx:Application>
>
>
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com
> Yahoo! Groups Links
>

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links




--

Derek Vadneau



--
Hilary

-- __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to