Nested Functions
public function a ( ) {
b( );
function b ( ) {
}
}
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
}
public function getRandomPoint () {
var randomX = getRandomInteger(5, 10);
var randomY = getRandomInteger(10, 15);
function getRandomInteger (min, max) {
return min + Math.floor(Math.random( )*(max+1 - min));
}
}
}
}
Related examples in the same category