Action to Object in Array AS3 – Tutorial

    make a movie clip,  drag it from libray. We need at least 4  copies of same movie clip.Now rename each as mc_0, mc_1,mc_2, mc_3. in action script panel past this code. var mc:Array=new Array (mc_0, mc_1,mc_2, mc_3); trace (mc.length); ========================================== //Output 4 ========================================== Now how we have 4 movie clips , how are … More Action to Object in Array AS3 – Tutorial

Rate this:

Array in AS3 (Basic)

array is like a file or like a book in which we can store information about names or numbers. var numbers:Array=new Array (1,2,3,4,5,6,7,8,9,0); var god_names:Array=new Array (krishna, shiva, buddha, christ); var countries:Array=new Array (india, nepal, china, thailand); trace (numbers); trace (god_names); trace (countries); Output// 1,2,3,4,5,6,7,8,9,0. krishna, shiva, buddha, christ. india, nepal, china, thailand. ============================================= trace … More Array in AS3 (Basic)

Rate this:

How to create simple Calculator in Flash ( Actionscript 3 )

Create buttons and text fields as created above. give them instance name and change its type. Write down this code in action panel . And run it ( Crlt  + Enter ).  as mentioned in picture. Explanation of code: num1.restrict=”0-9″ num2.restrict=”0-9″ // so that user can only type numbers in text box. cal.addEventListener(MouseEvent.CLICK, result_); // … More How to create simple Calculator in Flash ( Actionscript 3 )

Rate this:

Get Biggest Number in Array ( Actionscript 3 )

//get biggest number………… // define array and number var avg:Array=new Array(1,5,8,9, 43,56,88,54,67,90,66,45); // define where big number holder var bigno:uint=0; // define result var res:uint; // for loop repeat action for(var i:uint=0; i<avg.length; i++){ // condition if 0 is less than avg[i], then bigno  equal to avg[i] if(  bigno<avg[i] ){ bigno=avg[i] } } //finally trace … More Get Biggest Number in Array ( Actionscript 3 )

Rate this:

Average in Actionscript 3

// define array var avg:Array=new Array(13,24,35,46,21,34,78,96,56,78,90,65,43); // define bigno to hold biggest number var bigno:uint=0; // define a variable to hold sum of array var res:uint; //for loop to repeat actions and get sum of array. for(var i:uint=0; i<avg.length; i++){ //condition for bigno, if bigno is smaller than number in array. if(bigno<avg[i] || bigno>0){ // … More Average in Actionscript 3

Rate this: