MINIPLAY C2S ACTIONSCRIPT 3 API APIs for casual & social games

Preface:

Please help us improving it by reporting us any bugs or suggestions to [email protected], we put our best efforts in order to make life easier for you and the other developers, and your help will be greatly appreciated.

In this document we’ll dig into the JAVASCRIPT API for connecting to our services from any game capable of reaching the Javascript layer of the browser, be it pure HTML+Javascript based or plugin based like Shockwave, Unity or Flash (although there’s an ActionScript 3 API available). Please refer to the MINIPLAY APIs OVERVIEW document first if you haven’t read it yet, knowledge of the concepts explained there is required.

As a convention, we will use red for required parameters and blue for optional parameters. Also be noticed that every timestamp is handled with a precision of milliseconds (POSIX timestamps only have a precision of seconds).

Most of the methods requires callbacks to be passed, callable functions must be provided, nulls are not supported, if you just want to ignore the response, please provide a callback that does nothing. We'll try to implement support for null callbacks in future versions.

1. Introduction

The Actionscript 3 API allows you to connect to our services in full read/write mode, right from the your Flash game. In case of internal games (those that run inside our site sandbox, be them hosted by us or pointed to a custom URL), the API provides your game interoperability with our site as well, (i.e.: opening the login dialog, a scoreboard, purchase items, maximize the game...). In case of external games, the API automatically detects them and provides methods to allow your users authenticate by using their Miniplay account, that’s what we call Miniplay connect*, we’ll talk about it later (although other methods designed for internal interoperability will be disabled).

The ActionScript 3 API requires our Javascript API to be loaded in order to work properly, if your game is hosted by us, it will be loaded automatically, but if you host it by yourself, make sure you load the Javascript API first. (More info at 3. Hosted games).

* You must ask for permission if you want to use this API in an external site so we enable Miniplay connect for you

2. Read/Write access and security concerns.

Flash games are easy to hack, it just need skilled and dedicated people. Our API is designed to make it as hard as possible, but afterall it relies on your code, anyone could inspect their memory for variables and swap their scores. This flash API uses an api_token instead of the S2S api_key counterpart, so, in case your token is compromised, contact us to generate a new one for your game and update it afterwards. Do not ever use your api_key in your flash game to perform requests to our S2S API. This API provides the same functionality and will automatically encrypt the requests (responses are neither encrypted/signed).

If your token is compromised, the “hackers” will be able to implement the API in their own way to send us fake in-game statistics (that will reward them with achievements, experience and gems), if that happens, all the highscores wouldn’t mean anything and the global experience will be ruined. That’s not what we want, we’ll work hard to have fair scores, in case any user that is detected cheating will be penalized and we’ll urge you to patch the game.

2.1. Best practices

Hardcode the api_token in your game, make it as hard to find as possible.

Never provide the api_token as a flashvar.

Devel and production versions have 2 different tokens, you can hardcode both within your game and check the presence of the mp_game_devel flashvar to use one or another.

If your game is hosted with us or you use our flash sandbox template: loglevel is automatically set to 1 (DEBUG) for development version and to 4 (WARN) for production.

If you manually set the loglevel, do not use less than 4 (WARN) for production.

3. Environment & game loading

3.1 Games hosted by us

Your game swf will be loaded automatically into our game sandbox, which is an iframe that runs on a different subdomain to prevent you for accessing to our site javascript. The following flashvars will be provided to your game (most of them are used by our AS3 API afterwards):

mp_game_idId of the game

mp_game_uidUid of the game (up to 30char unique alphanumeric id)

mp_game_urlUrl of the game (current page)

mp_site_urlSite where the game is running (we’ve got a few ones!)

mp_api_js_urlJavascript API url

mp_api_js_url_bckJavascript backend url

mp_api_as3_urlActionscript 3 API url

mp_api_as3_url_bckActionscript 3 backend url

mp_api_user_iduser id if it’s logged in, this is the unique, immutable id of the user, it never changes.

mp_api_user_tokenunique user token, you can store it, but keep it private and secure.

mp_game_devel1 if the game it’s in development mode, not present if not.

The following parameters are set:

allowscriptaccessalways

allowfullscreenfalse

wmodedirect

3.2 Games hosted by yourself

If you need to host the game by yourself or you need to customize the sandbox (the sandbox is the page loaded in our iframe game player) we can point the game iframe to the urls you provide us (one for development, and one for production). The only requirement is that you set the same flashvars & parameters shown at “3.1 Games hosted by us”.

