the following is in regards to the random movement tutorials. In an attempt to expand on what I have learned, I’ve given it my best attempt to get the movement to stay within the confines of the symbol(movieclip border) in which I have the dot symbol placed. As opposed to the whole entire stage area for as in the tutorial.
I get a wierd effect where it goes way of stage and the movement is just up and down over and over again.
My initial reaction is that I may need to modify this section of code in order to obtain the animation inside a movieclip. I’m just not sure what to change =D
onClipEvent (load) {
//data you may want to change
width = 300;
height = 200;
speed = Math.round(Math.random()*2)+1;
//initial positions
x = Math.random()*width;
y = Math.random()*height;
this._x = x;
this._y = y;
x_new = Math.random()*width;
y_new = Math.random()*height;
}
Thank you for any help!