Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE FLASH:HomeFlash ForumFlash TutorialsFlash Video TutorialsWeb Streaming ForumAdobe FlashPodcast

Beating a dead horse, but...

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook
ThumbslingerBeating a dead horse, but...
by on Jun 2, 2005 at 5:36:22 am

I've got a 1.9 meg swf file. A very simple preloader bar is on the first frame. However, online testing has shown me that not until 1.6 megs of the total has loaded does the simple preloader show up, more than halfway done.

Are there better ways to code the preload step that will get a frame to display once it is actually loaded? Here's what I have:

stop();
onEnterFrame = function() {
framesLoaded = (Math.ceil (( _parent.getBytesLoaded() / _parent.getBytesTotal()) * 100));
this.gotoAndStop (framesLoaded);
preloader.info_txt.text = framesLoaded + "% completed";
if (framesLoaded >= 90) {
_root.gotoAndPlay ("Start");
}
}

That is on the first frame of a little movie clip called preloader, which is just a text box and a shape graphic that gets shaped tweened as frames are downloaded.

The first frame of the main timeline has a stop(); action and two layers: the above preloader and a static text box with a name.

That's all there is.

My test is at: http://www.johnsoncreativegroup.com/don/

I see about a three-four second delay of black screen before the preloader pops up.

Any ideas on this anyone? Thanks


Return to posts index
Reply   Like  

LeeBrimelowRe: Beating a dead horse, but...
by on Jun 2, 2005 at 3:44:02 pm

Do you use any components because they will botch most preloaders. If you are using components let me know and I can tell you a workaround.

Lee

-----------------------------
Flash Blog - http://www.theflashblog.com
Flash Tutorials - http://www.gotoandlearn.com
Personal Site - http://www.leebrimelow.com


Return to posts index
Reply   Like  

thumbslingerRe: Beating a dead horse, but...
by on Jun 2, 2005 at 5:10:04 pm

I've been through so many lines...

I'm using FlashMXPro, saving for Player 6, actionscript version 1

No components, just a movie clip with a shapes' width tweened along the frames of that movie clip.

I'll check that site mentioned below as well...


Return to posts index
Reply   Like  


thumbslingerRe: Beating a dead horse, but...
by on Jun 2, 2005 at 5:11:15 pm

oops... that link takes me to the original code I was using to control the reveal of the bar...same prblems


Return to posts index
Reply   Like  

idonthaveacoolnameRe: Beating a dead horse, but...
by on Jun 2, 2005 at 3:44:08 pm

yes.. you have some issues with your code... depending on your version you may be using deprecated AS...

use this code... i'm not sure what version of Flash you are using but this is easy to implement...

http://www.video-animation.com/flash_26.shtml


Return to posts index
Reply   Like  

idonthaveacoolnameRe: Beating a dead horse, but...
by on Jun 2, 2005 at 3:46:33 pm

one simple issue with your code is that when it reaches 91% (loaded > 90) percent complete then it will go to the frame labelled "start" even when it is possible that this frame has yet to fully load...


Return to posts index
Reply   Like  


idonthaveacoolnameRe: Beating a dead horse, but...
by on Jun 2, 2005 at 11:01:48 pm

and the code on that page works well... your code is NOT the same...


Return to posts index
Reply   Like  

ThumbslingerRe: Beating a dead horse, but...
by on Jun 3, 2005 at 4:04:03 am

No, it was before though and it did work. However, it gets screwed when using a component. But, thanks to both Peter and Lee, by unchecking Export on First Frame and exporting the script on a different frame, all works now.


Return to posts index
Reply   Like  

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook


FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]