This content has been marked as final. Show 8 replies
does your swf have any components, embedded fonts or other items that have linkage ids?
Thank you so VERY much for coming to my aid.
I am NOT using any components. I don't know how to know if I am using embedded fonts, but in the publish report nothing like that is listed (I am just using Arial, Arial italic and Arial Bold in my .fla and that amounts to about 19K). Ah ha! I did see I have 2 things in my library with linkage id's that I use. That is what was causing the first frame to be large (since one of those items is pretty big). I read in the help that if I uncheck the export in first frame option that I have to put an instance of it on the stage before I use it. I've done that by putting a layer on my .fla called linkage items and I've just dumped that on that layer in a frame between my splash screen and main content, before the app is initialized (and attaches the item in the library).
Is there a smarter way to do this? What if in the future I have quite a large number of items I address in script? It seems like it would be pretty hard to know if I had put all those instances on my stage ahead of time (especially if I have a boat load of sounds in the library).
I read somewhere online about a preloader .swf. Is this a better way of doing stuff? If that's the case, the example had the main .swf's url hard coded in the preloader. Is that a good idea or is there a better way?
2) While my loading frames are now coming up faster, I am still baffled about why the published .swf is 551K, but during the loading spin loop it says I need to load 820K. What the heck is that all about?
Again, I VERY much appreciate your continued patient help with all my various newbie learning struggles.
it's simpler and more reliable to build a separate swf that contains only the preload code and anything you want on stage to entertain and inform users about the preload progress of you main file. you then will have no issues with components, embedded fonts or linked items.
if you load into an empty movieclip and check the load progress of that empty movieclip you may want to use this._lockroot in your main swf. or instead of loading your main swf into an empty movieclip, load into a non-zero _level.
there's some coding error if you published swf is 551kb but your preloader is reporting 820kb or you're not checking the correct version of your published swf.
There is no error. The number you will see anytime you use bytesLoaded and bytesTotal, is the uncompressed file size of your swf. The published swf maybe showing a filesize of 551kb but when the flash player opens the swf, it umcompresses that file and bytesLoaded and bytesTotal are based on that uncompressed data. A simple test, is to uncheck the compress SWF option in publish settings. The resulting swf file should be around 820kb.
Thanks to both of you for your help. Yes indeed when I unchecked the compress SWF option, the published file is 802K. I guess now I need to understand this preloader stuff better. The sample code I am trying to use as the basis isn't working, but I'll experiment some more before bugging you folks further with questions.
Keep in mind Anne that preloaders are not an exact science. They are simply meant to notify visitors to the site that stuff is loading. Your visitor doesn't care if that number is 500 or 800. I usually never give this information. It is honestly pointless to them. Show them a percentage and a progress bar if you like but don't bother with the numbers. Let Flash handle that in the backend. Your visitor isn't going to leave because he sees 800 and not 500. (S)He'll leave because you didn't catch their attention in 8, 7, 6, 5, 4, 3, 2, gone!
Thank you for your thoughts. I agree. I was using the display of bytes temporarily to try to see if things were going OK as a debugging aid. Subsequently I ran into some snafus (which I posted in another thread in the forum), but have finally gotten through that knothole. Onward....
Thank you for your thoughts. I agree. I was using the display of bytes
temporarily to try to see if things were going OK as a debugging aid.
Subsequently I ran into some snafus (which I posted in another thread in the
forum), but have finally gotten through that knothole. Onward....