Conversion of as2 code into as3


     _root.attachmovie("brush","brush",10)

     _root.brush.onenterframe=function()

     {

               mouse.hide()

               startdrag(this,true)

               new color (this.brushcolor).setrgb(_root.brushcolor)

 

     }

 

 

     //////

     onclipevent (load) {

          mycolor = 0x000000

          new color(this).setrgb(mycolor);

     }

 

 

     on (release) {

               _root.brushcolor= mycolor;

     }

 

 

     ////

     on(press)

     {

               new color(this).setrgb(_root.brushcolor)

     }

in as3 have

 

var mc:movieclip = new movieclip()

var tt:colortransform = new colortransform()

tt.color = somecolor;

 

 

 

mc.addeventlistener(event.enter_frame,runf);

mc.addeventlistener(mouseevent.down,downf);

 

mc.addeventlistener(mouseevent.up,upf);

 

function runf(e:event):void{

mc. startdrag();

}

 

function downf(e:mouseevent):void{

mc. startdrag();

tt.color = somecolor;

mc.transform = tt;

}

pls let me know helpfull..?

 

 

function upf(e:mouseevent):void{

mc.stopdrag();

}



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account