HTML and CSS Reference
In-Depth Information
width
Width of bulb image.
x
x position of bulb.
y
y position of bulb.
context
Canvas context.
loaded
loaded
Boolean value; set when bulb image has loaded.
image
Image to load.
EVENT_CLICKED
EVENT_CLICKED
Event to dispatch when clicked.
type
“Factory” or “copy.” (Factory bulbs are the ones you click on to make a copy.)
dragging
dragging
Boolean value: Is the bulb being dragged? This is essential information for a drag-and-
drop application.
Here is the code to create the previous variables:
this
this . bulbColor = color ;
this
this . file = "bulb_" + this
this . bulbColor + ".gif" ;
this
this . height = height ;
this
this . width = width ;
this
this . x = 0 ;
this
this . y = 0 ;
this
this . context = context ;
this
this . loaded = false
false ;
this
this . image = null
null ;
this
this . EVENT_CLICKED = "clicked" ;
Search WWH ::




Custom Search