toSprite

Converts the parameter, which must be an image, to a sprite. The newly created sprite will be invisible. Use spriteVisible to make it visible.

Usage

    sprite = toSprite(image);