?
Solved

Flash and Javascript -DOM question

Posted on 2004-11-24
3
Medium Priority
?
177 Views
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?

blu.
0
Comment
Question by:blue-genie
  • 2
3 Comments
 
LVL 9

Expert Comment

by:dutchfoxer
ID: 12666850
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:
getURL("JavaScript:window.location.function();");
0
 
LVL 39

Author Comment

by:blue-genie
ID: 12672503
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)

blu.
0
 
LVL 9

Accepted Solution

by:
dutchfoxer earned 750 total points
ID: 12672687
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

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

In flash (embeded inside content.htm) you can have the following action connected to a button for example:
getURL("JavaScript:LMSIntialise();");
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
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 how to look for a specific file type in a local or remote server directory using PHP.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

807 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