In order to allow cursor styles to be set on a per instance basis, this is the approach I am considering. Feedback is greatly appreciated.
- Give my class a property called cursorStyleName. - Set a default cursorStyleName in constructor - In setCursor() method, I use the following code: var cursorStyle:CSSStyleDeclaration = StyleManager.getStyleDeclaration("." + cursorStyleName); cursorClass = cursorStyle.getStyle("resizeCursorVSkin"); CursorManager.setCursor(cursorClass, ....) Thoughts? Is this appropriate? Thanks, Ben --- In flexcoders@yahoogroups.com, "Michael Schmalle" <[EMAIL PROTECTED]> wrote: > > Ben, > > moveCursorSkin:Embed(source="moveCursor.png"); > > Embed creates a class. You could also use setStyle("moveCursorSkin", > MyCursorClass); > > or; > > moveCursorSkin:ClassReference("my.package.cursors.MyCursorClass"); > > bottom line is my manager calls basically, > > var cls:Class = styleName.getStyle(cursorSkinName + "Skin"); > if (cls) > { > CursorManager.setCursor(cls, 0, offsetX, offsetY); > } > > Peace, Mike > > > On 9/18/07, ben.clinkinbeard <[EMAIL PROTECTED]> wrote: > > > > Not sure I follow you. How do you glean a class from those styles? > > > > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, "Michael > > Schmalle" > > <teoti.graphix@> wrote: > > > > > > Thats why for all of my custom components and managers I created a new > > > CursorManager that wraps the mx one. > > > > > > In each of the managers or components I have; > > > > > > /* > > > * The move cursor skin for the MoveManagerFX. > > > */ > > > moveCursorSkin:Embed(source="moveCursor.png"); > > > /* > > > * The move cursor's x offset. > > > */ > > > moveCursorXOffset:-10; > > > /* > > > * The move cursor's y offset. > > > */ > > > moveCursorYOffset:-10; > > > > > > > > > styles. > > > > > > Where the styles names are organized by; > > > > > > cursorName + "Skin"; > > > cusrorName + "XOffset"; > > > cursorName + "YOffset"; > > > > > > The custom cursor manager then uses the styleName of the client to > > get what > > > ever cursor is needed. There then can easily be set in styles anywhere. > > > > > > Peace, Mike > > > > > > On 9/18/07, ben.clinkinbeard <ben.clinkinbeard@> wrote: > > > > > > > > Pretty sure its not possible but just looking for confirmation. > > Since > > > > CursorManager.setCursor() expects a class I assume thats the only way. > > > > Correct? > > > > > > > > Thanks, > > > > Ben > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Teoti Graphix > > > http://www.teotigraphix.com > > > > > > Blog - Flex2Components > > > http://www.flex2components.com > > > > > > You can find more by solving the problem then by 'asking the question'. > > > > > > > > > > > > > -- > Teoti Graphix > http://www.teotigraphix.com > > Blog - Flex2Components > http://www.flex2components.com > > You can find more by solving the problem then by 'asking the question'. >