In order to avoid problems, we’ve set up a PHP/HTML template for you that performs all the initialization routines, parameters signature verification and Javascript API loading, use it as an starting point and modify it to suit your needs. It can be easily ported to other languages if you don’t support PHP.

4. Local debugging & testing

Due to the Flash local sandboxing restrictions, our AS3 API only works when you access to your game through the HTTP/HTTPS protocol.

We do not provide a shadow API to allow you local debugging, being socially oriented it just doesn’t make sense, instead, we’ve made our best effort to provide you a development environment that allows you to test the game in it’s full glory, including in-game purchases, stats, highscores, achievements.... Just host the development version of the game by yourself in a locally installed webserver (tons of free ones available) to make as many changes as you like and be able to debug it.

If you want a simpler approach, we can provide you a temporary FTP account for testing, but you will develop a lot slower.

5. Compatibility

Our API only works for Actionscript 3, if your game is hosted with us, Flash Player v.10+ is required (>97% of global user base). We do not plan to support Actionscript 2.

6. API Loading

Our AS3 API is meant to be dynamically loaded, to do it, get the mp_api_as3_url from the flashvars and load it with a Loader object, once completed, keep a reference to the API object by your preferred means.

7. Integration with the Javascript API

As previously stated, the Actionscript 3 API (this one) requires the Javascript API to be initialized (done automatically if your game is hosted by us and using our sandbox), the AS3 API can be still be usable without it, but ignoring to do so will cause the AS3 API to be in limited mode and a lot of methods won’t be available. If you host the game by yourself, make sure you correctly initialize both APIs (use our sandbox template).

Our AS3 API automatically handles games that han been published elsewhere from our sites, if you try to log in an user, it will redirect him/her to your game in our sites. More information about detecting external games can be found at APPENDIX. DETECTING EXTERNAL GAMES.

8. API Demo source code (.fla)

We’ve released a simple demo to give you a fast look of our AS3 API, including initialization, user detection & authentication... Just ask us to create your game, download the .fla file, set it up with your tokens and you’re ready to go. This code can be easily ported to Flex Applications as well.

You can run it right from Flash, but all the methods that need the JS API will be unavailable, and you’ll probably get Security Errors due the local sandboxing restrictions. To test the demo inside of our site and take advantage of all functionalities, host the swf it in a local webserver (or wherever you want) and ask us to configure the game url to your local one (we don’t mind if its local, it’s just for development purposes).

Another option is to host the game + the sandbox in a local webserver and take control of everything by yourself (tell us to point the iframe url to your sandbox url). Refer to 3.2 to download the sandbox template with the basic initialization included.

10. Basic methods & properties

Connects to the API and validates the api_token, once connected (or if already connected), the callback is triggered if provided. You can provide an empty callback function.

The user_id & user_token parameters are both optional. Only set them for testing purposes. In case of absence of this parameters, the API will detect them automatically from the mp_api_user_id & mp_api_user_token flasvhars. If they’re not set & the flashvars are empty or not present, a guest user is assumed.

10.2 disconnect()

Disconnects from the API.

10.3 connectError:Error

In case of connection error, eccess to the Error object.

10.4 isConnected:Boolean

Is the API connected to the backend?.

10.5 isConnectedJS:Boolean

Is the API connected to the JS API?. Remember that the JS API is required in order to work properly, If not present, a lot of methods will be unavailable.

10.6 isDevel:Boolean

Is the development version of the game. It just search and returns true if the mp_game_devel flashvar is present so you can switch between different logic (i.e: tokens) if necessary.

10.7 isInternal:Boolean

Is an internal game? (running inside our site).

10.7 isExternal:Boolean

Is an external game? (not running inside our site).

10.8 version:String

Get the api version.

10.9 Events

You can attach listeners for the following events:

10.9.1 onConnect( callback:Function)

Triggered when the API is connected. The callback doesn’t receive parameters.

10.9.2 onUnableToConnect( callback:Function)

10.9.3 onDisconnect( callback:Function)

Triggered when the API disconnects. The callback doesn’t receive parameters.

10.9.4 onUserDisconnect( callback:Function)

Triggered when the user is disconnected (i.e. The user can close the session on another browser tab, after a few seconds, this event will be triggered).The callback doesn’t receive parameters.

10.9.5 onResize( callback:Function)

Triggered when the game is resized. The callback doesn’t receive parameters.

10.10 Logging

