Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Flash (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 25th, 2004, 06:10 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default preloader being ignored

Hello

I've got this flash movie that's approx 60 k and need to add a preloader to it, which I've done although when I test it, the movie ignores the preloader until it gets to about 60% loaded and then it kicks in.

What I have noticed is that in the first frame (when I test the movie)
there is 32k sitting there so maybe that is why it's taking a while for the preloader to react - however, I don't know why there is 32k in the first frame.

Here is the main bulk of my code

loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/1000);
totalkbytes = Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
    nextScene();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
    gotoAndStop(_root.frame);
}


any help greatly appreciated.

Adam
 
Old February 27th, 2004, 06:14 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there any chance you have an attachMovie()? There is a setting in there that when you link the movie it ask if you want to download the attached movies in frame 1. Also you could do a trace(loadedbytes) to see if it's actually loading anything. I can look at this over the weekend.

If you not dead set on this code I have a preloader that I know works excellent, plus it has the bar and/or a byte count as it's loading.
Mike
 
Old March 1st, 2004, 08:18 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

Hi Mike

Instead of messing around with my one your one sounds good - is there anychance that you would be able to get it to me?

many thanks

Adam
 
Old March 1st, 2004, 12:21 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've uploaded it at
http://www.eclecticpixel.com/preloader
just save it to disk. Let me know if you have any problems.
 
Old March 1st, 2004, 06:16 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

Mike

thanks alot; I'll let you know how I go. I owe you one!

Regards

Adam
 
Old March 2nd, 2004, 07:06 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

Hi Mike,

Doesn't seem to want to download:

Save Preloader To Disk Flash MX

Message I get

'c:\hosting\webhost4life\member\EclecticPixe\prelo ader\preloader-fla.zip' script produced no output
 
Old March 2nd, 2004, 10:48 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

okay try again, for some reason the .zip file weirded out. I posted it as a .fla file it seems to work now.
 
Old March 2nd, 2004, 11:38 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

thanks man. got it
 
Old March 12th, 2004, 01:23 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default

You may want to check out www.flashkit.com, That site has tutorials on pretty much all Flash concerns

Quote:
quote:Originally posted by Adam H-W
 thanks man. got it
Ben Horne
Madison Area Technical College student
-------------------------
http://community.webshots.com/user/valerian114

Go there. I have a lot of awesome photos that I rendered myself

"A Person Who Claims To Be A Flash Junkie Isn't Really A Flash Junkie Unless He Can Prove It"





Similar Threads
Thread Thread Starter Forum Replies Last Post
can a preloader load an html site? dearmisskat Flash (all versions) 5 March 27th, 2007 03:56 PM
preloader? 13thSky Flash (all versions) 1 January 5th, 2007 01:20 AM
preloader for datagrid chayanvinayak Flash (all versions) 4 July 27th, 2006 03:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.