Tuesday, 21 August 2012

How to Create a Grid in as3

step 1 : Draw a rectangle
step 2 : Convert to symbol (press F8) or go to modify -> select convert to symbol
step 3 : Under the ActionScript Linkage and select the "Export for ActionScript"
step 4: Give the class name "mc"  and  press OK.
step 5: Delete the movieClip from the stage.

Action Script : Create a 5X5 grid

1. attach movieClip in stage.
    
    var myMc:mc = new mc();
    myMc.x = 100;
    myMc.y = 100;
    addChild(myMc);


www.actionscriptguru.in


Friday, 10 August 2012

depth in as3

step 1: Draw a rectangle
step 2: Convert to symbol (press F8) or go to modify -> select convert to symbol
www.actionscriptguru.in

Tuesday, 7 August 2012

Friday, 3 August 2012

How to delete onClipEvent enterFrame

delete enterFrame


onClipEvent(load){
var count = 0;
this.onEnterFrame = function(){
count++;
trace("count :"+count)
if(count == 20){
//this.onEnterFrame = null;
delete this.onEnterFrame;
}
}
}

URLRequest in AS3

Create a MovieClip and Give it an instance Name Ex: name is "mc_btn".


Actionscript 3.0 :



import flash.events.MouseEvent;

import flash.net.URLRequest;



var myURL:URLRequest = new URLRequest(" http://www.actionscriptguru.in/  ");


function btnClick(e:MouseEvent){
navigateToURL(myURL);
}
mc_btn.addEventListener(MouseEvent.CLICK,btnClick);

Thursday, 2 August 2012

onRelease in as3

Create a MovieClip and Give it an instance Name Ex: name is "mc_btn".

ActionScirpt 3.0:

// onRelease 

import flash.events.MouseEvent;

function btnClick(e:MouseEvent){
trace("Hi every one");
}
mc_btn.addEventListener(MouseEvent.CLICK,btnClick);

// onRollOver

function btnRollOver(e:MouseEvent){
trace("btnRollOver");
}
mc_btn.addEventListener(MouseEvent.ROLL_OVER,btnRollOver)

addChild in as3

step 1: Create a movieClip on your stage and delete the movieClip from the stage.
step 2: Open the Library (Ctrl+l) select movieclip,right click select "properties" and under the "ActionScript              Linkage" select the Export the ActionScript.
www.actionscriptguru.in