The first step is to create the actual interface. You can do this how you want, as long as you have the dynamic text boxes (more later). for now, to make things easy, just follow how I do it. (By the Way, this is my first ever flash tutorial, so please bear with any mistakes).
Ok, lets begin. open a new flash document, set the size to 550x250, and a frame rate of about 12fps(frames per second). set the background to white. See the image below:
Open your library window (windows/library) if its not already opened. Press the plus sign in the library. Set the behavior to movie clip, name will be interface. You should be taken to a new place, where the stage is fully white. This is where we create/edit out clip "interface". This will be out clock. Select the rectangle tool (stroke: transparent, fill: black). create a rectangle of any size on the stage. using the arrow tool, select the rectangle. with the property inspector open, set the width to 300, and height to 100. open the align window and centre it to the stage.
Select the text tool. In the text tool drop down menu, select dynamic text. Dynamic text boxes can hold user imputed data, changing data or anything else. These are used when the text displayed will not always be the same eg. date and time. Make the text colour a bright green, and make the text size 38. Create a text box to the left of the rectangle, covering about one third or the rectangle. In the box, type "HR". this is so we know out hours will always fit. In the var box, type timehours. This is pretty much the name of the data that will be displayed in the field. Resize the textbox to its minimal size, making sure the text fits on one line. Repeat this another two times, changing the middle text box to var timeminutes, and making the text say MN. In the right text box, set the variable name to timeseconds, and the text in the box should say SC. make the font size of the seconds box size. Create a final text box in the middle of the hour and minutes box. Change the type to static, and make a colen(:).
Finally, create small AM and PM static texts to go along the side. Align everything like i have done below:
|» Level Basic|
Rating: 6 Votes: 25
|I am very new to flash, and have just learnt about actionscripting. This is my first tutorial, so please bear with any mistakes.|
|Download the files used in this tutorial.|
|Download (8 kb)|
|More help? Search our boards for quick answers!|