Enter the values below and click calculate
THE COMMISSION CALCULATOR IS NOW A HIT GADGET PROVIDING ADVERTISEMENT REVENUE CLICK HERE TO SEE!
In this 7 minutes Flash tutorial in High Definition (HD) resolution, Avraham draws a calculator on stage and adds functionality. Great examples on different text types in Flash, Static, Input and Dynamic.
DOWNLOAD THE SOURCE FLA FILE
DOWNLOAD THIS TUTORIAL TO YOUR HARD DRIVE
HERE IS THE SOURCE CODE!
//by AVRAHAM SALTOUN
// solutions at say-web dot com
// FREE TO USE AND DISTRIBUTE
myButton_btn.addEventListener(MouseEvent.CLICK, FindComission);
// This will set the compiler
// waiting for a mouse click
// on our button
function FindComission (event:MouseEvent):void
{
// Let’s find out what is on our screen!
var myAmount:Number = Number(Amount_txt.text);
// This will find out what is on the Amount Box
// and convert it to a value
var myRate:Number= Number(Rate_txt.text)/100;
// Since we are looking for a percentage
// we are dividing the value by 100
var myComission:Number = myAmount* myRate;
// Now let’s put the result
// in the Dynamic Text Box
// The Value has to become a string
Total_txt.text = String(myComission);
//Thanks for Watching!!



































Sun, Aug 23, 2009
ActionScript