Macromedia Flash - Variable circle

This exercise will show you how to create a circular transformation of the circle using the Action Script.

Try hovering over the image above to see how the circle changes.

Step 1

Create a new Flash document, go to Modify > Document (Ctrl + J) and set the width to 300px, the height to 200px. Frame rate is 24fps (Frames per second).

Step 2

Double click on layer 1 and rename it to Background . Then lock the Background layer and add a new layer and name it Circle .

Step 3

Select the Oval Tool (O) and draw a circle with size 30x30px. Set the correct size for the circle by: selecting the new circle, press Ctrl + F3 and change the Properties parameter

Macromedia Flash - Variable circle Picture 1

Macromedia Flash - Variable circle Picture 2

Step 4

Select the circle you just drawn and press F8 to convert the circle into a Movie Clip .

Macromedia Flash - Variable circle Picture 3

Step 5

Continue to select the Circle layer again, open the Action Script window (F9) and enter the following script content:

onClipEvent (load) {
setProperty (this, _xscale, (300 - _root._xmouse) * 2);
setProperty (this, _yscale, (300 - _root._ymouse) * 2);
setProperty (this, _alpha, 100);
}
onClipEvent (enterFrame) {
setProperty (this, _xscale, _xscale - 10);
setProperty (this, _yscale, _yscale - 10);
if (_alpha> 4) {
setProperty (this, _alpha, _alpha - 5);
}
}

Step 6

Then select the Movie Clip ' Circle ', open Properties (Ctrl + F3) and enter the circle content for the part

Macromedia Flash - Variable circle Picture 4

Step 7

Add a new layer named Action . Click Frame 1, open the Action Script (F9) and enter the scrip:

i = 0;
setProperty ("circle", _visible, false);

Step 8

Click on Frame 2 of the Action layer> press F6 (keyframe)> open Action Script and enter the scrip:

duplicateMovieClip ("circle", "circle" + i, i);
removeMovieClip ("circle" + (i-15));
if (i> 14) {
i = 0;
}
i ++;

Step 9

Click Frame 3 of the Action layer> press F6 key> enter the scrip:

gotoAndPlay (_currentframe - 1);

Step 10

Click on Frame 3 of Circle and Background> press F5

Macromedia Flash - Variable circle Picture 5

Press Ctrl + Enter to test the product

It is done! (Download finished products)

4 ★ | 1 Vote

May be interested

  • Photoshop CS: SketchesPhoto of Photoshop CS: Sketches
    the black-and-white pictures sketched out in just a few strokes, have their own characteristics and impressions. did you know how to change a color image into a sketch? this article will guide you 2 ways to t
  • Macromedia Flash - The object moves with the mouse click positionPhoto of Macromedia Flash - The object moves with the mouse click position
    with this exercise, we will show you how to create an object that will move with the mouse click position using the action script.
  • Macromedia Flash - Dynamic cursor objectPhoto of Macromedia Flash - Dynamic cursor object
    read this exercise and see how to create a dynamic cursor with just a few basic steps and of course use action script in flash 8.
  • Photoshop CS: Christmas cards for relativesPhoto of Photoshop CS: Christmas cards for relatives
    christmas season is near, you have prepared the gifts to give to relatives? each gift is a meaningful gift and do not forget to include a postcard and good wishes.
  • Photoshop CS: Creativity with new year cardsPhoto of Photoshop CS: Creativity with new year cards
    if you are a marksman in photoshop, it is not difficult to design yourself a postcard to celebrate your new year and send it to your relatives. what about those who don't know or don't know much about photoshop? will be a problem here. new year, who
  • Macromedia Flash - Move objectsPhoto of Macromedia Flash - Move objects
    with this exercise, you will learn how to move any object with the cursor in flash 8 using the action script.