Can anyone suggest the best way to simulate an animation based preloader short of putting a 2mb image on the second frame or creating the same effect as a time line based animation?
Any help would be most appreciated and repaid in kind…;)
djlaw
- Author was Featured
- Bought between 50 and 99 items
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 5-6 years
- Interviewed on the Envato Notes blog
- Item was Featured
- Referred between 100 and 199 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
make a timer(as3) or an interval(as2) that runs every 100ms and increment a variable that starts at 0 to represent your 1-100. 100ms will equal to 10 seconds for 1 through 100 I believe.
Thanks for the lightning fast reply rondog,
any ideas how i would implement that in to this code?
onEnterFrame = function () { };
total = _root.getBytesTotal();
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
preloader.textmc.txt.text = percent+"";
preloader.gotoAndStop(percent);
if (loaded == total) {
//gotoAndStop("loaded");
gotoAndStop(2);
delete onEnterFrame;
}- Author was Featured
- Bought between 50 and 99 items
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 5-6 years
- Interviewed on the Envato Notes blog
- Item was Featured
- Referred between 100 and 199 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
var count:Number = 0;
var inter = setInterval(showPercent, 50);
function showPercent()
{
if (count != 100)
{
count++;
trace(count);
preloader.textmc.txt.text = percent + "";
}
else
{
trace("fully loaded");
clearInterval(inter);
gotoAndStop(2);
}
}
50ms seems to be a pretty good number for a preview.
var count:Number = 0;
var inter = setInterval(showPercent, 50);
function showPercent()
{<br />
if (count != 100)
{<br />
count++;
trace(count);
preloader.textmc.txt.text = percent + "";
}
else
{
trace("fully loaded");
clearInterval(inter);
gotoAndStop(2);
}
}
50ms seems to be a pretty good number for a preview.
Rondog your a legend!
Nice one 
Had to make two changes but works mint…
“stop();” and “preloader.textmc.txt.text = count;”
Very much appreciated hope you like my preloader when it gets published 
- Author was Featured
- Bought between 50 and 99 items
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 5-6 years
- Interviewed on the Envato Notes blog
- Item was Featured
- Referred between 100 and 199 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
oh yea I forgot to take out the percent and replace it with count he he..glad I could help!
