1. Launch Flash MX 2004
2. Create new Flash file. Click File > New…

3. Select Flash Document in a new window

4. Using "Rectangle Tool" draw a background for text field.

<
5. Select the first frame of the "Layer 1", right click and select "Copy Frames"

6. Then select next empty frame in the same layer, right click and select "Paste Fames"

7. 7. Repeat steps "5" and "6". You should get something like this:

8. Create new layer
9. Using "Text Tool" create in the new layer text field. The field should be exact size as the background shape. Select "Input Text".

10. 10. Type "int1" in the "Var:" field

11. Now repeat steps "5" and "6" but for the second layer.

12. Select text field in the second frame and change "Var:" field to "int2"

13. Select text field in the second frame and change "Var:" field to "total". Change "Input Text" to "Dynamic Text"

14. Now we need buttons to control the movie. Create new layer. With the "Rectangle Tool" draw a shape, right click and select "Convert to Symbol..."

15. Select "Button" in the popup window.

16. Double click the button. Right click on the "Hit" frame and select "Insert Frame"

17. Return to the first scene. Repeat steps "5" and "6" for third layer.
Select the first frame of the third layer and with the "Text Tool" add a label for first button "Enter First Value"

18. Add label for second frame: Enter Second Value and for the third frame: Click Here to Start
19. Now we need to add some Action script to make it work. Create new layer. Right click the second frame and select "Insert Blank Keyframe".

20. Repeat last step for third frame. Now select the first blank frame in the "Layer 4" Open "Action" panel and add following code:
var a = 0;
var b = 0;
var c = 0;
int1 = 0;
int2 = 0;
stop();

21. Select second frame and enter Action script:
stop();

22. Select third frame and add coding:
stop();
onEnterFrame
{
total = Number(a) + Number(c);
}

23. Select button in the first frame of the “Layer 3” and add action script:
on(press)
{
a = int1;
gotoAndPlay(2);
}

24. Select second button and add coding:
on(press)
{
c = int2;
gotoAndPlay(3);
}

25. Select button in the third frame and add some code:
on (press)
{
gotoAndPlay(1);
}

26. Now we need to add some Action script to make it work. Create new layer. Right click the second frame and select "Insert Blank Keyframe".
Click here to download source fla file.
About the Author: Oleg Lazarenko
Production manager of Metamorphosis Design
Flash Templates,Custom design, Website Templates,
Web design Articles and Tutorials.
You may reprint this tutorial for free as long as the content, About the Author sections and all links remain unchanged.