13 Replies Latest reply on Aug 4, 2009 8:53 AM by kglad

    focusrect problem for dynamic movieclip

    kkc_mca

      Hi all,

       

      I am not able to focus the movie clip event the focusrect set to true

       

      Here I am placing the code below

       

      can point out where i went wrong

       

      thanks in advance

       

       

      /////////////////////////////////////////////////////////

                         Code

      ////////////////////////////////////////////////////////

       

      function createGallery():Void

      {

           for(var i:Number=0; i<NO_OF_IMAGES;i++)

          {

                 var pImage:MovieClip =  tLevel.createEmptyMovieClip("pImage"+i,tLevel.getNextHighestDepth());

                 pImage.onLoad = function ()

                  {

                           pImage._focusrect=true;

                 }

                  pImage.onRelease = function ()

                 {

                           trace("pImage onRelease called");

                }

                 imgCollection.push(pImage)// inserting the reference into an array for further access

            } // end of for loop

      _loadImageRef=setInterval(loadImages, 500);

      }

       

      function loadImages():Void {

           if(imagesLoaded< NO_OF_IMAGES)

           {

               imgCollection[imagesLoaded].loadMovie("image URL")// loading the image into the movie clip

               imagesLoaded++;

          }

           else

           {

               clearInterval(_loadImageRef);

          }

      }