Is there a way to have the startDrag command not lock to the centre of a MC but to have it snap and drag from a set location, ie _x and _y positions, on a MC.
If anyone can help it will be MUCH appreciated =)
Is there a way to have the startDrag command not lock to the centre of a MC but to have it snap and drag from a set location, ie _x and _y positions, on a MC.
If anyone can help it will be MUCH appreciated =)
When you set the snap to mouse to true in the startDrag, it snaps the clips registration point to the mouse.
So with that said, you can
A) Create the clip and set the registration point in the new area… here is an image from a kirupa.com tutorial to help explain…
http://www.kirupa.com/developer/mx/images/loadBar.gif
Or
B) Open up your current clip and reposition the content so that the point you want the mouse to be snapped to is at the coords (0,0)
I hope I helped
thank you for that, but I don’t think I explained myself well enough.
Hear is the problem:
I am creating a kind of Jigsaw game but with shapes, eg triangle, diamond, square.
The centre point of the movie clip is at edge of the shape, as described above. This point is the reference for rotation and the snap-To-Grid position and cannot be changed.
What I want is when a shape is selected (ie. StartDrag(true) is called) it moves the shape from a different point, not the edge that has already been specified.
Something like :
_xmouse+15
_ymouse+20
to be added to the shape so it drags from the centre of the shape but rotates around a point which is in a different place.
I don’t know if this is any clearer but thanks anyway
Something like :
_xmouse+15
_ymouse+20
doesnt that work well ?
it may well do but as I am only a begginer I am not sure were I need to add it, can it just be added to the startDrag() command instead of “true” or something to that effect
???
This is the file that I am using at the moment
instead of using startDrag, use
onClipEvent(load){
offsetx=100
offsety=60
}
onClipEvent(enterFrame){
_x=_root._xmouse-offsetx
_y=_root._ymouse-offsety
}
i still don’t really understand what u want
ThankYou that is exactally what I want
You guys are great :beam:
glad i could help =)
:: Copyright KIRUPA 2024 //--