开发者

How to send Data from HTML Form to Flash SWF?

I have an html form. I need to send its data to flash on submit button push.

We have this HTML form

<form>
First name:
<input type="te开发者_高级运维xt" name="firstname" />
<br />
Last name:
<input type="text" name="lastname" />
</form>

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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