Thanks Andre! I was just trying to create an example for Antun for creating a custom class like this.
If we want to make it easier for people to dynamically at resources at runtime, maybe we should extend the mechanism in LzResourceLibrary to support instances of DisplayObject, rather than requiring a class. Then we could add an API for defining a resource at runtime. On Wed, Mar 3, 2010 at 6:42 PM, André Bargull <[email protected]> wrote: > By installing a custom class as a 'fake resource', I could successfully use > a drawview based cursor in swf10. I've attached an example application. > I think the application is pretty self explanatory except for line where I > add the entry for the 'fake resource': > >> LzResourceLibrary['mycursor'] = {assetclass: CursorSprite}; >> > > LzResourceLibrary is an internal map which holds all resources by name. > Each entry in that map is an object referring to a class for the resource, > in our case we want to point to the custom class CursorSprite. After > changing the global cursor to 'mycursor' by calling > lz.Cursor.setCursorGlobal('mycursor'), a new instance of CursorSprite is > created and used for the cursor. > > > - André > > > > Hi all, >> >> I need to be able to paramaterize some components of a cursor. I can set >> the cursor by first declaring a named resource this: >> >> <resource name="waitcursor" src="lzwaitcursor_rsc.swf"/> >> >> ... then setting the cursor globally by calling: >> >> lz.Cursor.setCursorGlobal('waitcursor'); >> >> Rather than using an image for the cursor, I'm thinking of drawing it >> with the drawview, then using SWF9 APIs to extract the BitmapData >> object. I can do this already in OL and set the BitmapData object to a >> view, to display it. But in this case, I'd need to somehow set the data >> for a named resource. >> >> Any ideas on how to go about this? >> >> Thanks, >> >> Antun >> >> >> > -- Henry Minsky Software Architect [email protected]
