PDA

Просмотр полной версии : Уникальный слушатель


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
Спасибо!