Here is a simple way of generating random grass for banners etc using swishmax 4.
First Of All.
Open swishmax 4 and set you movie properties to the following, width = 553 height = 156 and frame rate to 25, background colour = whatever you want.
download the following grass *.emf vector
and import into swishmax 4 using the import Vector. 
| download: Grass vector (1.40KB) added: 02/04/2011 clicks: 69 description: Grass clump vector for swishmax 4 *.emf format. |
Step.1
Once you have imported the grass vector into swishmax 4, group it as a movieclip and name it grass_2, add the following script to the movieclip, make sure the transofrm point is bottom center 
1 2 3 4 | onFrame (1) { this._yscale=randomRange(60,140); this._y=Stage.height; } |
On Scene_1 add the following code.
1 2 3 4 5 6 7 | onFrame (1) { amount=Stage.width/30; for (blade=0; blade<amount; blade++) { duplicateMovieClip(_root.grass_2, "grass_2"+blade, blade); grass_2._x=30*blade; } } |
thats all their is to it. press Ctrl+t to test in player
export as swf 6 onwards.
5:23 PM
dsadsadsa
0 التعليقات:
Post a Comment