Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: RE: [flasher] constraining drag along angle
From: AndyA
Date: Mon, 26 Feb 2001 18:17:53 -0000

Matt,

There's probably a more elegant way to do this, but you can do it if you
don't use the startdrag() command. It requires a little more code, but not a
huge amount.

something along the lines of

object._x = _parent.object._xmouse
object._y = object._x

this way, the _x value is set to the relative position of the mouse to the
parent of the object and the y value is set to the same value as x which
will cause it to move at a 45 degree angle. You'd need some kind of event to
drive it of course... but it should work.

Or you might be able to create a movie clip with startdrag and set the
rectangle so that the y always stays constant. Then rotate the movieclip 45%
on the stage... just throwing ideas out there.

Regards

Andy

-----Original Message-----
From: Matt [mspiegleratlightbulbpress [dot] com (mailto:mspiegleratlightbulbpress [dot] com)]
Sent: 26 February 2001 17:28
To: flasher from chinwag
Subject: [flasher] constraining drag along angle


Hi,

Does anyone know how to create a draggable MC, that would slide along an
angled axis, say, 45 degrees? So that when you moved your mouse back and
forth along the x-axis, the MC would slide in lockstep with the X, but
along a 45 degree angle on the Y? does anyone know of examples of this?

TIA,

Matt


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Chinwag site carries a wealth of Flash resources.
Find useful links, suggested reading and archives at:

** http://www.chinwag.com/flasher **
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You are subscribed to flasher as: meatandya [dot] demon [dot] nl
To unsubscribe, email leave-flasher-485112Oatlists [dot] chinwag [dot] com




[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]