Development Tutorial Videos

Development environment:

It is presumed to use FlashDevelop.
Stage3D is used for drawing.



Library setting:

Right-click live2d.swc, and add a check mark to "Add to library" check box.


Retrieve a model or a Texture:

1. Store a model or a Texture into any directory.
2. Load the file with the following pseudo code;
  1. var loader:URLLoader = new URLLoader;                           //URLLoader Instantiate the class
  2. loader.dataFormat = URLLoaderDataFormat.BINARY;                 //Make it load as a binary
  3. loader.addEventListener(Event.COMPLETE,onComplete);             //Listener of after complete loading
  4. loader.load(new URLRequest(modelPath));                         //Start loading
  5.  
  6. /**
  7.  * An event when the loading is completed
  8.  */
  9. function onComplete():void
  10. {
  11.         /*Describe the process of after complete loading*/
  12.         ・
  13.         ・
  14.         ・
Add "../" for the beginning of the file pass to retrieve like "../assets/...".

3. Pass the loader which completed loading to where it is needed.

Live2DModelAs3 class is used for the model.


Note):With Flash/ ActionScript, loading the file is treated as a different thread.
Loaded files should be used inside the listener which is completed loading.
Remember to use the Loader class, not the URLLoader used in the above pseudo code when loading the image.


Set the model size or the position:


  1. var live2dModel:Live2DModelAs3 ;     // ・・・[1]
  2.                                
  3. live2dModel.x = -60;                 // ・・・[2]
  4. live2dModel.y = 100;                 // ・・・[2]
  5.                                
  6. live2dModel.scaleX = 0.3;            // ・・・[3]
  7. live2dModel.scaleY = 0.3;            // ・・・[3]

[1] : Create a instance of the model.
Complete loading the model data before proceeding to [2].

[2] : Adjusting the model position.
Z axis is not moved basically.

[3] : Setting the rate of zoom in/zoom out.
Z axis is not moved basically.

Tutorial video of simple version SDK sample:

The simple version SDK sample is consisted from the basic elements to move Live2D on Android.
Refer to the following pages about the element which is dependent to Flash(ActionScript3) in SDK.

    1. Set Stage3D
    2. Update



サブページ (2): 1.Set Stage3D 2.Update
Comments