ExternalInterface lets you communicate with javascript in the html
wrapper.  It is delightfully easy to use. And synchronous!

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Karl Johnson
Sent: Friday, February 23, 2007 11:28 AM
To: [email protected]; [email protected]
Subject: RE: [flexcoders] Access Flex components from browser

 

There are a few ways you can approach this. One is you can pass the
variables in via the querystring and then take them from the querystring
and send them to your flex application via flashvars. If you are using
php/jsp/asp or some other server side processing, this is really easy to
do - just do a response.write of the qs value into the flashvar in the
embed tag where your swf is being embedded into the html file.

 

If you are using straight client side HTML files, then you will have to
write the javascript to extract the parameter values from the url of the
page.

 

If you don't want to use flashvars, you could also set a variable in the
javascript in your hosting html file and then use something like the
Flex Ajax Bridge to get the values of those variables.

 

Check out this article, it should help a good bit:

http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.
htm?context=LiveDocs_Parts&file=00001005.html
<http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp
.htm?context=LiveDocs_Parts&file=00001005.html> 

 

Karl

 

Cynergy

 

________________________________

From: [email protected] on behalf of pioplacz
Sent: Fri 2/23/2007 10:10 AM
To: [email protected]
Subject: [flexcoders] Access Flex components from browser

Hi! 

The thing I need help with is kind of hard to explain. What I want to 
do is access the components in flex from the address line in browser. I 
want to enter text into a textbox from the command line. I want to to 
work kind of like sending variables to php. Something like

http://addresstoflex.com/?textbox=pioplacz
<http://addresstoflex.com/?textbox=pioplacz> 

You know what I mean?

Thx for all the help inadvance!

 

Reply via email to