Let players share unique moments in a game by saving a screenshot to their id.net profile.

Use the submitProfileImage function to convert a movie clip or sprite into a picture. If the display object has a limited color palette use the png format. Otherwise, if there are gradients or many colors use the jpg format.

The final image will be sized to 960x640 unless the image is too small. Try to make the image as close to 960x640 for the best quality.

    idnet.submitProfileImage(mc, 'png');

To know when an image has been submitted, look for the profileImage type in your handleIDNET event listener.

function handleIDNET(e:Event) {
    if(idnet.type == 'profileImage'){
        log(idnet.data);
    }
}

Screenshots are displayed on the user’s id.net profile. Any game that uses the screenshot feature, should have some way to view the porfile. Call the openProfile link to open a new window of the player’s profile.

idnet.openProfile();

Cropping a MovieClip

Using a AS3 rectangle, it’s possible to crop the input of submitProfileImage.

    var rect = new Rectangle(50, 50, 1000, 1000)
    idnet.submitProfileImage(mc, 'png', rect);

Live Examples

The following examples use the screenshots feature to produce screenshots of unique in-game moments. They also display links to the player’s profile.

Orion Sandbox

Fashion Pet Doctor