
theapplicationCompleteeventetc.Toconnectitsimplycreateyournetconnectionandcall
eitherwhiteboa rd.connectorwhiteboard.connectAs.
nc=newNetConnection();
nc.connect("rtmp:/flex_whiteboard");
whiteboard.connectAs(nc,"demo1");
Theconnect( nc)methodisthesameascalling.connect As(nc,this.name);Thesecond
argumentofcon nect Asistheinstancename .Ifyouwantedtohaveseveralwhiteboardsi nthe
sa meapplicationyoucoulduse1instanceofthewhiteb oa rdUIandjustcallconnectAswith
d ifferentIDs.Thesharedobjectsonth eserversidewhichstorethedatawillbenamedwith:
wb.{instanceID}.{soNamee.g.pages|p1|cache}.
Youcannowruntheapplication.
Notes: ifyouarenotgoingtouseasampleWhiteboard.mxmlyoumustmakesuretogivethe
whiteboardmanager2things.Acanvastodrawonandaviewstackwiththesubmenus.
CanvasdrawingArea
Thecanvascanbeany canvasanywherewithanysettings andyouregisteritbycalling
whiteboardManager.registerDrawingArea(my_canvas);Thewhiteboardwillnotworkwithouta
canvas.
MenuViewStack
Youshouldalso giv ethewhiteboard amenustackifyouintendforuserstobeabletocreate
shapesoreditthem.Basicallyyou musthaveaViewStackwhichcontainsanumberofHBox’s,
eachHBoxshouldhaveitsnamepropertysettothetoolsname,suchas‘Select’or‘Rectangle’.
InsidetheHBoxso ftoolsyouwanttohavemenusthereshouldbeaUIComponentwhichextends
Whiteboard.tools.menuBars.WhiteboardMenuBar.Thisshouldbecalled‘menu’.Youca nsimply
copyandpastetheexistingviewstackfromoneofthesamplestheya refoundin
Whiteboard/Whiteboard.mxmlinmostsamples alongwiththedefaultcanvas.
OnceyouhaveyourviewstackyoushouldregisteritviawhiteboardManager.registerMenuStack(
my_v iew_stack);
UsingThePubli cAPIs
Thewhiteboard.mxmlcomponentextendsfromtheclassWhiteboardManagerwhichcanbe
foundintheasdocs.Thewhiteboardc ontai ns3propertiesand3methods,therestofthemethods
andpropertiesarethecontrollerswhichownotherareasoffunctionality.
Comentários a estes Manuais