need a help!
This is a preloader.
And I get this error:
ERROR: Cannot find variable or function "percent" in statement:
Preloader:: onFrame (5) {
:: percent -= (percent-((loading/total)*100))*.25
Referenced from: "_root"
What is wrong? or is it just that it isnt on the web?
thanks!
Senior Member
hi,
if a variable isn't found, it most likely hasn't been defined. although in this case i'm having trouble following the script. please post the swi so someone can check what's wrong.
btw. regardless of the invalid sytax of your script, preloaders will never show up when the file hasn't been uploaded, bacause the file loads instantly off your hd. always check the swf online and clear the browser cache to view the preloader in action again.
onFrame (5) {
loading = _root.getBytesLoaded();
total = _root.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per add "%";
loaderbar._xscale = per;
if (percent > 99) {
nextSceneAndPlay();
}
}
onFrame (6) {
prevFrameAndPlay();
}
that is the script! Hope it help
Flashkit historian
percent -= ?
shouldn't that be
percent =
no, then % dosnt loade right in to the loading bar...
Flashkit historian
if you have a dynamic textbox for percentage
Is it checked as a target...
and if so have you associated the variable percentage
with the text box?
Senior Member
this won't work:
precent = (precent -((loading/total)*100))*.25
you'll have to define the variable first before you can use it in this context.
assuming that "percentage" is the name of your text object (which is missing in your example), this will work fine:
percentage = per add "%";
in the example you posted, it's
percent = per add "%";
which is likely to cause problems.
What about this one then? Or is it the same problem here?
if it is can you maybe fix it??
Attached Files
Senior Member
Attached Files
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width