views:

75

answers:

1

So I have a html form. I need to send its data to flash on submit buttom push. How to du such thing?

We have this HTML form

<form>
First name:
<input type="text" name="firstname" />
<br />
Last name:
<input type="text" name="lastname" />
</form>

We want ON Form items values change to recive tham in Flash app (Via JS for example)

+2  A: 

There is an example in adobe livedocs, I think it does what you need, to send data from js to a flash application using ExternalInterface, here some lines:

<form name="form1" onsubmit="return false;">
         <input type="text" name="input" value="" />
         <input type="button" value="Send" onclick="sendToActionScript(this.form.input.value);" /><br />
         <textarea cols="60" rows="20" name="output" readonly="true">Initializing...</textarea>
     </form>

source: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html#includeExamplesSummary

dome