Thanks André!
Your example works in SWF10, and I'm adapting it to work in SWF9 too.
I'll post that when I have it.
-Antun
On 3/3/10 3:42 PM, André Bargull 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