Table of Contents

Advertisement

stageModel.getSolidObject(0).rootPrimitive.onClick = function()
{
chat.print("You clicked down at X-coordinate: " + view.mouseX);
}
mouseY
The Y coordinate of the pixel that the mouse cursor is over in the rendered view. 0 represents the top of the
screen, with the value increasing as the cursor goes down the screen.
view = application.getView(0);
stageModel.getSolidObject(0).rootPrimitive.onClick = function()
{
chat.print("You clicked down at Y-coordinate: " + view.mouseY);
}
mouseInitialized
This is a boolean property which will return 'true' when the mouse is over the render view area.
view = application.getView(0);
if (view.mouseInitialized) { /* ready to track mouse */ }
Methods
getCamera(index)
Function that returns a reference to the camera for given numerical index
camera = view.getCamera(0);
getCameraCount()
Function that returns the number of cameras associated with rendering this view. (Currently exactly one.)
numCameras = view.getCameraCount();
triggerRedisplay()
Forces the view to be fully redrawn during the next time step. This may be necessary when changing the
appearance of Viewpoint objects.
view = application.getView(0);
view.triggerRedisplay();

Button

The Button module enables a script to add buttons and toggles to the browser's Controls panel. Once created, the
buttons and toggles may be added and removed from the panel freely (so that they may be made visible when they
are relevant). The script may also change their labels and states at any time. The script may query the state, or may be
notifi ed of changes (typically when the user clicks on the button or toggle, but also when the script changes the state)
via the onClick() callback.
251
ADOBE ATMOSPHERE
User Guide

Advertisement

Table of Contents
loading

Table of Contents