Hy , I can’t figure out how to move random the ball in canvas(width 400 height 480)can somebody help me.
This is my code
var RADIUS = 100;
//this is point in canvas def
var minx = RADIUS;
var maxx= getWidth()-RADIUS;
var miny = RADIUS;
var maxy = getHeight()- RADIUS;
function start(){
//definition of circle
var circle = new Circle(RADIUS);
circle.setPosition(getWidth()/2, getHeight()/2);
add(circle);
setTimer(crazy, 100);
}
//function for timer
function crazy(){
//i don’t know how to put random all minx, maxi, miny maxy
var random_number = Randomizer.nextInt(min, max);
circle.setColor(Randomizer.nextColor());
}