Thanks for the replies guys.  I didnt see Troy's post at first and made a
hack of a solution to use a popup window (just a SWFLoader) that followed
the mouse cursor around the stage.  Not exactly skinnable, but I can load
different swfs for each cursor I need on demand

I'm going to give Troy's method a try of a monostate class with scale and
url exposed.

Thanks again!

On 13 Apr 2007 15:31:12 -0700, Troy Gilbert <[EMAIL PROTECTED]> wrote:

  The cursor is basically treated as if its a DisplayObject, which in
practice means that its a Sprite, MovieClip, Bitmap or Shape. Most of the
examples I've seen use embedded assets, most often a bitmap. But it can be
any class that can sit on the display list.

Of course, you're not able to access your specific instance of the class
as the CursorManager creates it internally and its not exposed. So, you have
to be tricky. Either you create a class that's a monostate (all of the
instances of the class share a common state) or have your custom class
listen for some particularly events that you're able to get into the display
list and to your class. Personally, I'd go for the monostate (more
predictable).

You'll need to create a class that inherits from DisplayObject, Sprite
would be a good choice. In your class, I'd add a static member that stores
the current "size" or "scale". And in the ENTER_FRAME event, have your
sprite copy that value into the sprite's scaleX and scaleY members.
Basically, it's manual binding (you could probably do some more traditional
binding as well, but I'm assuming here that you'd probably be using
ENTER_FRAME anyway for some animation).

Pass off your custom cursor sprite class to the CursorManager to use...
internally, it will construct an instant as necessary (based on priority of
cursors, etc.). On your end, just modify the static state (scale) as
necessary. The result will be a cursor that resizes (because the
CursorManager's instance of the class is using the same static state that
you're manipulating).

If you're embedding an SWF, just embed it and use it inside of your custom
class (add it as a child, etc.). The display list is your friend! ;-)

Troy.




On 12 Apr 2007 08:48:19 -0700, Rick Schmitty <[EMAIL PROTECTED]> wrote:
>
>   If I had a custom cursor, say a swf object, is it possible to size
> that object or do you have to embed each size you'd like to have?
>
> For example, say you had a drawing app with a brush stroke, and you
> wanted the cursor to reflect the size of the brush (which the user can
> adjust via slider bar)
>

Reply via email to