Hi everyone I'm new in both languages... I found a example for scrambled numbers in JavaScript and HTML I would like to convert that code into ActionScript code, the languages looks similar for me but when I compile it in Flash Builder nothing happens... I would like to understand how to do the example but in ActionScript and MXML code...
JavaScript code parts that I don't understand how to do it in ActionScript:
function check(value)
{
if ( value != Math.round(value) )
alert("You must enter an integer in this input box.");
}
function generate( )
{
var minval = parseInt(**document.form.min.value**);
if ( isNaN(minval) || minval != parseFloat(**document.form.min.value**))
And To implement this with TextInput in HTML:
<INPUT TYPE="text" NAME="**min**" VALUE="" ONCHANGE="check(**this.value**)">
I don't know hot to leave it in AS3 and MXML... I tried:
public function generate()
{
var minval = parseInt(**min**);
if ( isNaN(minval) || minval != parseFloat(**min**))
{
and the MXML:
<s:TextInput id="**min**" change="**check(this)**" />
As you can see I'm very lost...
public function name( arg:DataType, arg2:DataType2 = DefaultValue ):ReturnDataTypeand a variable isvar name:DataType = new DataType( '''constructor args''' );