#03 Making your own original desktop mascot

    Exporting your model data

To transfer our model to the Flash app, it requires the .moc file.
Please export the moc files from Cubism Modeler.



    Importing to FlashDevelop

Copy the required data to sample\DesctopMascot\assets .
The required data include your .moc file and the 1024 texture file.





    Rewriting the Render Code

Open up the following file:
sample\DesctopMascot\src\jp\live2d\sample\DesctopMascot.as


As seen above, at line 38 the following codes are found:
  1. [Embed(source = '../../../../assets/wanko/wanko.moc', mimeType = 'application/octet-stream')] 
  2. private var ModelData:Class;

  3. [Embed(source = '../../../../assets/wanko/wanko.1024/texture_00.png')] 
  4. private var Texture_00:Class;

  5. public var textures:Array = [Texture_00];

These codes specify which file to be read, hence what image to render.
You see the "../" a lot because it indicates the path to go up a level of the hierarchy.
"wanko" is referring to the current model. Correct the path to .moc and the texture .png, to your own model's .moc and .png. Remember to correct both the folders and the files.

If you happen to have more than one texture file, please duplicate the codes for Texture_00, and change the name of the new one to Texture_01. 

The image below is an example of new texture files added to the project with model Epsilon:

You should be able to run and see your model if you specified the paths correctly.
Next chapter, let's take our creation here to publish on the net!