Communicating between Flash 8 and 9 players through FlashInterface

Filed under: Articles — Robert Taylor at 10:06 am on Thursday, November 9, 2006

The Flash Player 9 runs in a new ActionScript Virtual Machine (AVM). Though many new projects can be developed ground up using Flash 9 or Flex, it is likely that your projects will still be using elements and SWFs that have been published for the Flash 8 player or lower. Flash has always offered the ability to load up one SWF inside of the other and then you could treat that SWF as if it resided as a native inside the loading SWF, communicating and driving it directly within your application. Communicating between the two AVMs is no longer that simple.

FlashInterface is a set of AS2.0 and AS3.0 classes that offer a solution to communicate between the AVMs with a common API. FlashInterface will allow you to move forward, building Flash 9 player applications while still using existing SWF resources from previous Flash player versions.

In the next few blogs I will go into further detail with examples and scenarios for using FlashInterface in your Flash and Flex projects. The APIs for the classes are fully documented, and there are online examples. Other examples will be available shortly.

Download FlashInterface Classes

2 Comments »

Comment by xiaoffan

October 28, 2007 @ 10:30 pm

LocalConnection allows 2 Flash documents to talk asynchronously even if they are in 2 HTML documents (e.g. in 2 iframes).

FlashInterface seems to only connects Flash documents in the same HTML document, though it supports synchronous communication.

Is there a solution to let Flash documents in multiple HTML documents to talk synchronously?

Thanks a lot!

Comment by Robert Taylor

October 29, 2007 @ 9:08 am

The intent of FlashInterface is to allow communication of flash 8 swf when it is loaded in a flash 9 swf. It has other benefits as demonstrated but if you want a solution where they can communicate across html pages, then use either LocalConnection or there are other solutions that also wrap around the AS API, such as FlashBridge found here http://www.gskinner.com/blog/archives/2007/07/swfbridge_easie.html

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.