How to Add conditional logic for the Submit button? - Flash

How to Add conditional logic for the Submit button?



- Conditional logic is used to take actions based on certain criteria using Action Script.

The following script performs one action if the user enters no data in the text field and another actions if the user enters data in the text field.

1. Select Frame 1 of the Actions Layer.
2. Press Enter.
3. Click Insert a Target Path from Actions panel.
4. Check the Relative from Insert Target dialog box.
5. Click on submit_btn in the hierarchical tree
6. click on OK.
7. Type a period after submit_btn and type onRelease.
8. Place the insertion point between the curly braces and press Enter.
9. Type if(url_txt.text==null || url_txt.text=="") { in the script pane.
10. Press Enter. Type gotoAndStop("error"); in the Script pane.
11. Press Enter.
Post your comment