Simple method of making music audio frequency spectrum

Source: Internet
Author: User

  The effect is as follows:

Click here to download the source file

(1). Press Ctrl+f8 to create a new movie clip, named Line, as shown


(2). Draw a long strip inside the line element, set as Figure


(3) Return to the main scene, press Ctrl+l to open the component library, the line components dragged to the stage, whatever position can be placed in the attribute of the actual column name of line, set as shown


(4). Click the first frame of the main scene to write the following code
max=40;
line._visible=false;//set line movie to Invisible
for (i=1;i<max;i++) {
Copy the movie line, copy the new movie name "line" +i, depth is I
Duplicatemovieclip ("line", "line" +i,i);
With (this["line" +i]) {
_x=i*7+100;//set the new movie x-axis coordinates after replication
_y=200;//set the new movie y-coordinate after replication
_alpha=70;//set the transparency of a new movie after replication
};
};
Onenterframe=function () function causes flash frames to trigger the contents of the code block
Onenterframe=function () {
for (i=1;i<max;i++) {
this["line" +i]._yscale=random (100);//Set the zoom factor for the new movie y-axis after replication
};
};
You can just copy this quick code right over there.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.