preloading images 2004-03-17 - By Andreas Weber
Back > Therefore is it possible to load the images into the main timeline and then when needed load them into my 'playerImageHolder' mc? If so how can I do this?
Nope, not possible. You could put all the images into the library and then use playerImageHolder.attachMovie(...); But then you are not loading them dynamcially anymore.
Here's some code to monitor the download:
holder_mc = this.createEmptyMovieClip('holder',1); holder_mc.loadMovie("BlueHills.jpg");
monitor_mc = this.createEmptyMovieClip('monitor',2);
holder = holder_mc;
monitor_mc.onEnterFrame = function(){ var loaded = holder.getBytesLoaded(); var total = holder.getBytesTotal(); if(total > 15){ trace(Math.round((loaded/total)*100) + '% loaded'); if(loaded >= total){ trace('completely loaded'); delete this.onEnterFrame; } } }
HTH -- ---- ------ Andreas Weber motiondraw.com
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected) For additional commands, e-mail: flashnewbie-help@(protected)
|
|