Changing a Sprite’s Size

The next three looks code block, shown in Figure 10.9, apply only to sprites. They allow you to change a sprite’s size.

Figure 10.9. With these code blocks, you can modify a sprite’s size.


The first code block modifies a sprite’s size by specifying a relative value. Using this code block, as demonstrated next, you can slowly increase a sprite’s size and then reduce its size just as quickly.

The second code block shown in Figure 10.9 lets you set a sprite’s size to a specific percentage of its current size (larger or smaller). For example, the following script begins by doubling the size of a sprite. It then pauses for a second and reduces the sprite to 50% of its original size. After another brief pause, the sprite is restored to its original size.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.42.205