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

Please Help!! Coloring book..not work for me.

New Here ,
Nov 25, 2015 Nov 25, 2015

Me podrían ayudar con la accion script....se supone que el pincel absorbe el color y lo deja en los diferentes cortes que tiene la figura...Can you help me with the script action .... it is assumed that the brush absorbs the color and leave it in different cuts that have figure ...

ejm1.jpgejm.jpg

import flash.geom.ColorTransform; import flash.events.MouseEvent; var brushColor:ColorTransform=new ColorTransform(); brushColor.color=0xffffff; brush.tip.transform.colorTransform=brushColor; verde.addEventListener(MouseEvent.CLICK,onclick); amarillo.addEventListener(MouseEvent.CLICK,onclick); naranja.addEventListener(MouseEvent.CLICK,onclick); rojo.addEventListener(MouseEvent.CLICK,onclick); calipso.addEventListener(MouseEvent.CLICK,onclick); azul.addEventListener(MouseEvent.CLICK,onclick); lila.addEventListener(MouseEvent.CLICK,onclick); rosa.addEventListener(MouseEvent.CLICK,onclick); function onclick(event:MouseEvent){ if(event.target == verde) {brushColor.color=0x55D94B} else if(event.target ==amarillo) {brushColor.color=0xFCF74E} else if(event.target ==naranja) {brushColor.color=0xFAA61C} else if(event.target ==rojo) {brushColor.color=0xFC351F} else if(event.target ==calipso) {brushColor.color=0x36DDC6} else if(event.target ==azul) {brushColor.color=0x283CFA} else if(event.target ==lila) {brushColor.color=0xB33DE5} else {brushColor.color=0xFC5ADA} brush.tip.transform.colorTransform=brushColor; } Igel.addEventListener(MouseEvent.CLICK, colorChange); function colorChange(event:MouseEvent) { igel.transform.colorTransform=brushColor; } Mouse.hide(); stage.addEventListener(MouseEvent.MOUSE_MOVE,follow); function follow(evt:MouseEvent){ brush.x = mouseX; brush.y = mouseY; }


Muchas gracias, 🙂 Thank you

TOPICS
ActionScript
401
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
New Here ,
Nov 25, 2015 Nov 25, 2015
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
Community Expert ,
Nov 26, 2015 Nov 26, 2015
LATEST

most likely you're having a problem because the mouse is not clicking your colors.  you're clicking the brush.tip.

ie, comment-out your Mouse.hide() and see what you're doing.

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