Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorAran
    • CommentTimeJun 28th 2007 edited
     
    Many people ask about how to interact between flash and the browser using SWFObject. This can be acomplished via two methods.

    Flash 8+
    If you are targeting flash 8+, you can use flash's built in ExternalInterface class. Below are some resources on External Interface:

    Adobe Live Docs
    Nice, simple tutorial on using ExternalInterface by someone at Adobe
    Geoff's demo page of swfObject and ExternalInterface

    There is also two example applications for this located in the samples that install with Flash: C:\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScriptxternalAPI

    ** Note - if you are embedding your flash file within a form element, there is a bug in IE which stops the communication.
    Steve Kamerman has developed a fix for this ***

    Flash 6/7
    For people targetting older flash versions (v6/7), there is the Flash / JavaScript Integration Kit. It uses some local connection trickery and XML to allow you to pass native objects such as Array, Boolean, Number, String etc between js and flash.

    Project homepage on OSFlash
    Tutorial by Danny Patternson on Community MX

    Geoff has actually written a special version of SWFObject which includes some integration between the intgration kit and SWFObject which removes some of the complexity of getting everthing working.

    Source codebase
    An example page