1 Reply Latest reply on Jul 8, 2007 9:00 AM by kglad

    bitmap and addChild

    Level 7
      i'm trying to add bitmap data to the stage, and while tesing i tried this
      (i'v placed on the stage a movie-clip named 'con')
      import flash.display.Bitmap;
      import flash.display.BitmapData;
      import flash.display.MovieClip;

      var mc:MovieClip = new MovieClip();
      var mc2:MovieClip = new MovieClip();

      var lineBmd:BitmapData = new BitmapData(1,100,false,0xFF0000);
      var lineBm:Bitmap = new Bitmap(lineBmd);
      var lineBm2:Bitmap = new Bitmap(lineBmd);


      mc2.x = 50;
      when i publish this code what i obviously see is 2 red lines on the stage.
      however, if to 'mc2' i add the 'lineBm' bitmap (instead of 'lineBm2') i'll
      only see the second line, as if its not possible to use the same bitmap
      object on 2 different MC's.
      is it so??? and if so - in case i'm interested to create dozens of those
      lines on the stage, do i have to create dozens of bitmap objects?

      thanks in advance,