i’m using the xml gallery
so target_mc is equal to thumbnail_mc.t0, thumbnail_mc.t1, etc.
what i need is the highest bytesTotal of the target_mc when the onLoadProgress goes through each target_mc(thumbnail_mc.t0, thumbnail_mc.t1, etc.) to be a variable
so the percent var would look something like this
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#000000]var[/COLOR] percent:[COLOR=#0000FF]Number[/COLOR] = [COLOR=#0000FF]Math[/COLOR].[COLOR=#0000FF]floor[/COLOR]COLOR=#000000[/COLOR]
[/LEFT]
[/FONT]
and if statement would look like this
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#0000FF]if[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000FF]bytesLoaded[/COLOR] != highestBytesTotal[COLOR=#000000])[/COLOR]
[/LEFT]
[/FONT]
this is what i have now for onLoadProgress
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#808080]//onLoadProgress(mc in which content is being loaded, # of loaded bytes, # of total bytes) method [/COLOR]
[COLOR=#808080]//which sets the properties and find the getBytesLoaded() and getTotalBytes() of thumbs[/COLOR]
tlistener.[COLOR=#0000FF]onLoadProgress[/COLOR] = [COLOR=#000000]function[/COLOR][COLOR=#000000]([/COLOR]target_mc, [COLOR=#0000FF]bytesLoaded[/COLOR], [COLOR=#0000FF]bytesTotal[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
[COLOR=#808080]//create the percentage variable[/COLOR]
[COLOR=#000000]var[/COLOR] percent:[COLOR=#0000FF]Number[/COLOR] = [COLOR=#0000FF]Math[/COLOR].[COLOR=#0000FF]floor[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#808080]//check to see if bytesLoaded is not equal to the bytesTotal[/COLOR]
[COLOR=#0000FF]if[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000FF]bytesLoaded[/COLOR] != [COLOR=#0000FF]bytesTotal[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
preLoader_mc.[COLOR=#000080]loader_txt[/COLOR].[COLOR=#0000FF]selectable[/COLOR] = [COLOR=#000000]false[/COLOR];
preLoader_mc.[COLOR=#000080]loader_txt[/COLOR].[COLOR=#0000FF]text[/COLOR]= percent+[COLOR=#FF0000]"%"[/COLOR];
[COLOR=#000000]}[/COLOR][COLOR=#0000FF]else[/COLOR][COLOR=#000000]{[/COLOR]
[COLOR=#808080]//remove this preloader[/COLOR]
preLoader_mc.[COLOR=#0000FF]removeMovieClip[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]
[/LEFT]
[/FONT]