2 Replies Latest reply on Sep 3, 2010 10:29 PM by AttaBoy2

    need to be sure image doesn't load before mask is set

    AttaBoy2 Level 3

      When I run this from a server it often loade the first image before it can be positioned or the mask set.

      AS2 is not my forte.  I think it's just a matter of how do I make sure the slideshow is positioned and mask set before being displayed.

       

      here's the example:

       

      #include "drawRect.as"
      var container:MovieClip = createEmptyMovieClip("container", this.getNextHighestDepth());

       

      var mcLoader:MovieClipLoader = new MovieClipLoader();
      mcLoader.addListener(this);
      mcLoader.loadClip("slideshow30fps.swf", container);

       

      function onLoadInit(mc:MovieClip) {
          container._width = 700;
          container._height = 480;
          container._x = 250;
          container._y = 0;
         
          var r:MovieClip = createEmptyMovieClip("rectangles", 4);
              container.lineStyle (2, 0x6688AA);
          r.beginFill (0xAABBCC, 50);
           r._x = Math.abs (container._x);
           r._y = Math.abs (container._y);
          r.drawRect (2, 0, 595, 394, 0);
          r.endFill();

       

          container.setMask(r);
      }