29 Replies Latest reply on Sep 27, 2011 7:17 AM by kglad

    how to bring movieclip to top layer...

    BG Designer Level 1

      I do Flash web banners, and use the following code to create a button for the link that publications set up on their end:

       

      var myBtn:MovieClip = this.createEmptyMovieClip("myBtn",this.getNextHighestDepth());

       

      var lineThickness:Number = 2;

      var lineColor:Number = 0x00A1E4;


      myBtn.lineStyle(lineThickness,lineColor);


      myBtn.beginFill(0x00A1E4, 0);

      myBtn.moveTo(lineThickness/2,lineThickness/2);

      myBtn.lineTo(Stage.width-(lineThickness/2),lineThickness/2);

      myBtn.lineTo(Stage.width-(lineThickness/2),Stage.height-(lineThickness/2));

      myBtn.lineTo(lineThickness/2,Stage.height-(lineThickness/2));

      myBtn.lineTo(lineThickness/2,lineThickness/2);

      myBtn.endFill();


      myBtn.onRelease = function()

      {

      getURL(_level0.clickTag, "_blank");

      }

       

      Here's my question - How do I add a replay button in front of this clickTag. How do I get the new button in front? I have a workaround using another button below it for the clicktag, but that's copping out, as this code is a much better way to do it (less room for error when I have to create resizes, etc.)

       

      Right now, I've created a button symbol with the graphic I want to use, so it's in the library and placed on the stage. It just doesn't work, since the above code is in front of it.

       

      Kglad, if you're available to come to the rescue, that would be awesome.