Package dynamic

Class MacaoObject

Inherited from MacaoObject

Fields   Methods

The class MacaoObject in the package dynamic extends the MacaoObject of the package kernel with fields and methods for dynamic functionality. This includes walking, building nets, talking and others.

For more see the package description of dynamic.

Field Summary
String BUNCH_TYPE_SAY
     This is the quasi-constant defining the bunch type SAY.
String BUNCH_TYPE_STAND
     This is the quasi-constant defining the bunch type STAND.
String BUNCH_TYPE_WALK
     This is the quasi-constant defining the bunch type WALK.

Method Summary
void accelerate(number acceleration)
     Call this method to change the current velocity by the given value.
void addLookBunch(String bunchType, String imageBase, integer depth, String extension, integer baseWidth, integer baseHeight, optional integer deltaLeft, optional integer deltaTop, optional String phases)
     Use this method to add a number of looks, which are building a bunch.
MacaoTalkItem addTalkItem(MacaoTalkItem talkItem)
     Call this method to add a talk item to the object.
void adjustStacking()
     Call this method to adjust the objects z-index according to the object's current position.
void approachAndTryAction(String targetObjectName, String eventName, optional String controllerName)
     This method lets the object walk to a target object. When arrived, it lets the target object hear a trigger event, which may cause the execution of a talk item.
boolean approachObject(String objectName, optional boolean autoAcceleration, optional boolean stopAtEnd, optional String eventType, optional Array params)
     Call this method to let the object walk near another object.
boolean approachPos(number xPos, number yPos, optional boolean autoAcceleration, optional boolean stopAtEnd, optional String eventType, optional Array params)
     Call this method to let the object walk to a defined position.
void assignRoadNode(String roadName, integer nodeIndex)
     Use this method to assign the object to a node, which is part of a road element.
void bindToNet(optional String netType)
     Call this method to bind the object to a net or unbind it from a net.
Array calculateApproachPos(optional String approachingObjectName)
     This method calculates the object's approach position, which is used by other objects to walk to.
integer calculateStackingIndex()
     This method is called internally, to calculate the z-index for stacking.
void changeDirection(number angle)
     Call this method to change the direction of the object by an angle.
MacaoTalkItem createTalkItem(String itemName, variant triggerEvents, optional String message, optional variant keywords, optional boolean onceAtTalk)
     Call this method to create a talk item and add it to the object.
number getAnchorXPos()
     Call this method to get the anchor's x-position of the object relative to the page.
number getAnchorYPos()
     Call this method to get the anchor's y-position of the object relative to the page.
boolean getApproachable()
     Call this method to get the info, if this object is approachable.
MacaoNode getAssignedNode()
     Call this method to get the node, to which the object is assigned.
String getBunchPhase(String bunchType)
     Call this method to get the phase, which is currently used to display a bunch look.
Array getDirection()
     Call this method to get the direction, to which the object walks.
Array getLookDirection()
     Call this method to get the direction of the look.
number getMaxVelocity()
     Call this method to get the maximum velocity of the object.
Array getMeetingObjectNames()
     Call this method to get an array with the names of all objects, which this object is currently meeting.
MacaoNode getNearestNode()
     Call this method to get the nearest node of the net, to which the object is bound, relative to the objects current position.
String getNetType()
     Call this method to get the net type of the net, to which the object is bound.
String getResponsesSenderName()
     Call this method to get the name of the sender of the current response talk items.
Array getResponseTalkItems()
     Call this method to get the response talk items, which are currently to be displayed for this object.
boolean getReverseGear()
     Call this method to check, if the reverse gear is active.
number getVelocity()
     Call this method to get the current velocity of the object.
void hearEvent(String eventName, optional String senderName)
     Call this method to send the object a trigger event, which may cause the execution of a valid fitting talk item.
void hearFreeText(String freeText, optional String senderName, optional String responseItemName)
     Call this method to send a keyword to the object, which may cause the execution of a valid fitting talk item.
boolean isMeetingObject(String objectName)
     Call this method to test, if this object is currently meeting another object.
boolean isWalking()
     Call this method to test, if the object is currently walking.
void leave(String objectName, optional boolean mutual)
     Call this method to remove an object from the list of objects, which this object is currently meeting.
boolean mayILeaveNode(MacaoNode actualNode, MacaoNode toNode)
     This method is called internally, before the object leaves a node.
void meet(String objectName, optional boolean mutual)
     Call this method to add an object to the list of objects, which this object is currently meeting.
void moveAnchorTo(integer xPos, integer yPos)
     Call this method to move the object giving the new coordinates for the anchor of the object.
void moveToNode(MacaoNode node, optional number directionX, optional number directionY, optional boolean noTriggerEvents)
     Call this method to position the object on a node immediately. You can also set the direction of the object.
