Hi, I am tring to make an object move across the screen randomly…I want it move up-down left or right acording to the values created…for example I want my object move between value (-5 and +5 ) whats wrong with this ? because it always moves downward ???
thanks ?
[AS]
on(press)
{
dur=setInterval(kos,200);
function kos(){
var rn1=Math.floor(Math.random()(5-10))+10;
var rn2=Math.floor(Math.random()(5-10))+10;
_root.car._x+=rn1;
_root.car._y+=rn2;
kutu.text="…"+rn1+"…"+rn2;
}}
[/AS]