Creating a Custom Cursor
This lesson will show you how to create a custom cursor that you can use in Revolution. If you want to modify one of the existing Revolution custom cursors then take a look at the stack revCustomCursors by executing the following script in the message box:
go stack "revCustomCursors"
Create The Cursor Image
Create a 16x16 pixel image in your favorite image editing application. You can have black, white or transparent pixels.
Export as PNG
Export your image as a 32-bit PNG, a PNG with transparency.
Import Into Revolution
Import your icon PNG file into Revolution.
Set the defaultCursor
Set the defaultCursor to the id of the image you just imported. I created a button with the script you see here.
Oops, Doesn't Work
The cursor doesn't look right. All of the black pixels are appearing white.
Set the paintCompression
The image data needs to be converted to an internal format that will work as a cursor. In the message box set 'the paintCompression' to "RLE".
Select Pencil Tool
Select the pencil tool in the Tools palette (1). Make sure the pencil color is black (2).
Draw on 1 pixel of image
Click on a single pixel of the image. This will convert the image data.
The Result
Now the cursor appears correctly.
Make sure and reset the paintCompression to the original value. In the Revolution IDE this is "png".
0 Comments
Add your comment