Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Conversion of as2 code into as3

New Here ,
May 02, 2013 May 02, 2013

     _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)

     }

TOPICS
ActionScript
395
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 02, 2013 May 02, 2013
LATEST

In as3 we 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 is this helpfull..?

function upf(e:MouseEvent):void{

mc.stopDrag();

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines