File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Flex and the fly likes calling javascript  function  from ActionScript Method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "calling javascript  function  from ActionScript Method" Watch "calling javascript  function  from ActionScript Method" New topic
Author

calling javascript function from ActionScript Method

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,
I am calling javascript function "isReady()" from ActionScript as shown using ExternalInterface call method

code inside Test.html


code inside MXML File :



I am calling this javascript function "isReady()" from ActionScript as shown .

Please tell me is

1. ExternalInterface.call("isReady"); // I am calling this on a button click of MXML , Is this correct parameter inside the call ??
2. Please tell me what other configuration do i need to do to access the HTML ??


Thanks .



Save India From Corruption - Anna Hazare.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


1. ExternalInterface.call("isReady"); // I am calling this on a button click of MXML , Is this correct parameter inside the call ??

If this is the name of your function then yes.


2. Please tell me what other configuration do i need to do to access the HTML ??

Just what comes out the box.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
jp roberts
Greenhorn

Joined: Feb 19, 2009
Posts: 14
Is it also possible to call an function within a swf file (mxml application) from javascript embedded in a html page?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Yes. ExternalInterface will do this too.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: calling javascript function from ActionScript Method