Saturday, 23 April 2016

Custom Random Number Generator JAVA TO FLASH

Custom Random Number Generator


-----------------------------------------------------------------------------------------------------------------
Custom Random Number Generator JAVA CODE
http://www.mathgoodies.com/calculators/random_no_custom.html
-----------------------------------------------------------------------------------------------------------------
<script LANGUAGE="JavaScript">
function chooseRandom(form) {
var m = parseInt(form.lower.value);
var n = parseInt(form.upper.value) - m;
var output = Math.round(Math.random() * n) + m;
form.result.value = output;
}
function clearForm(form) {
form.upper.value="";
form.lower.value="";
form.upper.focus();
form.upper.select();
}
</script>
-----------------------------------------------------------------------------------------------------------------
Custom Random Number Generator JAVA TO FLASH CODE
(form.lower.value) CHANGE INTO (Form1.text)
-----------------------------------------------------------------------------------------------------------------
ENTER.onPress=function(){
var m = parseInt(Form1.text)
var n = parseInt(Form2.text) - m;
var output = Math.round(Math.random() * n) + m;
Form3.text = output
}
CLEAR.onPress=function(){
Form1.text  = ""
Form2.text  = ""
Form3.text  = ""
}
-----------------------------------------------------------------------------------------------------------------
Custom Random Number Generator JAVA TO FLASH CODE
(form.lower.value) CHANGE INTO (Txt1.text)
-----------------------------------------------------------------------------------------------------------------
ENTER.onPress=function(){
var m = parseInt(Txt1.text)
var n = parseInt(Txt2.text) - m;
var output = Math.round(Math.random() * n) + m;
Txt3.text = output
}
CLEAR.onPress=function(){
Txt1.text  = ""
Txt2.text  = ""
Txt3.text  = ""
}
-----------------------------------------------------------------------------------------------------------------
OR USE THIS CODE
-----------------------------------------------------------------------------------------------------------------
ENTER.onPress=function(){
var m:Number = Number(Txt1.text)
var n:Number = Number(Txt2.text) - m;
var output:Number = Math.round(Math.random() * n) + m;
Txt3.text = output
}
CLEAR.onPress=function(){
Txt1.text  = ""
Txt2.text  = ""
Txt3.text  = ""
}
-----------------------------------------------------------------------------------------------------------------
EXPORT BY JS  FLASH TOOL KIT IMAGES
window>ToolkitforCreatJs
-----------------------------------------------------------------------------------------------------------------
Custom Random Number Generator

Custom Random Number Generator

Custom Random Number Generator









EmoticonEmoticon