ActionScript 3.0 Lesson 18: How to Create a Commission Calculator

Sun, Aug 23, 2009

ActionScript


Enter the values below and click calculate

This movie requires Flash Player 9


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!

//Comission Calculator
//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!!

Related Articles:

, , , , , , , , , , , , , , , ,

3 Responses to “ActionScript 3.0 Lesson 18: How to Create a Commission Calculator”


Trackbacks/Pingbacks

  1. This Site says:

    nice site…

    click now…

  2. nice site…

    check this link right here…

  3. Read This says:

    nice site…

    click…

Leave a Reply

You must be logged in to post a comment.

My name is Avraham Saltoun, and I live in Jerusalem, Middle East. I am currently on my mid  40's and I am a computer programming technician. Here you will find over one hundred quality video tutorials on Actionscript, and yes, I give online support for aspiring programmers, and pros as well, sharing screen on skype and delivering source code by email, click the button for live flash actionscript support now!

 
oDesk Certified Action Script Programmer
oDesk Certified Adobe Flash CS3 Designer
oDesk Certified Adobe Photoshop 6.0 Designer
Skype Me™!

$7.49 .Com! Score Savings Cartoon Smart Tutorials


839
Unique Visitors
Previous 30 Days
Powered By Google Analytics