• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 980
  • Last Modified:

JavaScript & Flash


Can someone give me a quick example of how to call a JavaScript function from Flash and call a Flash gotoAndPlay function from JavaScript?

Thanks much!
~ C
  • 2
1 Solution
Flash has a built in mechanism to call JavaScript functions by using the FSCommand action.  There are several requirements for FSCommand to work:

    *      JavaScript must be enabled in the browser.  If not, then the FSCommand will fail (most likely it will do nothing).
    *      Always specify both EMBED and OBJECT tags.  When putting the Flash movie inside a html page, use both tags.  This is because the OBJECT tag is only recognized by Netscape; and the EMBED tag is only recognized by Internet Explorer (as of version 4)

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now