Building a Tsunami

Page 3 of 3
Returning to the original state
In the second case, we have the following code:
Else
Comment: *** shrink text back when mouse rolls out
Set Variable: "i" = startnum
Loop While (i <= endnum)
If (int ( GetProperty ("text" & i, _yscale ) ) > 100)
//Comment: return scale back to original state
Set Property ("text" & i, Y Scale) = Int ( GetProperty ("text" & i, _yscale ) ) - 1
Set Property ("text" & i, X Scale) = Int ( GetProperty ("text" & i, _xscale ) ) -1
End If
If ( GetProperty ("text" & i, _y) < EVAL("textY" & i))
//Comment: return y position back to original state
Set Property ("text" & i, Y Position) = Int ( GetProperty ("text" & i, _y ) ) + 1
End If
If ( GetProperty ("text" & i, _y) > EVAL("textY" & i))
Set Property ("text" & i, Y Position) = Int ( GetProperty ("text" & i, _y ) ) - 1
End If
If ( GetProperty ("text" & i, _Alpha) > 50)
Set Property ("text" & i, Alpha) = Int ( GetProperty ("text" & i, _alpha ) ) - 1
End If
Set Variable: "i" = i + 1
End Loop
End If
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.
Customizing the file
To create multiple columns, you will need to add additional bounding boxes inside “01 – boundingbox”. The second box must be called “boundbox2”, the third “boundbox3” etc. When this is done, the columns must be placed inside the appropriate box and the first four variables in frame 2 inside the columns changed according to the number of the box, starting number, ending number and number of objects. For example the second column (inside box no. 2) should have the column number 2 (if it was 1, then the objects would be scaled and given an alpha value, if the mouse was located inside box 1). The scale amount and alpha value could be specific to each column; you would only have to change the maximum, minimum and dividend in “scaleAmount” and “alphaAmount”.
Spread The Word
Related Articles
3 Responses to "Building a Tsunami" 
|
said this on 14 Jun 2007 2:12:11 PM CDT
Is there a way to modify
|
|
said this on 18 Jul 2007 11:28:19 AM CDT
Tutorial does not indicat
|
|
said this on 06 May 2009 5:55:38 PM CDT
how do i change it so eac
|


Author/Admin)