Scrollbar adds 125kb

Hi guys

I have a simple Flash MX 2004 file with a dynamic text box on the stage which displays an external text file. When published, the .swf is 9kb in size. If i drag a UIScrollBar from the components panel to my dynamic text box and republish, the .swf file is 134kb. The generated size report says the following for the first frame of the 134kb .swf file:

Frame # Frame Bytes Total Bytes Scene


1 132589 132589 Scene 1 (AS 2.0 Classes Export Frame)

Does my swf file really have to be 125kb bigger if I want to use a textbox scrollbar?

Thanks

yes, if you want to use the UIScrollBar… yes.
Then again, you could always make your own

What use is a scrollbar that adds 125kb to a Flash site!!! That’s another 5-10 seconds waiting time on a typical broadband connection!

Do you have any good tutorials on how to make your own? I am looking for a simple scrollbar with up/down arrows and the block in the middle you can drag up and down

there are a lot online. google it (there might be a tutorial on kirupa, I dont know)

The reason that the scrollbar adds so much is because for most any component you add to a movie, that component needs the core component framework to properly operate. This base of script and assets makes for a good chunk of that size. However, the more components you use, the less space they take up since that framework is already in place after the first. For example, a Button makes for like 30K or so alone. And the scrollbar is like 40K (well should be - I dont think its over 100K). But put the two together in one movie and you dont get much more than 40K - its no where neer 70. So really, it can be ok if you use enough of them.

they do that so you will make your own … its one of the smartest things ever … forces you into yourself

I found this tutorial which helped me out:

http://www.flashkit.com/tutorials/Interactivity/Useability/Make_you-Vera_Fle-750/index.php

I imported the UIScrollbar graphics into my library and used those instead of the graphics that came with the tutorial file… I now have a working scrollbar which looks exactly like the Flash UIScrollbar and the final SWF file size is 14kb… not bad eh! A lot better than 134kb for the same thing!