Q1 ) There is a statement “startTimer(30);” inside a Function
named " timelineEventHandler" of the “catching-birds.saola” project.
please tell me what does the startTimer(30) means?
=> Thanks to the reply of user mackavi, I’ve got the answer for this question.
where startTimer(30) is a sub-function inside the parent function.
=> but Q2 has not been solved now, please any one reply me.
Q2 ) When I press Home then press Spacebar
on the 2nd scene of “catching-birds.saola” named “Catch birds”,
the background elements move from right to left normally,
Why no any bird element move from right to left ?
how can I let a bird (ex. bird_1) move to the right and shoot by my mouse click?
It’s the name of (and calling) the nested function above it. JavaScript allows you to place functions inside each other to solve more complex problems.
There is an excellent book called Secrets of the JavaScript Ninja published by Manning if you want to learn advanced JS.
Pressing Spacebar will preview the current timeline directly in Canvas.
This type of preview only play animations of the current timeline. It doesn’t support timeline triggers, events and actions.
In this sample project, birds are controled in timeline Birds, and the main timeline trigger at 0 starts this timeline. So this timeline doesn’t run when previewing in Canvas.