LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-08-2002, 03:58 PM
spam spam is offline
Registered User
 
Join Date: Feb 2002
Posts: 12
Rep Power: 0
spam is on a distinguished road
preload dynamic images and percentages

hi

i'm trying to load a set of dynamic images, which is fine but i'm trying to work out the total size of all the files for a preloader, is there anyway i can get the whole size of the files loading or do i have to do each one individually, i've done it to load them individually, but i'm trying to do it in one go

here's the code i've been trying
Code:
onClipEvent(load){
	imageArray = new Array("001", "002", "003", "004");
	path2Images = "folio_images/folio/ccp/";
	
	this.createEmptyMovieClip("holder",1);
	
	for(n=0;n<imageArray.length;n++){
		this.holder.createEmptyMovieClip("holder" + n, n);
		imagesLoaded = path2Images + imageArray[n] +".jpg";
	
		this.holder["holder" + n].loadMovie(imagesLoaded);
		this.holder["holder" + n]._x = n*40;
		this.holder["holder" + n]._y = n*40;
	}
	
		_root.attachMovie( "loadingAnim", "loader", 2000);
		_root.loader._x = 100;
		_root.loader._y = 100;
}

onClipEvent(enterFrame){
    
	for(i=0;i<imageArray.length;i++){
		
		amountLoaded += this.holder["holder" + i].getBytesLoaded();
		totalLoaded += this.holder["holder" + i].getBytesTotal();
	}

	_root.percent=int((amountLoaded/totalLoaded)*100);
	
   if(_root.percent == 100){
		_root.loader.removeMovieClip();
	}
}
any help greatly appreciated

regards
andy
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump




All times are GMT. The time now is 06:42 PM.