Getting Started with Action Script

Register and Create App

Here are the following steps to get started with App42 platform

bullet Register with App42 platform

bullet Create an app once you are on Quick-start page after registration.

bullet If you are already registered, login to AppHQ console and create an app from App Manager -> Create App link.

bullet Once App is created, you will get an ApiKey/SecretKey that you will use in your app for initialization of SDK.

Download and Set up SDK

bullet Download Action Script SDK

bullet Unzip downloaded Zip file. Unzip folder contains App42_ActionScript_SDK-x.x.swc

bullet Add the reference of App42_ActionScript_SDK_x.x.swc in your project.

Initialize SDK

You have to instantiate ServiceAPI class and pass your ApiKey/SecretKey to initialize the SDK.

   var serviceAPI:ServiceAPI = new ServiceAPI("YOUR_API_KEY","YOUR_SECRET_KEY"); 

Using App42 Services

Once you have initialized your SDK with API Key/SecretKey you have to build target service that you want to use in your app. For example, User Service can be build with following snippet. Similarly you can build other service also with same notation. Want to know about all the services of App42 Platform? Click Here

//Build User Service
var userService:UserService = serviceAPI.buildUserService();
// Using userService reference, you should be able to call all its method like create user/update user/authenticate etc.
//Build Storage Service
var storageService:StorageService = serviceAPI.buildStorageService();
// Using storageService reference, you should be able to call all its method like insert/save/update/delete etc for JSON objects.
//Similarly you can build other services like App42API.buildXXXXService()

Next

bullet Go To Creating App User for learning App User Management

OR

bullet Go To Saving App Data to learn about App Data Storage.