工作的功能仅在特定的框架中显示

时间:2013-06-12 08:50:30

标签: actionscript-2

此功能在舞台上的所有画面中显示...我想在特定的画面中

 function callThumbs() {
     _root.createEmptyMovieClip("sliderBox", _root.getNextHighestDepth());
     sliderBox._x = _root.gallery_x = 30;
     sliderBox._y = _root.gallery_y = 30;
     sliderBox.addEventListener(MouseEvent.CLICK);
     var clipLoader = new MovieClipLoader();
     var preloader = new Object();
     clipLoader.addListener(preloader);
     for (i = 0; i < myImagesTotal; i++) {
         thumbURL = myImages[i].attributes.thumb_url;
         myThumb_mc = sliderBox.createEmptyMovieClip(i, sliderBox.getNextHighestDepth());
         myThumb_mc._x = _root.thumb_height * i;
         clipLoader.loadClip("thumbs/" + thumbURL, myThumb_mc);
         preloader.onLoadStart = function (target) {
             target.createTextField("my_txt", target.getNextHighestDepth(), 0, 0, 1, 1);
             target.my_txt.selectable = false;
         };
         preloader.onLoadProgress = function (target, loadedBytes, totalBytes) {
             target.my_txt.text = Math.floor((loadedBytes / totalBytes) * 100);
         };
         preloader.onLoadComplete = function (target) {
             new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
             target.my_txt.removeTextField();
             target.onRelease = function () {
                 callFullImage(this._name);
             };
             target.onRollOver = function () {
                 this._alpha = 100;
             };
             target.onRollOut = function () {
                 this._alpha = 100;
             };
         };
     }
 }

0 个答案:

没有答案