void onClickOther(Event event, integer mouseX, integer mouseY, String objectName)
     This event handler is called, when the user clicks on another object.
void onClickWindow(Event. event, integer mouseX, integer mouseY, String frameName)
     This event handler is called, when the user clicks the window.
void restore()
     This method is called to restore the objects visibility, zoom, position, velocity, direction and walk target for this page, after the page is opened.
void setAnchorAtBottom(boolean activate)
     Call this method to set the anchor to the bottom of the object.
void setApproachable(optional boolean approachable)
     Call this method to set the object as approachable or not approachable.
void setApproachClick(boolean activate)
     Call this method to activate or deactivate the behaviour of the object, which tells it to walk to the position where the user clicks.
void setAssignedNode(optional MacaoNode node)
     Call this method, in order to assign or de-assign the object to a node.
void setAutoAcceleration(number autoAcceleration)
     Call this method to set the acceleration of the object, for it's automatic acceleration.
void setAutoRestore(boolean autoRestore)
     Use this method to activate or deactivate the automatic storage of the objects dynamic values, before the page is closed.
void setBunchDepth(String bunchType, integer depth)
     Sets the maximum depth of a bunch type.
void setBunchPhase(String bunchType, optional String phase)
     Call this method to set the current phase for a bunch type.
void setCollisionBreak(boolean activate)
     Call this method to activate and deactivate collision break.
void setDirection(number dX, number dY)
     Call this method to set the direction, to wich the object walks. This will also switch to the object to a look, which fits the direction.
void setDisableApproach(optional boolean activate)
     Call this method to temporary disable the approach functionality of the object.
void setPreferredLook(String lookName)
     Use this method, to set a look, which has precedence over all bunch looks.
void setRandomTalk(optional String eventName, optional integer baseDuration, optional boolean executeNow)
     Call this method to start or stop the random execution of talk items, which are added to the object.
void setReverseGear(boolean activate)
     Call this method, to activate or deactivate the reverse gear.
void setStacking(optional boolean active)
     Call this method to activate or deactivate the stacking of the object. Stacking adjusts the objects z-index dependent on its position.
void setSteeringIndex(integer steeringIndex, optional boolean autoAcceleration, optional boolean stopAtEnd, optional String eventType, optional Array params, optional String controllerName)
     Call this method to preselect the connection, which is to be used at the next node of a net and to start the walking of the object.
void setTalkCssClassName(optional String cssClassName)
     Call this method to set a special cascading style sheet class, which will be used to display the bubble, when the object talks.
void setVelocity(number velocity)
     Call this method to change the velocity of the object.
void setWalkCharacteristics(integer maxVelocity, optional integer maxAcceleration, optional number maxAngularVelocity, optional number curveBreak)
     Call this method to set the walk characteristics of the object.
void setWalkPhases(String phases)
     Call this method to set the phases, which are used to animate the object while it is walking.
void startAutoAcceleration()
     Call this method to start the automatic acceleration of the object.
void steeredVelocityChanged(number velocity)
     This event handler will be called, when this object is registered as a controller of another object and the velocity of the other object changes.
void stopWalking(boolean clearTarget, optional String controllerName)
     Call this method to stop the walking of the object.
void store(optional boolean force)
     This method is called to store the objects visibility, zoom, position, velocity, direction and walk target, before the page is left.
void tryAction(String targetObjectName, String eventName, optional String controllerName)
     This method lets a target object hear an event. That event may cause the execution of a talk item.
void walkToNode(MacaoNode targetNode, optional boolean autoAcceleration, optional boolean stopAtEnd, optional String eventType, optional Array params)
     Call this method to start the object walking along a net to a target node.
void walkToPos(integer xPos, integer yPos, optional boolean autoAcceleration, optional boolean stopAtEnd, optional String eventType, optional Array params, number endDirectionX, number endDirectionY)
     Call this method to start the object to walk to given position on the page and to turn to a given direction.
void wanderAround(integer basePauseDuration, optional Array targetNodes)
     Call this method to tell the object to wander around on a net.

Inherited Methods
activateDrag, activateDrop, addController, broadcastEvent, createLayer, createLook, displayMeasures, getActualLook, getCollisionCheck, getCssClassName, getFrameName, getHeight, getLayer, getLeft, getLook, getName, getTitle, getTop, getType, getVisibility, getWidth, getZIndex, getZoom, hasLook, initObject, isController, isDragActive, isDragged, isDropActive, isDropAllowed, moveTo, moveToCenter, notifyControllers, onClick, onClickOther, onClickOtherItem, onClickWindow, onCollisionOut, onCollisionOver, onDblClick, onDblClickOther, onDblClickWindow, onDragEnd, onDragOut, onDragOver, onDragStart, onDrop, onKeyDown, onKeyPress, onKeyUp, onLoad, onMouseDown, onMouseDownWindow, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onMouseUpWindow, onUnload, openPage, postEvent, refreshZoom, removeController, removeObject, say, scrollVisible, sendEvent, setActualLook, setBaseSize, setCollisionCheck, setCssClassName, setForwardMouseEvents, setHTML, setImage, setScrollVisibleOptions, setTitle, setToolTip, setType, setVisibility, setZIndex, setZoom, toBack, toFront

