Table of Contents
The roSGNode object is the BrightScript equivalent of SceneGraph XML file node creation.
Supported Interfaces
- ifAssociativeArray
- ifSGNodeChildren
- ifSGNodeField
- ifSGNodeDict
- ifSGNodeFocus
- ifSGNodeBoundingRect
- ifSGNodeHttpAgentAccess
Supported Events
Description
To create an roSGNode object for a specific node class, call:
CreateObject("roSGNode", "nodetype")
Where nodetype is a string specifying the node class to be created. For example, the following creates an object of the SceneGraph Poster node class:
CreateObject("roSGNode", "Poster")
Reference information on all SceneGraph node classes can be found in this SceneGraph API Reference.
Prior to creating an roSGScreen object and calling its show()
function, creating roSGNode objects and using their interfaces is not guaranteed to work correctly. If you need to create some roSGNode objects and/or use roSGNode interfaces prior to calling an roSGScreen object show()
function, you can use an roSGScreen object createScene()
function to create an instance of a SceneGraph XML component that does any required setup and initialization prior to the roSGScreen object being displayed.
In addition, roSGNode implements the ifAssociativeArray interface as a wrapper for ifSGNodeFIeld so that the convenient node.field notation may be using for setting, getting, and observing fields.