Flash and Javascript -DOM question

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.
LVL 39
blue-genieAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dutchfoxerCommented:
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
blue-genieAuthor Commented:
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
dutchfoxerCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.