Class Index | File Index

Classes


Class bHive.Sprite


Version all.

Defined in: bHive-1.0.7.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
bHive.Sprite(construct, parentObject)
Creates a new bHive.Sprite instance
Method Summary
Method Attributes Method Name and Description
 
addEventListener(sEvent, fCallback)
adds an Event Listener function to a particular event
 
Creates a hidden canvas object for future expansion of this class, not currently used.
 
draw(parentX, parentY)
Draws object to canvas
 
Returns the current frame rate of the sprite animation
 
gotoFrame(frame)
Advances the frame counter to the specified frame
 
Advances the frame counter to the next frame regardless of the frame timer
 
Advanced the frame counter to the next frame according the the frame timer
 
play()
Starts play of an animation
 
Sets the frame rate for the sprite animation
 
stop()
Stops play back of an animation
Class Detail
bHive.Sprite(construct, parentObject)
Creates a new bHive.Sprite instance
Parameters:
construct
parentObject
Method Detail
addEventListener(sEvent, fCallback)
adds an Event Listener function to a particular event
Parameters:
{String} sEvent
{Function} fCallback

createBuffer()
Creates a hidden canvas object for future expansion of this class, not currently used.

draw(parentX, parentY)
Draws object to canvas
Sprite = engine.createSprite({constructor});Sprite.draw();
Parameters:
{Int} parentX
{Int} parentY

getFrameSpeed()
Returns the current frame rate of the sprite animation

gotoFrame(frame)
Advances the frame counter to the specified frame
Parameters:
{Int} frame
Integer frame number, 0 being first frame

nextFrame()
Advances the frame counter to the next frame regardless of the frame timer

nextTimedFrame()
Advanced the frame counter to the next frame according the the frame timer

play()
Starts play of an animation

setFrameSpeed(speed)
Sets the frame rate for the sprite animation
Parameters:
speed

stop()
Stops play back of an animation

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 25 2011 15:15:50 GMT+0400 (GST)