Welcome to WebmasterWorld Guest from

Forum Moderators: open

Calling external javascript functions from within flash?

I need help calling a javascript function on a page from a flash movie

8:42 am on Jun 21, 2007 (gmt 0)

5+ Year Member


I have a small flash movie that loops through a few images and has an on (release) which opens a URL.

We also have javascript on the page, which checks to see if the link/URL a user browses to are part of the site and if they're not it popups a questionaire.

With the flash link this doesn't work, and it popups the questionaire even though it is an interal link.

I have written a small javascript function in the page to force the javascript to think the link is internal, however, I'm struggling to call this function from within the flash movie.

I've tried:

var externalFunction='javascript:set_internal_link';



From with in the same on release () that opens the URL.

I added an alert() to my javascript function but it's not calling the function correctly.

Any ideas/help would be much appreciated.


12:58 pm on Jun 21, 2007 (gmt 0)

10+ Year Member

I haven't done that in a while, and I would have to check syntax, but have you tried storing your javascript in a .js file and calling that with getURL?
9:00 pm on Jun 25, 2007 (gmt 0)

5+ Year Member

can you not write the function in actionscript?
Post your full javascript function that you want to call.

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month