I’ve been having problems with a more complex version of this but just for testing I simplified it and I’m still having the same problem.
the symbol that is attached (ball) jumps between + and - 10 of whatever the value of _xmouse and _ymouse are. so basically it moves back and forth diagonally.
does anyone know why?
just copy and paste this code onto a frame and have a symbol exported for actionscript with the name “ball”
another question … since i have the attachMovie command inside the onenterframe function … does the movie get attached and deleted every frame. what’s the most efficient way to write that code … especially if i’m going to use a ‘for’ loop to make multiple instances of “ball”
the best way to do it is have it in a function and run that function only once when you need it to be. This most likely wouldnt be in the enterFrame event, more likely in onClipEvent(load) or maybe some mouseDown or called from another action (button?) completely