Thursday 24 May 2012

Action script for beginners


Hello, Today I am going to show you how add, subtract, multiply or divide via action script 3.0 or 2.0 in Flash. So, First Press 'F9" to open action script window. now writes these script.

function anythink():Number
{
var priceone:Number =3.00;
var pricetwo:Number =2.90;
return (priceone+pricetwo);
}
trace(anythink());

here you can change "anythink" to your name or anything you want. ex- function deepak():Number Than trace(deepak());
You can change priceone and pricetwo to anythink you want. when var hunters:Number =79; var com:Number =80
than return (hunters+com);
change '-' to Subtraction, '*' to multiply and '/' to division. I hope you enjoy this tutorials.

No comments:

Post a Comment