Creating the Actionscript
- Open the actions tab for the send button (modify >Instance >actions)
- Create the following code:
On (Release) If (txtName ne "" and txtCompany ne "" and txtPosition ne "" and txtFrom ne "" and txtmessage ne "") Load Variables ("cdontsMail.asp", 0, vars=POST) Go to and Play ("valid") Else Go to and Play ("invalid") End If End OnNB: Look at the .fla file for a better idea of how this is done.
What we've done:
We have created an action script which checks whether all variables (text fields) have a value. If they do (If txtName ne (does not equal) "" (nothing)) the actionscript tells Flash to send their values to a page called cdontsMail.asp and play the valid 'screen'. If any variable does not have a value (ie: the text field is empty) the actionscript simply sais go and play the invalid 'screen'
|» Level Intermediate|
Rating: 8 Votes: 211
|No information about the author has been provided.|
|Download the files used in this tutorial.|
|Download (50 kb)|
|More help? Search our boards for quick answers!|