Random Equalizer Bars (Flash)
In this tutorial we will learn how to make random equalizer bars as shown above so friends lets start the tutorial.
Step 1:Open up Flash and start off with a 200 x 200 px new document (you can set any size here as mine is different), set the background color to white #FFFFFF, change the Frame Rate value to 18 , and set the ActionScript version to 2.
Step 2: Grab the Rectangular Tool from the Tool Panel on the left side of workspace .
Step 3: Draw a Rectangular shape as shown in the screen shot. In my sample, the Rectangle I drew is 10 px wide and 17 px high.

Step 4: Now we have to convert this shape object to a Movie Clip. Click on the rectangular we just drew, press F8 and choose Movie Clip while keeping in to set the Registration Point to lower center position. Moving the registration point to this position will ensure that bar scales from the bottom up and not from the center or any other direction.
Step 5: Now that the rectangular is a movie clip, we can add actions which will make it vertically scale in a random manner. While rectangular is selected, press F9 to bring up the Actions Panel and input the following code.
onClipEvent(enterFrame)
{
_yscale = Math.random()*500 + 10;
}
_yscale = Math.random()*500 + 10;
}
Now press Ctrl + ENTER to test movie to see how the bar randomly changes in size.
We can duplicate this bar to as many times as we like by simply holding the Ctrl button and dragging the rectangle to the position in which we would like it to be duplicated.
This is Final result. Hope you like it. Have a good day.
Labels: Flash



0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home