![]() ![]() Give the button an instance name of guess_btn. We can also do this with actionscript, but we will save that for a later tutorial. We will be using this to change the name on the button, as it says label by default. We will now use the components inspector, this can be found in Windows>Component Inspector. Now position the button to line up with ht e two text fields on the stage. Now we will add the button, go to components panel and drag a button onto the stage under the input text box you just made. Basically, you will add the instancename. The instance name is how we can communicate with actionscript (which will get to in a minute). Make sure that this text filed, is Input text, and has an instance name of “guess_txt” This is where the user will type in the number that they guess. Just move the cursor on the stage and drag an area, which will look like a box. Now using the text tool create a text field on the stage under the main heading that you just created. ![]() This test is static text it is just a title, and therefore it does not perform any actions. The font, and color makes no difference, it really just depend what you like. I am using a font called Handwriting – Dakota (In the source files) And I am using a black fill. Now make sure you are on the content layer, using the text tool, pick an area on the stage (I picked the upper left section, but maybe you want the application to be centered) and type “Guess a Number between 1 and 10”. ![]() Next we will work on the design features of the guessing game (make sure you are on the content layer): Next convert this background graphic to a movie clip (modify>convert to symbol, or right click and chose convert to simple), and call it background. Next pick a gradient fill of blue (or any color that you want). Next using the rounded rectangle tool and create a rectangle centered on the stage with 4 for the rounding value. Make the background for the flash movie #333333 this will turn the stage to a grey, which we will be using for the border. Let us first make the background (make sure you are on the background layer), you will notice that I am currently on this layer: Next create 3 layers called background, content, and actions. Open Flash CS 4, and pick an ActionScript 3.0 file.Ĭreate the document size of 550 px (width) 210px (height). You can preview the final result of this tutorial by clicking the link below and download the source of this tutorial at the end of this tutorial: This tutorial can be applied using any version of Flash that supports CS4, CS5 and later versions. This tutorial will explain how to create a guess game in Flash CS 4 with ActionScript 3.0. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |