Hello. I’m just learning Flash CS3 & Action Script and I found an example of a “screen saver” type script at…
The code is…
vel_x = 10;
vel_y = 10;
onEnterFrame = function () { ball._y += vel_y;ball._x += vel_x;if (ball.hitTest(left) || ball.hitTest(right)) {vel_x = -vel_x;}if (ball.hitTest(top) || ball.hitTest(down)) {vel_y = -vel_y;}};
It was just what I was looking for! The ball.fla still works if I change the settings to 2.0, but gives errors in 3.0. What changes would be necessary for 3.0?
Thanks and Take Care,
-DP