Return to Top ^
public static function connect(root:DisplayObject, apiId:String, encryptionKey:String, movieVersion:String):void
Initializes the Newgrounds API and starts a connection to the Newgrounds server. This should be called before any other API methods or properties.
After calling connect, the API will fire an API_CONNECTED event. If version control is enabled for the game and a new version is available, event.data.newVersion will be true.
The root DisplayObject.
The API ID for this movie, as shown on the API settings page.
The encryption key for this movie, as shown on the API settings page.