NaN:NaN
NaN:NaN
--:-- / --:--
Newgrounds Background Image Theme

Chewe21 just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Browse Sections

Newgrounds Wiki: connect

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);
  • Actionscript 2.0
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);


Art: Pico Day MF by PKettles


Create a Newgrounds account today!


  • Follow Artists and Customize Your Feed
  • Share Your Own Creations
  • Curate Favorites and Playlists
  • Vote and Review Entries
  • Much More!


We don't sell or share your personal info, hope to see you soon!

Create an Account


You must be 16+ to create an account.
Under 18? Get parent/guardian permission!

Do you agree to our Terms of Use?