Just a random question to extend this, is there functionality for _javascript_ to call Flex functions?

 

 

_________________________________________

Jonathan Miranda

Flexible Master of the Web

"In the game of chess, it's important to never let your opponent see your pieces."

HealthGrades: Guiding America to Better Healthcare™

NASDAQ: HGRD

w  (720) 963-3832

c  (707) 761-0868

[EMAIL PROTECTED]

_________________________________________

The message contains confidential and/or legally privileged information and is intended for use only by the indicated addressee.  If you are not the named addressee you should not disseminate, distribute, or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmissions cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed,arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Horn
Sent: Wednesday, March 01, 2006 8:50 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Calling JS from ActionScript and vice versa

 

Not sure why a new class is being declared inside a script block... You
can try the examples in this section of the Developing Flex Applications
book:

"Accessing _javascript_ functions from Flex"
http://livedocs.macromedia.com/flex/20beta1/docs/00001303.html

Hth,

Matt Horn
Flex docs

> -----Original Message-----
> From: flexcoders@yahoogroups.com
> [mailto:flexcoders@yahoogroups.com] On Behalf Of Mike Potter
> Sent: Wednesday, March 01, 2006 10:01 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Calling JS from ActionScript and vice versa
>
> I'm going through the example here,
> http://labs.macromedia.com/wiki/index.php/ActionScript_3:resou
rces:FAQ#How_can_I_call_a_JavaScript_function_from_ActionScript.> 3F
> on how to call a JS function from ActionScript.
>
> I have the following MXML:
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"
> xmlns="*" layout="absolute">
>       <mx:Script>
>             <![CDATA[
>                   import flash.external.ExternalInterface;
>                  
>                   public class ExternalInterfaceTest
>                   {
>                         public function ExternalInterfaceTest()
>                         {
>                              
> ExternalInterface.call("myJavaScriptFunction", "Hello World");
>                         }
> }
>             ]]>
>       </mx:Script>
> </mx:Application>
>
> Why do I get an error that says "Classes must not be nested"
> on the line for public class ExternalInterfaceTest?
>
> More importantly, what is the correct code for calling a JS
> function via AS, and vice versa?  Oh, and I'm happy to edit
> the wiki when I find out what's wrong. :)
>
> Mike
>
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>

>
>
>



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to