Home > Wrapper > Platogo SDK: Readme



ReadMe

The Platogo SDK makes it easier for you as a developer to interact with the Platogo Services: you can program to ActionScript interfaces rather than dealing with the server-side Platogo API on a very low level. Additionally, Platogo Components make it easier to display high scores and to enrich your game with Platogo features.

Compatibility

The Platogo SDK requires Flash Player Version 9+ and uses ActionScript 3. All versions have been tested with Flash CS4, FlexBuilder and FDT.

Note: Of course you can use also any other Flash creation tool to build games for Platogo, as long as it supports external libraries (SWC files.) Please look up the necessary steps to link external libraries in the documentation of your tool or post a question in the Platogo forums.

Release Notes

Platogo SDK Version 1.4.9

This version of Platogo SDK adds the GamerCard to the UserService to access the callenge results.

This version is 100% backwards-compatible.

Platogo SDK Version 1.4.8

This version of Platogo SDK adds the socialNetworkId to the User object.

This version is 100% backwards-compatible.

Platogo SDK Version 1.4.7

This version of Platogo SDK contains the submitGameScoreAndData and submitLevelScoreAndData methods to make it easy for you to save additional score related data.

This version is 100% backwards-compatible.

Platogo SDK Version 1.4.5

This version of Platogo SDK contains the Social API for inviteFriends, publish content, isFan etc.

This version is 100% backwards-compatible.

Platogo SDK Version 1.2.2774

This version of Platogo SDK contains the new Facebook Shop Integration to make it easier for you to sell virtual goods and upgrades in your games.

This version is 100% backwards-compatible.

Platogo SDK Version 1.0.2021

This version of Platogo SDK contains the brand-new Microtransaction API to enable you to sell virtual goods and upgrades in your games.

This version is 100% backwards-compatible.

Platogo SDK Version 0.8.1820

This version of Platogo SDK contains components to make communication with Platogo even easier, and a list of Platogo logos for you to have fun with and to include in your game.

This version is NOT backwards-compatible:

  • PlatogoAPI.connect() requires a reference to Stage instead of root.
  • ScoreboardDefinition.description property has been renamed to label.

Platogo SDK Version 0.8.1469

This version of Platogo SDK provides preliminary support for haXe and sports a crazy new versioning scheme.

Platogo SDK Version 0.4.30

This version of Platogo SDK provides APIs for High Score, Achievement, Data and Levels.

Getting Started

Once you've downloaded and unzipped the contents of the SDK, follow these steps to get started:

  1. Become a developer to be able to create games and access the API through a unique GameID. To do so just visit the Platogo Dev Center and click on the Join Now button.
  2. Create a new game in your developer dashboard. You can find the link to your dashboard in the upper right of every Dev Center page.
  3. Add PlatogoAPI_[CURRENT_VERSION].swc to your library path, connect to Platogo and publish your first game on Platogo.
    PlatogoAPI.connect( [your game id], [reference to stage], connectHandler );

For more information, take a look at our Getting Started article.

SDK Content

The Platogo SDK download contains everything you need to create your first Platogo game. The download (.zip) file includes following items:

  • API Library - The api directory contains classes to communicate with Platogo for following technologies:
    • Flash - The API Library file (PlatogoAPI_[CURRENT_VERSION].swc) in the flash directory contains all classes needed to communicate with Platogo.
    • haXe - Everything you need to develop in haXe can be found in the haXe directory.
  • Components - We created Platogo Components to make your life as a Platogo developer easier. You can simply drop them into your game, and they take care of tedious tasks like displaying available levels, high scores and more. The components are designed to be easily skinnable to match the looks of your game and are placed in the components directory. For additional information please read our article Create games faster with Platogo components.
  • Documentation - The SDK includes detailed documentation for all classes (ASDoc) in the documentation folder.
  • Logos - We've compiled a list of Platogo logos in various different formats for you to have fun with and to include in your game. You'll find them in the logos directory.

Logos

We've compiled a list of Platogo logos in various different formats for you to have fun with and to include in your game. The following formats are currently available (please tell us if you need more):

  • SVG
  • transparent PNG
  • FLA (CS3 & CS4 flavors)
  • SWC
  • SWF (+ .hx file for haXe hackers)

SWC Example

The SWC contains a MovieClip with the linkage identifier "PlatogoAnimation". You can instantiate this class and add it to the stage to display the Platogo intro animation. It dispatches a COMPLETE event as soon as the animation is completed.

Here's some example code:

var platogoAnimation : MovieClip = new PlatogoAnimation();
platogoAnimation.x = stage.stageWidth / 2;
platogoAnimation.y = stage.stageHeight / 2;

platogoAnimation.addEventListener( Event.COMPLETE, completeListener, false, 0, true );
addChild( platogoAnimation );

function completeListener( event : Event ) : void
{
    platogoAnimation.removeEventListener( Event.COMPLETE, completeListener );
    removeChild( platogoAnimation );

    trace( "Platogo animation is completed - ready to continue game." ):
}

haXe Example

Add PlatogoAnimation.hx to your classpath and you're good to go. Don't forget to include platogoAnimation.swf using the -swf-lib compiler option though. You are now able to instantiate "PlatogoAnimation" and show it in your haXe game. Here's some code to get you started (put it into a file called PlatogoTest.hx to test it):

import flash.Lib;
import flash.display.MovieClip;
import flash.events.Event;

class PlatogoTest
{
    static function main()
    {
		new PlatogoTest();
    }

    private var platogoAnimation : MovieClip;

    public function new()
    {
       platogoAnimation = new PlatogoAnimation();
	   platogoAnimation.x = Lib.current.stage.stageWidth / 2;
	   platogoAnimation.y = Lib.current.stage.stageHeight / 2;

	   platogoAnimation.addEventListener( Event.COMPLETE, completeListener );
	   Lib.current.addChild( platogoAnimation );
    }

    private function completeListener( event : Event ) : Void
    {
	 platogoAnimation.removeEventListener( Event.COMPLETE, completeListener );
	 Lib.current.removeChild( platogoAnimation );

	 platogoAnimation = null;
    }
}

Additional Information

Documentation and Support

Visit the Platogo Dev Center for more information and links to current documentation and support.

Known Issues

For a current list of known issues, visit the Platogo API thread in our forum.

License Information

For detailed information please read our Platogo SDK Agreement