Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 1.0/2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=93)
-   -   Уникальный слушатель (http://www.flasher.ru/forum/showthread.php?t=108190)

denmurz 17.02.2008 04:39

Уникальный слушатель
 
Помогите сделать подгружаемый контейнер (слушатель) уникальным посредством присвоения порядкового номера!
Код:

var clipLoader:MovieClipLoader = new MovieClipLoader();
clipLoader.addListener(this);
var container:MovieClip=_root.Img.createEmptyMovieClip('container', 0);
this.clipLoader.loadClip('img/img00.jpg', _root.Img.container);

Можно давать им номер относительно ранее подгруженны? например container001

INK• 17.02.2008 06:00

naprimer tak
Код:

this.loadProjects = function() {
        this.onLoadInit = function(mc) {
                with (mc) {
                        this.current_load_id++;
                        if (this.current_load_id<this.total_proj) {
                                this.loadProjects();
                        }
                        if (this.current_load_id == this.total_proj) {
                        }
                }
        };
        this.onLoadProgress = function(mc, bl, bt) {
                with (mc) {
                        subPercent = bl/bt;
                        var percent = (((this.current_load_id+subPercent)/this.total_proj)*100);
                        this.progress_mc.txt.text = "Loading..."+Math.round(percent)+" %  \n"+(this.current_load_id+1)+" | "+this.total_proj+" of total images";
                }
        };
        var imgLoader = new MovieClipLoader();
        imgLoader.addListener(this);
        imgLoader.loadClip(this.projects_img_arr[this.current_load_id],this.projects_mc_arr[this.current_load_id]);
};

predpolagaetsya chto sushchestvuyut massivi

this.projects_img_arr =["img1.jpg", "img2.jpg","img2.jpg"]
this.projects_mc_arr=[mc1, mc2,mc3]
this.current_load_id =0

I hope this will help.

iNils 17.02.2008 06:09

INK получает плюс за транслит

denmurz 17.02.2008 06:39

Спасибо!


Часовой пояс GMT +4, время: 18:02.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.