Latest News and Developments
1. Web Safe Colors
A web safe colour is one that will display correctly on any screen, irrespective of the operating system or graphics card. There are only 216 web safe colours. You can use other colours, but you cannot be sure they will display correctly.
A general rule of thumb is: if possible use a web safe colours. If isn”t possible don”t worry. As time goes by the graphics cards (which controls the screen colours) are getting better and better and using web safe colours is not as critical as it once was.
In Flash, when you select an object on the stage, you can either Hexadecimal or the RGB colour code. In ActionScript you use the hexadecimal number not the RGB number.
Note: in ActionScript you can also use a Bitwise colour system which converts numbers to Binary, but this is beyond the scope of this tutorial.
The visible colour is the same irrespective of which you use: RGB, Hexadecimal or Bitwise.
Courtesy of WebWasp.co.uk Tutorials
Ever wanted to know how to make a digital clock. This tutorial shows you how easy it is to create a digital clock in Flash. Have a look at the time below:
Example:Download the Flash file Int 029a
A Digital Clock made in Flash MX 2004.
Note: This clock is taking the time off your local computer and displaying it on the web page through Flash. This is not perfect as I don”t know if the local users clock is correct. There are other ways of finding out the time and displaying the time but they are so much more complicated and not necessarily more accurate. So I have gone for a very simple method of creating a digital clock. It works and is very easy to create.
Cross Ref: If you want to make an Clock with a face see the: Analogue Clock Tutorial
An analogue clock.
Courtesy of WebWasp.co.uk Tutorials
Courtesy of WebWasp.co.uk Tutorials
Step One: Setting Up the Flash Document
Courtesy of WebWasp.co.uk Tutorials
Courtesy of WebWasp.co.uk Tutorials
Step Two: Creating the Clock Movie Clip - The Dynamic Text Box
Note: In the Property Inspector you can see the Text Box”s width and height. Select the Text Box with the Text Tool and drag the small square in the corner: Do not do it numerically or with the Transform tool as this will stretch the font size.
To re-size a Text Box select it with the Text tool and drag the small square.
The small square may be in either the top or bottom left corner:
The small square may even be a circle!


![]()

Mine are like this:


The Character Option Box complete.
Courtesy of WebWasp.co.uk Tutorials
Courtesy of WebWasp.co.uk Tutorials
Step Three: Creating the Clock Movie Clip - Actions
You should still be in the Time MC. If you are not open the Library and find the symbol and select Edit from the drop down menu.


// Gets the date and time info from the local computers clock
myDate = new Date();
//Gets the hours and adds a zero if the number is a single digit like this: 01
var hours = myDate.getHours()>9 ‘ myDate.getHours() : “0″+myDate.getHours();
//Gets the minutes and adds a zero if the number is a single digit like this: 01
var minutes = myDate.getMinutes()>9 ‘ myDate.getMinutes() : “0″+myDate.getMinutes();
//Gets the seconds and adds a zero if the number is a single digit like this: 01
var seconds = myDate.getSeconds()>9 ‘ myDate.getSeconds() : “0″+myDate.getSeconds();
// Displays the time like this: 00 . 01 : 01
myTime = (hours + ” . “ + minutes + ” : “ + seconds);
gotoAndPlay(1);
Note: Your Timeline should look like this:
Timeline.
Note: If you cannot see the Scene 1 Tab open the Edit bar: Window > Toolbars > Edit bar
Courtesy of WebWasp.co.uk Tutorials
Courtesy of WebWasp.co.uk Tutorials
Step Four: The Main Stage
Your Movie Clip should now be in the centre of the Main Stage:
Your clock should look like this:
The clock works fine but has no border.
Your clock is now finished. You may wish to add a border:
Clock with a border.
Note: The border is simply a rectangle with the centre deleted.
To get the rounded corner look use the Rounded Corner option: ![]()
This option button is visible once you select the Rectangle tool: ![]()
That”s all there is to it!
My Flash Resource - A continually growing collection of tutorials, thoughts and interests of a Flash Animator and/or Developer.