1 Reply Latest reply on Jul 14, 2006 6:58 AM by donaldhines

    URGENT :one custom bitmap  castmember made out of two ????

    Level 7
      Hi

      I need join 2 bitmap castmember in one in followin way



      I have a background image and image of a number (with alpha channel -
      transparent outside of the number)




      I need to place the number in the middle of the background image and create
      a new castmember, that looks exactly, like number castmember is laying over
      the background castmember



      I tryed to do this with following code



      on CreateNewTite

      bgImage = "bg1"

      numImage = "numbers\9"

      imageObject = image(20, 20, 32, 1)

      imageObject.copyPixels(member(bgImage).image, member(bgImage).rect,
      member(bgImage).rect)

      imageObject.copyPixels(member(numImage).image,
      rect(5,5,member(numImage).width,member(numImage).height),
      member(numImage).rect,[#ink:36])

      newmember = new(#bitmap, member 10 of castLib 1)

      newmember.image = imageObject

      end




      but number on created bitmap is copied along with its alpha channel, it
      means a part of background is overwritten with transparent pixels from
      number image



      How do I correct this problem, what was wrong?

      How can I copy just not transparent pixals from number image and place them
      onto background image?



      Any help will be appreciated

      LM