229
edits
| Line 11: | Line 11: | ||
Skinnable objects includes 2 methods: | Skinnable objects includes 2 methods: | ||
=== addSkin: func(filename) === | === addSkin: func(filename) === | ||
: loads the image file and creates Canvas Image element. | |||
'''filename''' as the absolute file path. The file must be a .png or a .jpg image. | '''filename''' as the absolute file path. The file must be a .png or a .jpg image. | ||
: e.g. <pre style="color: green"> sk.addSkin("/foo/osc2.png"));</pre> | : e.g. <pre style="color: green"> sk.addSkin("/foo/osc2.png"));</pre> | ||
=== listen_mouse_clicks: func(object, function) === | |||
: creates the listener and binds the events to ''function(e)''. | |||
'''object''' as the calling object.<br /> | |||
'''function''' as the callback function.<br /> | |||
: e.g. <syntaxhighlight lang="nasal">sk.addSkin("/foo/osc2.png")); | |||
me.sk.listen_mouse_clicks(object:me, function:me.onClick); | |||
</syntaxhighlight> | |||
edits