1. #1
    Sencha User
    Join Date
    Aug 2013
    Location
    New York
    Posts
    19
    Vote Rating
    0
    webreality_ny is on a distinguished road

      0  

    Default Difference between Init and Start on scene

    Difference between Init and Start on scene


    What's the difference between Init and Start in the scene actions?

  2. #2
    Sencha - Architect Dev Team
    Join Date
    Apr 2012
    Posts
    226
    Vote Rating
    21
    miro.bojic will become famous soon enough miro.bojic will become famous soon enough

      1  

    Default


    Init is executed before the scene is loaded, so basically before any object in your scene exists. Start is executed after the scene has been fully loaded, so all the objects exist. You should use Init to initialize variables that you plan to use throughout your animation, and Start to execute functions just before your scene starts playing.

  3. #3
    Sencha User
    Join Date
    Aug 2013
    Location
    New York
    Posts
    19
    Vote Rating
    0
    webreality_ny is on a distinguished road

      0  

    Default


    Thank you for the explanation. Are there performance benefits using one over the other?
    Quote Originally Posted by miro.bojic View Post
    Init is executed before the scene is loaded, so basically before any object in your scene exists. Start is executed after the scene has been fully loaded, so all the objects exist. You should use Init to initialize variables that you plan to use throughout your animation, and Start to execute functions just before your scene starts playing.

  4. #4
    Sencha - Architect Dev Team
    Join Date
    Apr 2012
    Posts
    226
    Vote Rating
    21
    miro.bojic will become famous soon enough miro.bojic will become famous soon enough

      0  

    Default


    Performance is the same, the only difference is in order of execution.

Thread Participants: 1