Let's work out the zoom. We really don't have very much to do, since most of it has alreday been done. Each time the main loop is looped it adds a certain value to the zoom (or substracts). When you roll over the zoom buttons, they change the value added from 0 to a positive or negative value (zoom in or out). When you roll out they reset it to 0.
First open the start frame(n°2) and add this code just after the setting of the xcenter and the ycenter.
Set Variable: "zm" = "0"This initiates the zm variable, which indicates by how much the zoom should be changed.
Now open the loop layer and add this:
Call ("zoom") Call ("draw")That way the zoom routine is called every time the engine loops. The draw routine is also called to refresh.
|» Level Advanced|
Rating: 9 Votes: 2631
|KStor is a student living in France and working with Flash during his free time...that is, not very much.|
|Download the files used in this tutorial.|
|Download (39 kb)|
|More help? Search our boards for quick answers!|