I'm sure this has been asked before sometime, somewhere; but i can't find the thread for the life of me. I've been working on this script for a few days now, but just can't get it to work right.
My scenario:
I have a dynamic text box(loadText) and a preload bar (loadBar) on first keyframe. Keyframe two has a large image just to get the dang thing to work. Back to keyframe one...i have the following AS:
What this AS is supposed to achieve is for the loadText's percent in the dynamic textbox to follow the loadBar loaded along the x-axis.Code:_root.onEnterFrame = function() { var totalBytes = _root.getBytesTotal(); var loadedBytes = _root.getBytesLoaded(); var percentComplete = (loadedBytes/totalBytes) * 100; if (percentComplete >= 100) gotoAndPlay(2); loadText._x = loadBar._x+loadBar._width }
Any suggestions, ideas?
Gratzi, take care.




Reply With Quote