|
|
Search Tutorials
Returning to the Original State (cont.)The first Else statement confirms that the mouse isn’t located inside the box and thus we want to return all objects to their original state. If this is the case, then we have to take in account, if an object has a greater scale or alpha value than its original and if the vertical position is greater or smaller than the original, which is done in a loop. If the scale is greater than the original (100), we decrease the scale by –1. If the alpha value is greater than 50, we decrease it by –1 in the same way as with the scale. If the vertical position is greater than the original, we decrease it by –1 and on the other hand, if the vertical position is smaller than the original, we increase it by 1.
|
||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||
|