Let players share unique moments in a game by saving a screenshot to their Y8 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.

	sdk.submitProfileImage(mc, 'png');

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

function handleSDK(e:Event) {
	if(sdk.type == 'profileImage'){

Screenshots are displayed on the user’s Y8 Account 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.


Cropping a MovieClip

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

	var rect = new Rectangle(50, 50, 1000, 1000)
	sdk.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