Field Details
String BUNCH_TYPE_SAY

String BUNCH_TYPE_STAND

String BUNCH_TYPE_WALK

Method Details
void accelerate(number acceleration)

void addLookBunch(String bunchType, String imageBase, integer depth, String extension, integer baseWidth, integer baseHeight, optional integer deltaLeft, optional integer deltaTop, optional String phases)

MacaoTalkItem addTalkItem(MacaoTalkItem talkItem)

void adjustStacking()

void approachAndTryAction(String targetObjectName, String eventName, optional String controllerName)

boolean approachObject(String objectName, optional boolean autoAcceleration, optional boolean stopAtEnd, optional String eventType, optional Array params)

boolean approachPos(number xPos, number yPos, optional boolean autoAcceleration, optional boolean stopAtEnd, optional String eventType, optional Array params)

void assignRoadNode(String roadName, integer nodeIndex)

void bindToNet(optional String netType)

Array calculateApproachPos(optional String approachingObjectName)

integer calculateStackingIndex()

void changeDirection(number angle)

MacaoTalkItem createTalkItem(String itemName, variant triggerEvents, optional String message, optional variant keywords, optional boolean onceAtTalk)

number getAnchorXPos()

number getAnchorYPos()

boolean getApproachable()

MacaoNode getAssignedNode()

String getBunchPhase(String bunchType)

Array getDirection()

Array getLookDirection()

number getMaxVelocity()

Array getMeetingObjectNames()

MacaoNode getNearestNode()

String getNetType()

String getResponsesSenderName()

Array getResponseTalkItems()

boolean getReverseGear()

number getVelocity()

void hearEvent(String eventName, optional String senderName)

void hearFreeText(String freeText, optional String senderName, optional String responseItemName)

boolean isMeetingObject(String objectName)

boolean isWalking()

void leave(String objectName, optional boolean mutual)

boolean mayILeaveNode(MacaoNode actualNode, MacaoNode toNode)

void meet(String objectName, optional boolean mutual)

void moveAnchorTo(integer xPos, integer yPos)

void moveToNode(MacaoNode node, optional number directionX, optional number directionY, optional boolean noTriggerEvents)

void onClickOther(Event event, integer mouseX, integer mouseY, String objectName)

void onClickWindow(Event. event, integer mouseX, integer mouseY, String frameName)

void restore()

void setAnchorAtBottom(boolean activate)

void setApproachable(optional boolean approachable)

void setApproachClick(boolean activate)

void setAssignedNode(optional MacaoNode node)

void setAutoAcceleration(number autoAcceleration)

void setAutoRestore(boolean autoRestore)

void setBunchDepth(String bunchType, integer depth)

void setBunchPhase(String bunchType, optional String phase)

void setCollisionBreak(boolean activate)

void setDirection(number dX, number dY)

void setDisableApproach(optional boolean activate)

void setPreferredLook(String lookName)

void setRandomTalk(optional String eventName, optional integer baseDuration, optional boolean executeNow)

void setReverseGear(boolean activate)

void setStacking(optional boolean active)

void setSteeringIndex(integer steeringIndex, optional boolean autoAcceleration, optional boolean stopAtEnd, optional String eventType, optional Array params, optional String controllerName)

void setTalkCssClassName(optional String cssClassName)

void setVelocity(number velocity)

void setWalkCharacteristics(integer maxVelocity, optional integer maxAcceleration, optional number maxAngularVelocity, optional number curveBreak)

void setWalkPhases(String phases)

void startAutoAcceleration()

void steeredVelocityChanged(number velocity)

void stopWalking(boolean clearTarget, optional String controllerName)

void store(optional boolean force)

void tryAction(String targetObjectName, String eventName, optional String controllerName)

void walkToNode(MacaoNode targetNode, optional boolean autoAcceleration, optional boolean stopAtEnd, optional String eventType, optional Array params)

void walkToPos(integer xPos, integer yPos, optional boolean autoAcceleration, optional boolean stopAtEnd, optional String eventType, optional Array params, number endDirectionX, number endDirectionY)

void wanderAround(integer basePauseDuration, optional Array targetNodes)