Page Contents
import com.newgrounds.API;
API.connectMovie(api_id:String, encryption_key:String, debug_mode:Boolean);
import com.newgrounds.API;
import com.newgrounds.APIEvent;
function onAPIConnected(event:ApiEvent):void {
if (event.success) {
trace("You have connected to the API");
} else {
trace("The connection has failed");
}
}
API.addEventListener(APIEvent.API_CONNECTED, onAPIConnected);
API.connectMovie(<api_id>, <encryption_key>, true);
import com.newgrounds.API;
import com.newgrounds.APIEvent;
function onAPIConnected(event:ApiEvent) {
if (event.success) {
trace("You have connected to the API");
} else {
trace("The connection has failed");
}
}
API.addEventListener(APIEvent.API_CONNECTED, onAPIConnected, true);
API.connectMovie(<api_id>, <encryption_key>, true);