My personal Notes on FLASH ACTIONSCRIPTS

1. onRelease, onRollover,function()


mc1.onRelease=function(){
var x=5;trace (x);}

mc1.onRollover=function(){
var y=6;trace (y);} 

on (release){x + = 500; }//when you write inside the clip use on(release)
2.onEnterFrame, How to Move a Clip
onClipEvent(enterFrame)
{
        this._x += 1;}
Note:write this code inside the clip
3. How to decide the initial position of a clip
onClipEvent(load){this._x=200;}
4. Start fast but stop slowly
onClipEvent(load){
     stopPoint=500;}
 onClipEvent(enterFrame){

dist=stopPoint-_x; _x+=dist/5; }


what is _x? It is the x-coordinate of the current location of the clip.
5. _xscale,random()



onClipEvent (load) {
this._x = 50;this._y=200;}
onClipEvent (enterFrame) {
this._xscale = random(20);//_xscale is width 
this._yscale = random(30); //_yscale is height
this._alpha = random(20);this._x = random(40);
this._y = random(30);}
6. some common jobs
1.gotoAndStop(5);
2.gotoAndPlay(6);
3.stop();
4.setProperty(mc1,_x,100);
5.getProperty(mc1,_x);
6.tellTarget("_root/mc1"){gotoAndPlay(5);}
7.getURL("abc.htm");
8.on(KeyPress ""){trace("enter");}
8.on(KeyPress ""){trace("backspace");}

8.on(KeyPress ""){trace("delete");}
8.on(KeyPress "a"){trace("a");}


9.loadVriables();
9.loadVariablesNum();
10.loadMovie();
11.loadMovieNum();
12.y=substring("hello",1,3);
13. y=ord(x);//ascii of x
14. if(x ne "hello"){....}
15.on(release){...}
15.on(press){...}
15.on(click){...}//in mx
15.on(rollOver){...}
15.on(rollOut){...}
16.onclipEvent(load){....}
16.onclipEvent(unload){....}
16.onclipEvent(enterFrame){....}

















































Thank you spending your time here.
If possible you; can leave some comments or suggestions.
Thanks a lot once again.
Google Search
Disclaimer and Copy Right