Contents

Capturing the Keyboard Controlling Frames with JavaScript

Working with Inputs and Forms

This tutorial shows how to add inputs to your movie and post the values to another web page. This tutorial assumes a basic knowledge of Hippani Animator and JavaScript. Add an 'Text Input' and a 'Button' to you movie like shown. We've also added an image.


Working with Inputs and Forms 1

Select the 'Text Input' in the movie and change its 'Script ID' to 'Value'. This will be the name of the value posted to the web page.


Working with Inputs and Forms 2

Add a new function to the general script in the movie properties. This function checks if the value of the input is not empty and then posts it to a ASP.NET web page on our web server. The server page requires more advanced knowledge, all you need to know is that it displays a list of any values posted to it. We use ASP.NET, but you could also use PHP, CGI, Perl, Python etc.



function Submit(){
if(InputGet("Value")!=""){
SubmitPostUrl("http://Hippani.com/InputTest.aspx");
}
}

Start this function from the buttons 'On Click' event.



Submit();

The function can also be started from the inputs 'On Key Press' event. The function runs when the enter key is pressed. The enter key is key number 13.



if(Key==13){
Submit
();
}

To test the movie press 'Play'. Type a value into the input and then press search or enter. The value will be posted to the web page.


Play Play

Working with Inputs and Forms 6

Working with Inputs and Forms FormASP

Capturing the Keyboard Controlling Frames with JavaScript