-
gotoandplay the % loaded?
ok... i have a preloader and all that, and i have it so it creates a number 1-50 to show the progress of the load.
now, i have an mc with 50 frames, and i want it to go to the frame that coincides with the number 1-50 as its being loaded... does this make sense?
the variable for the number is tearprogress, and the mc is called tear
i've tried the code _root.tear.gotoandStop(tearprogress); but that doesent work...
anyone know what to do?
-
could it be that _root.tear isn't actually fully loaded when you try to reference it?
idi
-
no thats what the point of the animation is...
the animation is supposed to play along according to the speed of the loading...
when the loading is at 20% the animation will be on frame 10, at 50% the animation will be on frame 25, etc.
-
here is an example of whats happening
http://www.seeminglyawake.net/kyle/main3.html
after the main site loads (may take a bit) click on the blue box
that will load an external jpg into the left frame
in the left frame, you will see a number appear... thats the 1-50 number i am talking about... inside the frame, there is an animation of the background tearing away... thats the animation that i want to represent loading. i want it to begin at 1 and be fully torn off at 50... now it just loops over and over...
can anyone help?
it would be very much appreciated
-
two quick questions:
are you using Math.round on the loaded percentage before using it as a reference for the framenumber?
have you placed a stop() action on frame 50 of the tearaway?
idi
-
not using math.round
i figured that since the numbers were sometimes decimals it might not work, but dont know how to do it...
no stop action yet, because i wanted to see if it would keep looping or if it would play the frames like its supposed to
-
Senior Member
u cna use
Math.round() to get a number so that u can acces the frames
-
ok... where in this code would i put the math.round?
(i have no idea how to use math.round)
tearprogress = ((_root.holder.getBytesLoaded()/_root.holder.getBytesTotal())*50);
_root.tear.gotoAndStop(tearprogress);
-
tearprogress = Math.round(((_root.holder.getBytesLoaded()/_root.holder.getBytesTotal())*50));
_root.tear.gotoAndStop(tearprogress);
idi
-
thanks a ton!
works like a charm now
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
|