I got this mouse trail effect from one of the tutorials and I would like to be able to constrain it to specified perimeters. I couldn’t figure it out im too noob with action scripting "=/ but heres my code(I changed it a bit)…flash mx pro btw…
depending on your framerate, you may want to use a bounding box and a hittest, if your framerate is high ie. 34+ hitTest might not work well … in which case you will need to pass more detection variables…
you may also want to try have two seperate functions, one for the drag event, and a totally seperate function for collision detection
ok so I got a hitTest to work…kinda not really lol. I got it to basically bounce back once it hits the other object but it looses the mouse trailing effect…just slowly flys out of the flash…help me…><
What you want to do is make a simple logical test to see if the dragged object’s _x value is greater than a certain value (the point you do not want it to go past) and if it is, then set it back to that certain value.
np