- Package: com.newgrounds.components
- Class: APIConnector
The APIConnector's API ID and Encryption Key parameters must be set with your movie's API ID and Encryption Key. For more info, see Getting Started with the API.
The APIConnector can optionally display a FlashAd and a Preloader. This is controlled by the connectorType setting.
The APIConnector component is intended for Flash IDE users. Users with a code-based workflow can instead call API.connect directly.
PropertiesThese are the properties of APIConnector.
public var adType:String = "Video";Sets the type of ads that are displayed by the API Connector.
public var apiId:String;The API ID for this movie. Set this to the API ID given on your API Settings page.
public var connectorType:String;Sets the display mode of the API Connector.
- Flash Ad + Preloader, displays both a Flash Ad and a Preloader.
- Flash Ad Only, only display a Flash Ad
- Invisible, the connector is not displayed, and only connects to the API.
public var debugMode:String;
public var encryptionKey:String;The encryption key for this movie. Set this to the encryption key given on your API Settings page.
public var movieVersion:String;The version number of this movie or game. This should be in the format of "1.0". If version control is enabled in your API Settings, the API_CONNECTED event will signal that a new version is available. If the redirectOnNewVersion property is enabled, then the user will automatically be forwarded to the latest version when they click the Play button.
public var redirectOnHostBlocked:Boolean = true;If this movie is viewed on a blocked domain, this setting will redirect the user to the official URL when they click Play.
public var redirectOnNewVersion:Boolean = true;If a new version of the movie is available, this setting will redirect the user to the official URL when they click Play.