Give the button an instance name. In this case we'll give it the name "submit" and set the button component parameters to match the settings in fig. 14.
To assign this button to submit the form (as defined in the "Basic Tutorial"), paste the following ActionScript into frame 1 of your main timeline:
submit.onRelease = function() {
myForm.submitForm();
}
If you are using Actionscript 3, use this code instead:
import flash.events.MouseEvent;
submit.addEventListener(MouseEvent.CLICK, onMouseClick);
function onMouseClick(eo:MouseEvent):void {
myForm.submitForm();
}
|