JavaScript & Flash

Posted on 2007-08-06
Last Modified: 2013-11-05

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
Question by:clickclickbang
    LVL 5

    Accepted 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)
    LVL 5

    Expert Comment


    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
    This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
    In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
    The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now