Просмотр полной версии : Уникальный слушатель
Помогите сделать подгружаемый контейнер (слушатель) уникальным посредством присвоения порядкового номера!
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
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.
INK получает плюс за транслит
Работает на vBulletin ® версия 3.7.3. Copyright ©2000-2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Copyright © 1999-2008 Flasher.ru. All rights reserved.