Bookmark now!

AddThis Social Bookmark Button

Most popular

The most viewed tutorials in April:

  1. Best dynamic image gallery
  2. Loading external JPG images
  3. Ultimate preloader

Advertisements

Amazing video loops, stunning photo galleries, video and audio players ready to go! Smooth, amazing flipNavigation system!

Sleek green sphere mathematical preloader — part 2

4. Creating the specular shine on the green preloader sphere

4.1. Lock the current layer and make a new one above it and call it specular shine.

Adding a layer for the specular shine of the sphere preloader.

4.2. Select the Oval tool (O) and draw a 7 by 7 pixel white circle without an outline. There is no radial or linear gradient fill this time — the circle should be colored with plain white, completely opaque. Place it in the upper part of the sphere, a little bit to the right.

The specular shine has been added to the green sphere preloader.

4.3. Select the small white circle that you just drew and convert it to a movie clip symbol by selecting Modify > Convert to symbol. Call it specular shine and click OK.

4.4. You will add two filter effects to the specular shine movie clip now. Click the filters tab in Property inspector while the movie clip is selected. First, select the Blur filter and adjust the options for this filter like this:

  1. Blur X and Y: 2
  2. Quality: High

Blur filter options for the specular shine.

After that, add the Glow filter and set its options like this:

  1. Blur X and Y: 1
  2. Strength: 160%
  3. Quality: Low
  4. Color: white

The Glow filter settings for the specular shine.

And here's the final look of your specular shine:

The specular shine on the sphere, with the Blur and Glow filter effects added.

Let me show you now how to create a nice ring around the sphere.

Top of page

5. How to make a cool ring around the sphere preloader

5.1. Make a new layer, call it outer ring and drag it down below all the existing layers, like the screenshot below shows you.

Adding the layer for the outer ring for sphere preloader.

5.2. Select the Oval tool (O) for the last time in this lesson and draw a 120x120 pixel circle with it. The circle should be borderless, filled with a plain flat color — use a dark green hue. For example, you may choose #266004 for the color.

Then, position the circle so that it is centered inside the green sphere preloader. Use the same techniques that you have in step 24, on the previous page. Here's how your sphere should look like now:

The sphere with a circle behind it looks like it had an outer ring added to it.

5.3. Select the circle that you just drew if it already isn't, and choose Modify > Convert to Symbol. Make a movie clip symbol out of it. Call it outer ring and click OK.

