PDA

View Full Version : loader actionscript problem



nicolaszein
August 10th, 2006, 05:08 PM
hello guys,

this site rocks by the way, i am learning a ton. So thanks and keep it up.

My problem right now is that i created a loader and it works but i wanted to modify it a little bit by having the load percentage display text to rotate along with the circular progress bar. The thing is that i can't figure out what is wrong with the code, it works well when it is on the main timeline but when i insert it in a movie it stops working.

on my site below, i included the fla and the swf for both the working version and the modidied one (with the MOD at the end of the file name).

http://www.nicolaszein.com/flash/!/

thanks for everything and i hope you guys can help me with this.

ciao

TNTWolverine
August 10th, 2006, 06:35 PM
looking thru it, too messy for my likes(no offense, just when you get better your organization becomes key)...i just got home from vacation and am not in the mood to do this but will be on tomorrow, and if you havent got help ill try and see what i can do...also, i believe this would be better if done in more AS which would also be a good learning experience(ill help with that tomorrow too if your interested)...for more replies put this in the actionscript section

nicolaszein
August 10th, 2006, 07:01 PM
Well thanks for the help if you have time, i didn't know i was that bad in my organization.

i will check back later to see if there are any replies.

ciao

TNTWolverine
August 11th, 2006, 12:42 PM
ok the problem was really easy to find...your text only is updated once, when you enter the frame...so to fix it try...

1)go into your centerloaderstatic mc and delete that the AS in frame 1...its got the whole stop(); down to loader_text = 100-whatever
2)go back into your main timeline and choose the AS layer and frame 50
3)put this in where theres that empty keyframe...


loaded_bytes = getBytesLoaded();
loaded_total = getBytesTotal();
total_percent = (loaded_bytes/loaded_total)*100;
centerloaderstatic.loaded_text = 100-Math.round(total_percent);

i couldnt attach mine, too big but ill email it if you need it...

also, for future reference, dont name your textboxs text...use like text_1 or something so it doesnt screw with flashs own use of text