Help - Search - Members - Calendar
Full Version: Simple calculator
Pixel2Life Forum > Member Tutorials and Requests > Forum Tutorial Archives > Miscellaneous Tutorials
fedekiller
1. make a new document
2. make 2 "text input" and one "dinamic text"
3. instancenames:
a) first_txt
shades.gif second_txt
c) result
4. make 4 buttons ( +, -, *, / )
5. put this code in the "+" button:
QUOTE
on (release) {
_root.result.text = (_root.first_txt.text)-(_root.second_txt.text)*-1
}

red=this is important
In this case the .text are ver important cuz we want to know the content, no the box.

put this code in the "-" button:
QUOTE
on (release) {
_root.result.text = (_root.first_txt.text)-(_root.second_txt.text);
}


this in the "/" button:
QUOTE
on (release) {
_root.result.text = (_root.first_txt.text)/(_root.second_txt.text);
}


and this in the "*" button:
QUOTE
on (release) {
_root.result.text = (_root.first_txt.text)*(_root.second_txt.text);
}


and you finish ^^

example download link: here
Donna
Just a suggestion to add a final swf effect to this and also some images and more explanation into the tutorial.

Example Of what I mean:

http://www.flashkit.com/tutorials/Actionsc...o-816/index.php
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.