Our API provides logging functionality, if your game is running and it’s connected to both our AS3 & JS API, all logging is sent directly sent to the browser console. If your game doesn’t have access to the JS API, the logging is traced, in that case, a listener can be registered by using the onTrace method so you can handle the messages.

10.10.1 logLevel( level:int)

Sets the log level, it’s automatically set to 3 by default. Our sandbox sets it to 1 for development games and 4 for production games (the API reads the mp_log_level flashvar).

Available log levels:

1 - Spam

2 - Debug

3 - Info

4 - Warn

5 - Error

10.10.2 logSpam( message:Object)

Logs a spam message, can be anything, from strings to objects.

10.10.3 logDebug( message:Object )

Logs a debug message, can be anything, from strings to objects.

10.10.4 logInfo( message:Object )

Logs an info message, can be anything, from strings to objects.

10.10.5 logWarn(message:Object )

Logs a warning message, can be anything, from strings to objects.

10.10.6 logError(message:Object )

Logs an error message, can be anything, from strings to objects.

10.10.7 logListener(callback:Function,logLevelString:String = "All")

Listens for log events and calls the callback when triggered, by default, listens for all logged messages. You can listen for errors by using the logLevelString = "Error". The callback receives an Event object with the type & msg properties.

10.10.7 onTrace(callback:Function)

Listens for trace events and calls the callback when triggered. The callback receives an Event object with the type & msg properties.

10.10.8 dump(obj:Object )

Dumps an object to console (or trace it if browser console not available). The log level is ignored, the object will always be dumped.

10.10.9 trace(message:Object)

Trace a message or an object. The log level is ignored, the object will always be traced.

11. ENVIRONMENT module

The environment module allows you to interact with the game environment, in other words, to communicate with our site. This module is disabled for external games.

11.1 isInternal()

Returns trueif the game is running inside our site, false otherwise.

11.2 isExternal()

Returns trueif the game is not running inside our site, false if it’s internal.

11.3 toComments()

Scrolls to the comments section.

11.4 toControls()

Scrolls to the controls section.

11.5 toDescription()

Scrolls to the description section.

11.6 toSimilarGames()

Scrolls to the similar games section.

11.7 toCollectionGames()

Scrolls to the games of the same collection section.

11.8 toSagaGames()

Scrolls to the games of the same saga section.

11.9 toShare()

Opens the share game dialog.

11.10 toAchievements()

Opens the game achievements or navigate to them if they’re already opened.

11.11 toHighscoreGlobal( hs_uid:String, timespan:String= “TOTAL”)

Opens the game global scoreboard (for all users) specified at hs_uid.

Supported timespans: TOTAL, DAY, WEEK, MONTH.

// Show best points scoreboard for last 24 hours
lechuck.environment.toHighscoreGlobal("best_points","DAY");

11.12 toHighscoreFriends( hs_uid:String)

Opens the game friends scoreboard (for an user) specified at hs_uid.

// Show best points scoreboard only for the users followed by the logged user
lechuck.environment.toHighscoreFriends("best_points");

11.13 PLAYER

The player methods allows you to obtain information about our game player (the player is the sandbox iframe with the hosted game or with your game url).

11.13.1 playerIsScalable()

Returns trueif the game can be maximized, false otherwise.

11.13.2 playerIsMaximized()

Returns trueif the game is maximized, false otherwise.

11.13.3 playerMaximize()

Request the game to be maximized, false otherwise.

11.13.4 playerMinimize()

Request the game to be minimized (remember: the minimized version is just the small player).

11.13.9 playerIsResizable()

11.13.10 playerSetSize( numberwidth, numberheight ) Requires the resize API to be available

Allows you to change the sandbox player size in pixels. It automatically changes the view type between "small" and "large". Specially useful if you’ve got a flexible height game. Call it whenever your game width/height* changes:

11.13.11 playerResetSize() Requires the resize API to be available

Resets the sandbox player size to it’s defaults.

12 USER module

Allows you to manage the current logged user or to authenticate one, the user will be automatically connected if the mp_api_user_id & mp_api_user_token flashvars are present, so, if you’re not using your own sandbox it all will be automatically handled. Once the API is connected, you can check the user login status (as demonstrated on chapter 6. API Loading)

You must assume that by default, your game will receive guest users, and, only if the user is logged in in our site, you’ll receive the mp_api_user_id and mp_api_user_token parameters. So, if your game only works for authenticated users you must check the current status:

All users grant you permissions to access their user_token just by playing your game, there’s no need for them to grant you any special privileges.

12.1 isGuest()

Returns trueif the user is not logged in, false otherwise (the user is logged in).

12.2 id

User id of the logged user. This field is immutable, it will be always the same.

12.3 uid

The user uid (alias) of the logged user. This field is mutable, the user can change it and a different one could use it later.

12.4 level

The progress level of the logged user.

12.5 avatar

The default avatar url (head) of the logged user (96x96px jpg). This asset is immutable (you can store this url and you’ll always get the latest version).

12.6 avatar_mini

Returns the default avatar url (head) of the logged user in small format (32x32px jpg). This asset is immutable (you can store this url and you’ll always get the latest version).

12.7 avatar_big

Returns the default avatar url (head) of the logged user in large format (256x256px jpg). This asset is immutable (you can store this url and you’ll always get the latest version).

12.8 avatar_alpha

Returns the default avatar url (head) of the logged user in standard, transparent format (96x96px png). This asset is immutable (you can store this url and you’ll always get the latest version).

12.9 avatar_body

Returns the default avatar url (full body of the logged user in standard, transparent format (160x220px png). This asset is immutable (you can store this url and you’ll always get the latest version).

12.10 login()

Opens the login dialog for authentication if the game is internal or initiates the Miniplay connect workflow (by opening a popup to our site, crossdomain issues are automatically handled by our API), once completed, the page is refreshed (In external games, your page will be reloaded in order to to receive the mp_api_user_id and mp_api_user_token url parameters).

If the game is external and it's neither connected to the JS API or doesn't have access to the Miniplay connect, it will try to redirect to your game page inside Miniplay, by detecting the user language and sending him/her to the best suitable candidate (i.e. Minijuegos for spanish, or Minigiochi for italian).

12.11 die()

Authenticates an user token and sets it as logged if it’s valid, a response object is sent as the first parameter to the callback with the properties:

boolean isValid

string errorTypein case of error (false on success)

string errorMessagein case of error (false on success)

12.13 get( callback:Function, user_id:String, user_token:String)

Gets an user detail, if no user_token is provided, the public detail will be retrieved; if provided and it’s valid, the full detail will be retrieved. If no user_id provided, the current logged user will be assumed (if any).

A response object is sent as the first parameter to the callback with the properties:

Please notice that some fields will only be provided to selected developers prior mutual agreement.

12.14 subscriptions( callback:Function, options:Object)

This is probably the most important list for game developers. Gets the subscriptions list of the logged user (who he/she follows), ordered by descending timestamp, can be easily paginated by using the timestamps. Every user in the list will contain the time property corresponding to the millisecond timestamp when the event occurred (in this case, the subscription of the user).

The following options are supported:

boolean withProgressinclude each user progress level

boolean withDetailinclude each user basic detail (true by default)

boolean withInstalledto include the installed flag (has played the game?, false by def.)

number limitnumber of items to retrieve (20 by default, 99 max)

number fromTimestampoldest timestamp (in milliseconds), inclusive

number toTimestampnewest timestamp (in milliseconds), exclusive

A response object is sent as the first parameter to the callback with the properties:

12.15 friends(callback:Function, options:Object)

Gets the friends list of the logged user (who are followed by and following user), ordered by descending timestamp, can be easily paginated by using the timestamps. Every user in the list will contain the time property corresponding to the millisecond timestamp when the event occurred (in this case, when the friendship).

The following options are supported:

boolean withProgressinclude each user progress level

boolean withDetailinclude each user basic detail (true by default)

boolean withInstalledto include the installed flag (has played the game?, false by def.)

number limitnumber of items to retrieve (20 by default, 99 max)

number fromTimestampoldest timestamp (in milliseconds), inclusive

number toTimestampnewest timestamp (in milliseconds), exclusive

A response object is sent as the first parameter to the callback with the properties:

10.16 followers( callback:Function, options:Object)

Gets the followers list of the logged user, ordered by descending timestamp, can be easily paginated by using the timestamps. Every user in the list will contain the time property corresponding to the millisecond timestamp when the event occurred (in this case, the following of the provided user).

The following options are supported:

boolean withProgressinclude each user progress level

boolean withDetailinclude each user basic detail (true by default)

number limitnumber of items to retrieve (20 by default, 99 max)

number fromTimestampoldest timestamp (in milliseconds), inclusive

number toTimestampnewest timestamp (in milliseconds), exclusive

A response object is sent as the first parameter to the callback with the properties:

Checks if an user is subscribed (follows) to another one (user2_id), set withInstalled flag to true if you want to retrieve the is_installed flag as well (if the user has played the game)

A response object is sent as the first parameter to the callback with the properties:

boolean is_subscribedIs the user subscribed to user2_id?

boolean is_friendAre they friends? (communications & sharing allowed)

boolean is_installedHas the user installed the game? (played it)

number time64bit millisecond timestamp (of the subscription)

string errorTypein case of error (false on success)

string errorMessagein case of error (false on success)

13 STAT module

Allows you to send, retrieve and reset game stats for users to track their progress. All configured stats for your game are listed in your development sandbox, give them a look and don’t hesitate to ask us for as many as you want, we love stats!.

13.3 put( callback:Function, stat_uid:String, value:int)

Sends a game stat for the user, it will be automatically handled according with the stat type (REPLACE, MIN, MAX or SUM), so it may or not be saved. Please do not spam our API servers with user stats constantly, there’s no problem receiving a few stats each minute, but they perform a lot of complex operations (highscore checking, achievements...), we will be destroyed if we receive stats each time an user shoots a bullet, instead of that, accumulate them and send the total once the user finishes the level. We do track how many stats each API clients sends ;)

Parameters

stat_uidUid of the stat

value32 bit integer value, if you need floating point, multiply it for The highest number supported is 2.147.483.647
Negative numbers are not allowed

A response object is sent as the first parameter to the callback with the properties:

14. HIGHSCORE module

This module gives you the ability to retrieve the scoreboards and positions to show them in your game. Please remember that if you multiply the stats to handle floating point numbers in your game the highscore will also be stored multiplied, you have to divide them by in order to get the same precision for displaying it. In our sites we do that automatically, so you don’t have to worry about it, just tell us how many decimal numbers the stat & the highscore have.

We will provide you the hs_uid when we create them but they will also be available in your development sandbox along a few tools that you might find useful.

14.1 global(callback:Function,hs_uid:string, options:Object)

Gets a global scoreboard, they will be ordered as configured, starting from the best, the items can be easily paginated by using the score and the timestamp of the last item of the batch.

The following options are supported:

string timespan[TOTAL, DAY, WEEK, MONTH] (TOTAL by default)

boolean withDetailinclude each user basic detail (true by default)

boolean withProgressinclude each user progress level

boolean withSharedContentto check if it has shared content and get the id

number limitnumber of items to retrieve (20 by default)

number startScorestarting score, inclusive (exclusive if no timestamp sent)

number startTimestampstarting timestamp (in milliseconds), exclusive.

A response object is sent as the first parameter to the callback with the properties:

14.2 friends(callback:Function,hs_uid:string, options:Object)

Gets the user social scoreboard, the friends scoreboard corresponds to a board where only shows the user and the users he/she is following /not just the friends). As soon as the user follows another, its score will be sent to the user friends scoreboard, the same happens when the user stops following an user, it will be removed from it. Scores will be sorted as configured, starting from the best, items can be easily paginated by using the score and the user id of the last item of the batch. The user must be logged in or this will return an error response.

The following options are supported:

boolean withDetailinclude each user basic detail (true by default)

boolean withProgressinclude each user progress level

boolean withSharedContentto check if it has shared content and get the id

number limitnumber of items to retrieve (20 by default)

number startScorestarting score, inclusive (exclusive if no timestamp sent)

number startTimestampstarting timestamp (in milliseconds), exclusive.

A response object is sent as the first parameter to the callback with the properties:

14.3 score(callback:Function,hs_uid:string, options:Object)

Retrieves an user score from a scoreboard (this value may be different from the one reported by getting the stat value, because the scoreboard can have different sorting or computation methods than the stat).

The following options are supported:

string timespan[TOTAL, DAY, WEEK, MONTH] (TOTAL by default)

boolean withSharedContentto check if it has shared content and get the id

A response object is sent as the first parameter to the callback with the properties:

15. SHAREDCONTENT module

This module allows you to save and retrieve user created shared content (like levels for your games, replays, etc). One of the most interesting features we provide is that they can be associated with highscores: when you post a stat and it’s good enough to produce an update in a scoreboard, a highscoresSharedContentId is returned as well, in case you want to store related data (by issuing a shared content put request afterwards). Here’s one good use-case: You’ve got a racing game, and after each race you have the full lap serialized into a string or bytearray, you can store it, display the best times scoreboard and let your users compete against the best. When loading scoreboards, you can retrieve the associated sharedContentId as well.

There’s no limit in the amount of total data you can store, but each shared content slot can only store 50kb of data. Do not spam our servers with data, we track each game storage usage.

15.1 load(callback:Function,sc_id:string)

Retrieves the shared content data with the id provided..

A response object is sent as the first parameter to the callback with the properties:

ByteArray dataBinary data (or null if none). If empty a 404 will be issued and an error will be logged

string errorTypein case of error (false on success), "UNABLE_TO_LOAD" error will be issued if slot is empty or not found.

boolean withSharedContentto check if it has shared content and get the id

number limitnumber of items to retrieve (20 by default)

number startScorestarting score, inclusive (exclusive if no timestamp sent)

number startTimestampstarting timestamp (in milliseconds), exclusive.

Response: data.logArrray of log rows with these properties:

data.log[x].item_id Item id

data.log[x].item_uid Item uid

data.log[x].user_id User id

data.log[x].timestamp Timestamp of the operation

data.log[x].op_amount Amount incremented/decremented

data.log[x].op_new_stock Resulting stock

data.log[x].from_api Boolean, was the operation an API request?

data.log[x].from_ip Ip that originated the operation

data.log[x].minicoins Amount of minicoins

17.7 buy(callback:Function, items:Object)

Initiates the purchase items with Minicoins workflow (fully handled by us) an object with the items uids and amount that the user is going to purchase must be provided. The items uids are available on your development sandbox, as well as some interesting stuff (like an item reset tool or a log). On your development game all items are free, on the production game they’re paid, please contact us in order to define and configure the items along with their price, there’s no limit of items that can be configured.

This is a sample items purchase object, 100 units of amo and 1 shield unit:

{"ammo": "100", "shield": 1 }

Once the item/s have been purchased (or cancelled) a response object is sent as the first parameter to the callback with the following properties:

For selected developers and complex games we support an additional type of items called "dynamic", which allows you to set a custom title and price for an item when you initiate the purchase workflow via any of our client apis. To prevent any modification of the payload, these items purchases must be validated server-side, we will always ask you if the user can purchase the dynamic item with the data that you provided us.

Check the Javascript API for more info about dynamic items.

Appendix 1: Local debugging tips & tricks

We’ve discussed in various sections (3, 4 & 8) about the restrictions & limitations of the flash sandbox when running local applications. Here are a few tips to help you debugging your games faster and easier.

Do not use the file protocol

Flash blocks remote communications when using the file:/// protocol (local), neither our API or the communication with our API servers will be allowed.

Run a local webserver

Create a local development platform, by installing any of the free webservers available for various platforms, like XAMPP, or Zend Server(both free).

Configure your game project to be saved there and to debug the url of your game .

If you need customizations you can even host your own version of our Sandbox template and put it here: http://localhost/myGame/index.php (for example).

Ask us to link the development version of the game to your flash game http://localhost/myGame/myGame.swf (if you’re using our sandbox) or if you have your custom sandbox, to link the game iframe to your own http://localhost/myGame/index.php

Test it and while you’re ready, ask us to publish your game (send us the files of your game if you want us to host it or send us your production url).

Your game will be published in our sites and you can still have access to your development version to perform changes (do not forget to send us again your files if they’re hosted by us).

Use a web debugger proxy tool:

We recommend you to use some web debugger proxy tool, like Charles or Fiddler, it allows you to map remote resources to local ones for debugging purposes, that’s super handy for flash developers. If you don’t want to run a local webserver we can put a dummy swf into the development page for your game and you can map it to your own local game swf to make as many tests and remote debug sessions as you want, great, isn’t it?.

FTP Account

In case you still prefer another approach we can provide you a temporary FTP account that you can use to upload your game files for testing purposes, just be noticed that PHP support is not enabled. Contact us if you need one.

Appendix 2: Detecting internal / external games

In the case that your game SWF is copied and published elsewhere, it will be highly limited due of the non-presence of the JS API causing the game to be
unable to communicate with our site (to show highscores, achievements, maximize the game, show user comments, share the game... etc).

This is automatically handled by our lechuck.user.login() method, if the game is not running inside our site, the user will be redirected automatically to our site.

If you want to provide better insight to the user, it's a very good practice to check wheter the game is running from one of our sites or not, you can do this by
calling the lechuck.environment.isExternal() method, it will return true if it's not in our site, so you can change the
"please log in" button for a "Play in MiniPlay" button (that also calls the lechuck.user.login() method).

Do you have questions or want to report some bugs? please contact us at [email protected]