PDA

View Full Version : MovieClip._location property



eyezberg
January 9th, 2004, 05:55 PM
via http://www.darronschall.com/weblog/archives/000081.cfm :

"It has been said that necessity is the mother of invention. It has been argued that annoyance, not necessity, fuels invention.

I'd like to start the year off with a little script brought to life by annoyance. To set the position of a MovieClip, you need two lines of code: one to set the _x position, and another to set the _y position. Many times I found myself wishing for a way to set a MovieClip's coordinates in one line. Enter the "_location" property. Use the code below to add the _location property to all of your MovieClips.
...."

senocular
January 9th, 2004, 06:28 PM
been done. =)

http://proto.layer51.com/d.aspx?f=919

(as _loc) also includes _mouseLoc, _cursorLoc, _corners, _center, and _direction among other point related methods for movieclips (as well as the whole point thing itself).

eyezberg
January 9th, 2004, 06:31 PM
haven't checked layer51 in a looong time... :(
lemme find another one... :)

thoriphes
January 9th, 2004, 06:40 PM
Yeah, I've also made MovieClip prototypes to facilitate this annoyance.

eyezberg
January 9th, 2004, 06:44 PM
http://www.diddly.com/random/

(and now for something completely different - Monthy Python quote..?)