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
Step 4
Select the circle you just drawn and press F8 to convert the circle into a Movie Clip .
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
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
Press Ctrl + Enter to test the product
It is done! (Download finished products)
You should read it
- Formula to calculate area - circumference of a circle
- The most beautiful female layer hairstyles 2020
- Instructions for enabling 2-layer authentication for iCloud on Apple devices
- How to circle answers in Word, Excel, PowerPoint
- The mysterious 'circle' in the deep sea was finally decoded but the answer made the scientists worry
- How to Create a Sin and Cos Circle in Excel
- How to crop an image into a circle in Photoshop
- What is Application Layer Attack?
May be interested
- Macromedia Flash - Create menu effectsthis lesson will show you how to create a flash menu with the effect when moving the mouse. to create this post, you will have to use the action script code.
- Macromedia Flash - Vivid photo effectsthrough this tutorial, you will learn how to create a vivid photo effect with some basic flash tips. this article does not need to use action script code.
- Macromedia Flash - Create flash menu with soundin this flash tutorial, we will guide you to create a dynamic flash menu with sound. you can use this menu on any website.
- Macromedia Flash - Create analog clock in Flashthis tutorial will show you how to create a real working clock using flash effects.
- Macromedia Flash - Self-designed animated menuthis tutorial is quite complicated but we will try to explain it in the easiest way. make sure you follow the instructions step by step.
- Macromedia Flash - Text presentation in Flashin this article, we will learn how to create a text presentation in flash using some special flash tips.
- Macromedia Flash - Effects of changing position of textthis tutorial will show you how to create a constantly changing text effect in flash using the action script.
- Macromedia Flash - Create a snow effectthrough this tutorial, you will create a snow effect simply and quickly. you can use this effect on headers, banners on holidays or christmas cards ...
- Macromedia Flash - Running text effectwith just a few simple steps you can completely create a seemingly complicated effect. you can apply this lesson as a text effect for some advertising banners or slideshows.
- Macromedia Flash - Create premium banners with flashwith this article, you will learn how to create fuzzy flash banners by using masks without using action script code.