Posts

Showing posts from March, 2008

Control sound volume.

Image
In this tutorial we will learn how to control the volume of the sound that we play in Flash.Adding sound to your site can improve the user experience but not offering a way to control the sound could irritate the user and make him go away forever, and we don’t want that. We will build a slider that will help us to increase or decrease the sound volume and will learn how to load mp3s that we import in the Flash Library. 1. Create a new file by going to File > New select Flash file (ActionScript 3.0) and click Ok. 2. On the stage draw a rectangle width: 100 px, height: 23 px, color: black and stroke: none. With the rectangle selected press F8 and convert it to a MovieClip. Set its name to track_mc and registration point to top left and click Ok. In the Property Inspector set its instance name to track_mc. 3. Double click on the track_mc MovieClip to edit it. Lock the current layer. Insert a new one, double click on its name and rename it slider. Draw a rectangle width: 10, height: ...

Random stars with blur filter applied(ActionScript 3.0).

Image
In today tutorial we will make a very cool effect. We will apply some random values to some properties of a MovieClip that has a little animation and a blur filter applied to it, this approach will produce a nice organic effect. You must read it the result is fun and cool. 1. Create a new file by going to File > New select Flash file (ActionScript 3.0) and click Ok. 2. Go to Insert > New Symbol, name the symbol particle and click Ok. 3. In the Tools panel select the PolyStar tool. In the Property Inspector click on the Options button, expand the combo box and select star and click Ok. In the same Property Inspector set the stroke to none and pick a yellow color. Put your cursor on the center of the stage (the center is mark by the addition sign) click and drag to draw a star about 40 by 40.Double click on the layer name and name it particle. 4. Insert a new layer by going to Insert > Timeline > Layer. We will use this layer as a guide. Select the Rectangle tool and draw t...

Flash Video basics.

Hello everybody. In this tutorial we will learn how to work with video files in Flash. We will use only the Flash IDE no line of ActionScript code. This method is fast and allows you to display and control video files without having to know ActionScript. To get starting we need a video file, you can use your own file or if you don’t have one go to masternewmedia it has a good list of sites taht provides free public domain movies. The fallowing file formats can be used: asf, .avi, .dv, .mov, .mp4, .mpeg and .wmv. Pick a video file with a size less that 10 MB (this is not a condition, you can use a much larger file but will take a long time to convert it to a flv(Flash Video file)). 1. Create a new file by going to File > New select Flash file (ActionScript 3.0) and click Ok. 2. Save you file in a new folder. 3. Go to File > Import > Import Video this will open the Select Video screen . Click on the Browse button, browse to your hard drive and select the video file that you w...

Preloading SWF, JPG, PNG or GIF files with AS 3.0.

Image
Hi everybody. In a previous tutorial Advanced preloader we have learn how to make a preloader that keeps track of how much of our file has been loaded. In that tutorial we have used a jpg file that was embedded in our swf and keep track of its loading progress. That approach is good when working with embedded files but what if we want to be informed of the loading progress of the external file that we load? This is what we will learn today.We will learn how to load external files (swf, png, jpeg and gif) and we will build a cool preloader to keep track of the loading process. Let’s go to work. 1. Create a new file by going to File > New select Flash file (ActionScript 3.0) and click Ok. 2. Insert two new layers by going to Insert > Timeline > Layer. 3. Double click on the top layer and name it actions , name the second one mask and the third logo . 4. Lock the actions layer and the mask layer and select the logo layer. Select the Text tool, in the Property Inspector set t...

Draw lines in Flash CS3 using code.

Image
In this tutorial we will draw using ActionScript code. It’s a simple and fun tutorial. We will use our mouse to draw lines of different thickness and random color. You can test your drawing skills if doesn’t look good from the first time clear and start again. Let’s draw. 1. Create a new file by going to File > New select Flash file (ActionScript 3.0) and click Ok. 2. Insert a new layer by going to Insert > Timeline > Layer. 3. Double click on the top layer and name it actions, name the second one button.Lock actions layer. 4. From Tools panel pick the Rectangle tool and on the stage draw a rectangle. Select the rectangle hit F8.Set its name to clear_btn, the type to button and click Ok. 5. With the button selected in the Property Inspector set its instance name to clear_btn. 6. On the actions layer select frame 1 and hit F9 to open the ActionScript panel. Copy the next code and paste it. stage.addEventListener(MouseEvent.MOUSE_DOWN,handleMouseDown); stage.addEventListener...