5.4. Click the Filters tab for this new movie clip and select the Bevel filter. Here is how the settings for the bevel effect should be adjusted:

  1. Blur X and Y: 10
  2. Strength: 260%
  3. Quality: Low
  4. Shadow: black
  5. Highlight: a light green hue (#7AD43D, for example)
  6. Angle: 45
  7. Distance: -6
  8. Leave the Knockout option unchecked
  9. Set the Type to inner

The Bevel filter settings in Adobe Flash.

Ta-daa! Here's the final result — your cool sphere!

The green sphere for the preloader is ready.

There is the final element that you are going to create now: a dynamic text field.

Top of page

6. How to make a dynamic text field with a pixel font

6.1. Lock the outer ring layer and create a new layer above all the existing ones and call it text.

Adding a layer for the dynamic text for the preloader.

6.2. Select the Text tool (T). Jump over to the Property inspector and set the options for your dynamic text like this:

  1. Select Dynamic text from the menu situated on the upper left part of the panel.
  2. Select a nice pixel font.
  3. Usually, the proper size for a pixel font in Flash is 8 (in most of the cases, anyway).
  4. Select white as the color for your mathematical preloader.
  5. Select central alignment. This is a wise choice, because the preloader will be placed in the middle of the sphere, so any other option would make it look bad.
  6. Select Bitmap text as rendering type. This is done for bitmap and pixel fonts.
  7. The "Selectable" option should stay turned off.
  8. Make your dynamic text field a single-line text field.

Adjusting the options for the dynamic text field in Adobe Flash.

6.3. Click and drag on the stage (somewhere above the sphere) to create a text field. Release your mouse button and the text field will appear with the blinking cursor inside it. Press Esc on your keyboard to exit the editing mode, and a light-blue border will appear around the field.

Creating a dynamic text field in Adobe Flash.

TIP To position the text field in the middle of the sphere, press the arrow keys on your keyboard. Pressing them will move the field by 1 pixel at a time. Pressing any of the arrow keys while holding down Shift will move the field by 10 pixels at a time.

6.4. Go back to Property inspector and assign an Instance name to your dynamic text field, so that you can issue commands to it via ActionScript later: call it myText_txt.

An instance name was assigned to the dynamic text field.

6.5. Still here, go over to the right side of the panel and click the Embed button. Select the Numerals option and click OK.

Embedding the numerical characters in the dynamic text field.

This will make possible for everyone to see your pixel font, regardless if they have it installed on their machine or not and regardless of their operating system.

6.6. You should still be in the Property inspector. Click the Filters tab (yes, these cool effects can be applied to text fields too). Select the Glow filter and adjust its parameters like this:

  1. Blur X and Y: 8
  2. Strength: 410%
  3. Quality: High
  4. Color: #276403 (a nice dark green, which will make a perfect background for the white text inside the green sphere)
  5. The Knockout and Inner glow options must be left unchecked.

The Glow filter settings in Flash.

6.7. Lock the text layer and click on the Scene 1 link above the layers to return to the main scene.

Returning to the main scene in Adobe Flash.

You will add an empty movie clip and some ActionScript code to your Flash document now so that the preloader can actually work!

Top of page

7. How to make an empty placeholder movie clip symbol and add the ActionScript code for the green sphere preloader

7.1. Select your green sphere preloader movie clip on stage and go over to Property inspector. Assign it the Instance name preloader_mc.

The Instance name of a movie clip instance in Flash.

7.2. Lock the current layer on the main scene and call it preloader. Make a new layer above it and call it placeholder.

Adding a second layer on the main scene in Flash.

7.3. Select Insert > New Symbol. In the Create New Symbol dialog window that appears, select Movie clip as type, call it empty movie clip and click OK.

Making a new movie clip symbol in Flash.

7.4. You will immediately begin working inside the timeline of the new movie clip symbol, which can be seen if you look above the timeline.

The current working space and timeline as displayed on Adobe Flash interface.

Click the Scene 1 link to return to the main scene. Since this is an empty placeholder movie clip into which the external content will be loaded, you don't want to create anything in here.

Leaving the timeline of the empty movie clip symbol.

7.5. Open the Library by selecting Window > Library.

7.6. Click and drag an instance of the empty movie clip symbol out of the Library and onto the scene — in the placeholder layer.

This empty movie clip will be represented by its registration point, a small circle with a plus sign inside it. It is usually placed in the top left corner of the scene, so that the external content (a SWF, JPG, etc) is loaded with its initial position set here.

The empty movie clip positioned on the scene in Flash.

7.7. Give this empty movie clip an Instance name: call it placeholder_mc.

The Instance name of the empty movie clip symbol in Adobe Flash.

7.8. Lock the placeholder layer. Make a new layer above it and call it actions. Select its first frame.

Selecting the first keyframe of the ActionScript layer in Adobe Flash.

7.9. Open the Actions panel by selecting Window > Actions. Insert this code inside it:

var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(this);
function onLoadInit(placeholder_mc:MovieClip) {
preloader_mc._visible = false;
}
function onLoadProgress(placeholder_mc:MovieClip, loaded:Number, total:Number) {
var percent:Number = Math.floor(loaded/total*100);
preloader_mc.myText_txt.text = percent;
}
loader.loadClip("mywebsite.swf", placeholder_mc);

NOTE: This ActionScript code is made so that it loads a SWF movie called mywebsite.swf, that should be placed inside the same folder where the preloader is.

To test it, find any SWF movie you may have lying around your hard disk, copy it inside the folder where your preloader file from this lesson is and rename it to mywebsite.swf.

Press Ctrl+Enter inside Flash to test your preloader and you should see it load the external SWF file. Press Ctrl+Enter again to see a download simulation. Your preloader should work.

Now, I won't explain what goes on with this code here, because I explained it in minute detail in my lesson on making a complete preloading menu system in Flash.

Guess what? The green sphere preloader has a file size of 1 KB only!!! Ain't Flash an amazing piece of software?

I hope that you have enjoyed learning from this lesson. If you wish, you can see more preloader lessons in my preloader tutorials section. Have fun while learning! See you in my next tutorial.

Download the zipped source FLA file for the sleek green sphere preloader.

Got any comments or questions? Want to add something but don't know how? Discuss it in the forum!