7 Replies Latest reply on Oct 25, 2006 6:54 PM by costin

    Coloring in flash ( coloring book type )

      Hi there.
      Im searching for a way to reuse a code that allow me to color diferent shapes (movieclips). I will whant to have only one function that receive the name of the target to be colored when is clicked and to be able to use diferent colors, not only one.

      Unfortuantely the code that I found have inside the color and the name of the target and canot be changed. I build a color pallete that send the hexa code to a variable and in this way I increase the variety of the colors that should be aply.

      Here is the original code ( I tihnk is taken from the help of flash )

      on (release) {
      colorball = new Color ( _root.movieclip_name )

      I was wondering how to use something like this :

      function coloring_this () {
      colorball = new Color ( clicked_part_to_be_colored )
      colorball.setRGB( clicked_value_in_coloring_pallete )

      I was thinking to use something like the function above and when I click on the pallete color that store the hexa value and then on the button target that need to be colored, his name to be sent to the function and aply to the clicked object sometihng like that :

      on (release){
      coloring_this(_name); // to send the name of the clicked movie clip to the function

      Separately I build a colored code that will send the hexa value ( 0x00FF00 ) to a variable for the function.

      I don't know if I was very clear in my explanation but I think a programmer will understand well.

      Thank you very much