PackageWhiteboard.tools
Interfacepublic interface IWhiteboardTool



Public Methods
 MethodDefined by
  
drawShape(mc:MovieClip, data:PropertyBag):void
Called everytime a property changes in the shape.
IWhiteboardTool
  
getName():String
Must return the name of your tool such as 'Rectangle'.
IWhiteboardTool
  
init(manager:WhiteboardManager):void
This is where your tool must set it's editor and whether it can be instanciated..
IWhiteboardTool
  
initShape(mc:MovieClip, data:PropertyBag, previewShape:Boolean):void
Called once for every shape.
IWhiteboardTool
  
onDeselect():void
Called when the tool is deselected.
IWhiteboardTool
  
onSelect():void
Called when the tool is selected.
IWhiteboardTool
Method detail
drawShape()method
public function drawShape(mc:MovieClip, data:PropertyBag):void

Called everytime a property changes in the shape.

Parameters
mc:MovieClip — movieclip to draw on, same as the mc passed in initShape.
 
data:PropertyBag — the data for the shape in a PropertyBag.
getName()method 
public function getName():String

Must return the name of your tool such as 'Rectangle'.

Returns
String
init()method 
public function init(manager:WhiteboardManager):void

This is where your tool must set it's editor and whether it can be instanciated..

Parameters
manager:WhiteboardManager — WhiteboardManager which owns the tool.
initShape()method 
public function initShape(mc:MovieClip, data:PropertyBag, previewShape:Boolean):void

Called once for every shape. When a new shape is created by pressing the stage and when a shape comes in from the server. This is a good place to attach all constant UI such as a text field.

Parameters
mc:MovieClip — movieclip to attach your UI too.
 
data:PropertyBag — the settings for your shape.
 
previewShape:Boolean — when its a temporary shape created when the user pressed the stage false for a shape on the server.
onDeselect()method 
public function onDeselect():void

Called when the tool is deselected.

onSelect()method 
public function onSelect():void

Called when the tool is selected.