4 Replies Latest reply on Jul 1, 2013 10:51 PM by Emraan.Khan

    Flash as1 & as2

    Emraan.Khan

      how to load  xml images in movie clip within defined area.

       

      i am not proper working by this code:-

       

      function callFullImage(myNumber) {

       

          myURL = myImages[myNumber].attributes.full_url;

          myTitle = myImages[myNumber].attributes.title;

          _root.createEmptyMovieClip("fullImage_mc",_root.getNextHighestDepth() );

          fullImage_mc._x = _root.full_x=40;

          fullImage_mc._y = _root.full_y=20;

         

          var fullClipLoader = new MovieClipLoader("fullImage_mc");

          var fullPreloader = new Object();

          fullClipLoader.addListener(fullPreloader);

       

          fullPreloader.onLoadStart = function(target) {

              target.createTextField("my_txt",fullImage_mc.getNextHighestDepth(),0, 0,200,20);

              target.my_txt.selectable = false;

          };

       

          fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {

              target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);

          };

       

          fullPreloader.onLoadComplete = function(target) {

              new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);

              target.my_txt.text = myTitle;

          };

       

          fullClipLoader.loadClip("full_images/"+myURL,fullImage_mc);

       

      }

        • 1. Re: Flash as1 & as2
          kglad Adobe Community Professional & MVP

          try:

           

          var fullClipLoader:MovieClipLoader = new MovieClipLoader();

          var fullPreloader:Object = {};

          fullClipLoader.addListener(fullPreloader);

           

          function callFullImage(myNumber) {

              myURL = myImages[myNumber].attributes.full_url;

              myTitle = myImages[myNumber].attributes.title;

              _root.createEmptyMovieClip("fullImage_mc",_root.getNextHighestDepth() );

              fullImage_mc._x = _root.full_x=40;

              fullImage_mc._y = _root.full_y=20;

              fullClipLoader.loadClip("full_images/"+myURL,fullImage_mc,_root.fullImage_mc);

          }

           

           

              fullPreloader.onLoadStart = function(target) {

                  target.createTextField("my_txt",fullImage_mc.getNextHighestDepth(),0, 0,200,20);

                  target.my_txt.selectable = false;

              };

           

              fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {

                  target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);

              };

           

              fullPreloader.onLoadComplete = function(target) {

                  new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);

                  target.my_txt.text = myTitle;

              }

          • 2. Re: Flash as1 & as2
            Emraan.Khan Level 1

            thnkz i will try...

            • 3. Re: Flash as1 & as2
              kglad Adobe Community Professional & MVP

              you're welcome.

              • 4. Re: Flash as1 & as2
                Emraan.Khan Level 1

                thnkz