javascript function call from Flash

  • Follow


Hi,

i need to invoke a javascript function while clicking a button that is
in a flash movie.
i hav used geturl() to redirect the page to some other page.
but is it possible to call a javascript function from FLASH..??

please help me

Regards
Anees

0
Reply muhd.anees (19) 7/11/2007 3:18:47 AM

"Anees" <muhd.anees@gmail.com> wrote in message 
news:1184123927.242834.57440@r34g2000hsd.googlegroups.com...
> Hi,
>
> i need to invoke a javascript function while clicking a button that is
> in a flash movie.
> i hav used geturl() to redirect the page to some other page.
> but is it possible to call a javascript function from FLASH..??

Sorry if this shows up twice.  I thought I already answered this, but OE 
shows no trace of it.  The short answer is that you can use the javascript 
protocol with geturl.  There are at least two other methods, but not all of 
them work in across all browsers and Flash versions.  The long answer 
involves detecting the Flash version with script and there are exactly zero 
competent examples of this on the Internet.  Adobe's own "future-proof" 
deployment kit is one of the worst, which should tell you something.

BTW, don't use Flash unless absolutely necessary (and it is never absolutely 
necessary.)

>
> please help me
>
> Regards
> Anees
> 


0
Reply David 7/11/2007 6:56:23 AM


Anees wrote:
> i need to invoke a javascript function while clicking a button that is
> in a flash movie.
> i hav used geturl() to redirect the page to some other page.
> but is it possible to call a javascript function from FLASH..??
> Anees

There are 3 ways to call javascript from Flash.

#1 - You can do this: getURL("javascript:alert('hello world')");
Note, this can result in a "navigation click" sound on Windows/IE.

#2 - use an FS command (this needs the JavaScript to be FS command aware).

#3 - Use the Flash8+ ExternalInterface

You'll get more useful help for Flash from one of the Adobe support forums.

~dd
0
Reply d 7/11/2007 7:54:42 AM

2 Replies
100 Views

(page loaded in 0.052 seconds)


Reply: