Play the games, create the levels

BonusLevel docs, Level editor API

Checkout our iPhone & iPad games!

EditorManager.as, specific functions

  blEditLvl ( data: as2 String as3 ByteArray )

  From the BL API to the editor.

When this method is called, you have to unserialize the data (contained in data) and to start editing the level corresponding to these data.

When data is empty, we deal with a new level.

This method is asynchronous. The editor will reply with sendEditResult ( res : Boolean , errorMessage : String ); when the level data are unserialized or if it was not possible to unserialize the data.

Advanced : If the level data is very heavy to unserialize, it might be interesting to split the workload over several frames not to stop the animations arounds (animations of the BL graphics interface).


  blGetLvlData ( )

  From the BL API to the editor.

When this method is called, you have to serialize the data from the level currently edited by the designer, and to send it to the BL API.

This method is asynchronous. The editor will reply with sendLvlData ( res : Boolean , theSerializedData : as2 String as3 ByteArray ); when the level data are serialized or if it was not possible to serialize the data.

Advanced : If the level data is very heavy to serialize, it might be interesting to split the workload over several frames not to stop the animations arounds (animations of the BL graphics interface).


Our free flash games   Games for your site   Games for your iPhone   Contact   Twitter @jpsarda & @bonuslevelorg