Thanks for having a look, I should have mentioned the png's - I'd say the same thing as you, but they are 306 BYTES, 307b and 444b, so about 1 and half kb in total!
Even full font embedding shouldn't really hit you for more than 180kb in most cases - and that's being a bit heavy there - that's all Latin chars. I've embedded fonts explicitly and not really had a problem with most fonts that were OpenType - some TrueTypes can get huge because they included uppercase, lowercase, bold... all Latin characters basically.
If you wish to test your font embedding, remove it from the portions that would use it - but to be honest, you're not even using something like Degrafa. So I don't think you would get that much of a file boost removing it.
I can take a look at this closer tomorrow; but I'll assume that you have no other *.mxml or *.as that's in the same /src folder right? Clean your build process and then produce a final build and see if that reduces the size. Test builds are never fully optimized.
Hope this isn't rude or asking too much - but would you mind compiling it on your computer? I think it is something happening when I build it, but everything I change here seems to do nothing... I have attached the two pictures that it requires, I think everything else is pretty standard.
If it works and builds, you won't see anything, as it needs a session variable embedded in the html page - not to mention a php page - but I only need the swf!!
I'll definitely fix it, but I'd be interested to know if it is my code or something else.
Thanks again, no problem if you don't have time or are just generally not interested!
This sounds crazy, but if I were you, drop any unnecessary comments and spacing. You'll save about... 5k in total, but I did get it slightly closer to 320kb after toying around and changing the spacing a bit...
Just odd that it's so big. I know that Flex can be a bit bloated, but this is... three components at best.
Yeah I know what you mean, but I just compiled an adobe example, about 20 lines of .mxml and it came out at about 263kb. Must just be a big component!!
Thanks so much for all your input, i really appreciate it. I'll definitely take your advice on the cleaning up.
It's your RSL's and lack of using the optimize tool on your final .swf. I dont have docs or examples handy but here is what will shrink it down.
1 - RSL (Runtime Shared Libraries). You want to build your main file to use the framework and rpc libraries from an external location. This should shave over 200K off your file. Granted a new visitor may have to load those files, but if they have visited a site using RSLs, chances are they are cached and this will speed up load time.
2 - Optimize tool. Once you build a Release Build, there is still some debug code and other misc stuff in the .swf that can be removed. You run the Optimize commmand tool against your .swf and it will shave off more file size from it.
Just google RSL's for Flex and the Flex Optimize tool.
Hope this helps!
The Early Bird may get the worm, but the second mouse to the trap gets the cheese...