This content has been marked as final. Show 9 replies
where's percentage defined???
kglad - Based on your tip I altered the code.
I added "var percentage:Number" near the top and
"percentage = Math.floor(bytesLoaded / bytesTotal * 100);" near the middle.
I get the same result. What next?
Thanks for your help.
the "this" in this.loaderani_mc refers to listener which isn't correct. you need to fix that reference.
i'm unable to suggest a fix because i don't know the timeline that contains loaderani_mc.
That makes sense. Here's the setup.
The timeline that contains loaderani is 3 layers by 1 frame.
Layer 1 is for actions and has only the code we've been working on.
Layer 2 is the text box "loading_txt".
Layer 3 only has loaderani._mc on it.
Within loaderani_mc is 4 layers (3 of them static) by 100 frames. (I made it 100 because I thought it would help....100 frames, 100 percent...never mind.)
Layer one is for actions and only has a stop(); on fr100.
Layer 2 is an outline of a bird.
Layer 3 is the only layer that motion tweens . It has a Graphic symbol (loader_mask)- a solid rectangle layer mask that gradually moves vertically revealing the fill of the bird.
Layer 4 is the fill of the bird.
I hope this is what you were asking for.
no, that wasn't helpful.
is loaderani_mc on the same timeline as your code? is so just remove this.
if it's not on the same timeline what's the path from your code to loaderani_mc? if you're not sure of the path use:
trace("loader "+this); // on timeline that contains your code
trace("mc "+this); // on the timeline that contains loaderani_mc
Thanks again for the quick reply.
By following your instructions I was able to discover that I had the instance name spelled wrong. There was a dash instead of underscore. I hate when that happens because it means I've wasted hours of my and your time pouring over something I already know how to do.
However - it was not a total loss. I did learn something.
I had never understood about using trace statements in the way you suggested. Why would the statement **trace("loader "+this);** work if the thing I'm looking for is never named or referred to as "loader" ?
The trace came back **loader _level0**. How did the actionscript find "loader" ?
>>The trace came back **loader _level0**. How did the actionscript find
It didn't. You said trace("loader "+this);
"loader" is just a string... and 'this' is _level0.
Adobe Community Expert
Thanks Dave. I was looking for something technical when the answer was simple.
if you learn to use trace(this), you'll find it useful.