views:

59

answers:

1

How do I move the origin point, or zero point, of a MovieClip to the same origin point of the stage without scripting in Adobe Flash CS3?

Example: While I'm trying to move objects within a MovieClip, the origin point is at (stage) 200,-300. This means that when I put objects in a MovieClip, the objects' X,Y coordinates, as displayed in properties, are off by that much.

This point is way off the edge of the stage and I'd like to move it back to the stage's origin point so that my X,Y coordinates are meaningful.

+1  A: 

you can either use the function localToGlobal(pt:Point) to get the relevant position to the stage, or globalToLocal(pt:Point) to go the other way around.

the only other method is to edit your movieclip in the IDE. move the movieclip to the top left of your stage (0,0), go into the movieclip then re-align to the point that you need it (in your case the internal bits need to be at 200,-300 relevent to the movieclip origin.) then it should all be working nicely.

ideally you should be able to work out where you want these bits using x,y,height, width etc. rather than relying on the IDE as you cant always guarantee that they will be sensibly aligned.

shortstick