Egret learning diary entry --- Title XIII (Advanced chapter)

Title XIII (Advanced chapter)

  Diary has been more than ten days, I found more to the back, the way I write more and more procedures.

  Gradually he lost the feeling of so-called human-like emotions.

  

  However, I did not expect that the contents of the book, a rare mistake, I came all the way up to now very smooth. And there is no step on the bumpy stuff.

  Therefore, the group Q in a relatively few questions. Haha, I do not know a good thing or a bad thing.

  Well, I do not talk to me, to start learning.

  Yesterday get 5.1, then 5.2 beginning today.

  

  

  

  To summarize the focus of section 5.2:

    1, in order to solve button stretching deformation, resulting need to use squares.

  Do what I do:

    Key 1: In order to solve the deformation when stretched button to generate the need to use squares.

      According to the book said.

      

      Will produce distortion, I'll try it.

      

      Sure enough, this custom button component is myButton.exml, I stretch it in New.exml, the really distorted.

      Start now according to the book said squared to fix this problem.

      Speak truth, I did not find where squares.

      

      

      Seems to hit the pit, I have a look.

      Well, I really can not find where in the squares, but I constraint of this place myButton.exml.

      

      We found that the problem is solved. Tensile not deformed.

      New.exml quoted buttons, no problem.

      

  Thus, section 5.2 content is completed.

    

  Then start section 5.3 content.

  

   

  

  

  

  

  

  

  Well, to sum up the content of 5.3:

    1, click the button, random switch to a different expression states.

  Do what I do:

    Key 1: Click the button to switch random different expression states.

      Well, start.

      So, prepare resources.

      

      Next, create Face.exml file.

      

      Click Add State.

      

      A name one.

      

      Click OK to create a better state.

      

      The first dragged into a state of expression. And save.

      

      And so below. Created three states.

      

      Face.exml look at the source code.

      

      Create a file class FaceTs.ts good binding Face.exml file.

      

      开始实例化 FaceTs 类。

      

      运行效果。

      

      

      成功了,当我点击按钮的时候,表情也会随机的切换了。

   至此,5.3节 内容完成。

 

  吃饭去了。不知不觉19点了。

  

  今天就到这里吧。

 

Guess you like

Origin www.cnblogs.com/dmc-nero/p/11226964.html