• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 935
  • Last Modified:

Sending variables from Flash to JavaScript

If I create an input field in Flash, how then do I send that variable to JavaScript, to then send over to a PHP script via AJAX? Thanks.
0
jcbodyworks
Asked:
jcbodyworks
  • 2
1 Solution
 
julianopolitoCommented:
from flash to javascript:
//In flash
ExternalInterface.call("yourJSFunction","yourValueFromField")

in yourJSFunction you call ajax->php (if you do not know how to call ajax i send you an example)
0
 
ZvonkoSystems architectCommented:
In ActionScript you set the JavaScript var like this:

getURL("javascript:yourVarName='yourConentForTheVar';");

The var is then set in Global scope to the window where the Flash is running.

0
 
ZvonkoSystems architectCommented:
Or like juliano proposed but for older versions:

getURL("javascript:yourFunctionThatCallsAJAX('yourConentForAJAX',orMoreVars,'andMoreString');");




0
 
jcbodyworksAuthor Commented:
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now