19Apr/101
Creating A Flash Calculator
As stated in our introduction to Flash, you can create all kinds of things. The most prominent being Flash games, which are a good portion of the internet. By creating basic things in Flash, we can further our knowledge, and bring ourselves one step closer to that glorious first game. Creating a calculator is simple, and crude, but the skills used are imperative later in Flash.
Creating your calculator:
- Create the shape using the rectangle tool (R)
- Add your text with the Text Tool (T)
- Number One
- Number Two
- Total
- Draw input fields
- With the text tool still selected choose 'Input Text' from properties
- Turn Show Border Around Text on
- Change your font to Arial, size 18
- Draw your fields next to 'Number One' and 'Number Two'
- Add variables
- Select the 'Number One' input field
- In properties set the variable, under options to 'numberone'
- Do the same for the 'Number One' input field
- Draw the dynamic input field
- With the text tool selected, change it from Input Text to Dynamic Text
- Draw a dynamic field next to 'Total'
- Enter 'total' as the variable
Making it a Calculator:
- Create a plus button
- Insert>New Symbol
- Create a plus button
- Add it to the stage
- Create a subtract button
- Add functions to the buttons
- Select the plus button and open the Actions Editor (F9)
- "On (release) {
total = Number(numberone) + Number(numbertwo);
}" - Repeat for the subtract button, substitution - for +
- Test your calculator Ctrl+Enter

May 1st, 2010 - 04:29
dang nice info bro.
Like or Dislike:
0
0