Flash and Javascript -DOM question

Posted on 2004-11-24
Last Modified: 2013-11-19
Hi ees.

Is it possible for flash thats embedded in a html page, to call a javascript function  that's residing in a different js page?

Question by:blue-genie
    LVL 9

    Expert Comment

    Well javascript can do that, if the name of the different js-page is known.

    So you can have flash calling a Js-function on its own page, that js-function calls a js-function on another page. Would that be a solution?

    If the function is simple enough then you could do it directly from flash:
    LVL 39

    Author Comment

    df, help me out here....

    lets say my page is launchapi.js

    the current page where the swf is embedded is content.htm

    i have a javascript function in launchapi.js called LMSIntialise();

    how do i set the location and all that?

    (me don't get the dom thing)

    LVL 9

    Accepted Solution

    launchapi.js is not Actually another page, it is an external javascript file. So you link it in your content.htm so it can be used by content.htm

    <script language="javascript" src="launchapi.js"</script>

    In flash (embeded inside content.htm) you can have the following action connected to a button for example:

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
    I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
    The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

    746 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

    20 Experts available now in Live!

    Get 1:1 Help Now