Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-08-2008, 05:01 PM   #1
mainegate
Senior Member
 
Join Date: Nov 2007
Posts: 188
Default [AS3] small file size

Is there a way to create a uiLoader in actionscript so you don't have to put it in your library? It sounds weird but if I take the component and add it to the stage it increases my size of my swf by 12k ...to me is a lot. is there a way to reduce that number...without it is 4k. I want to load some pictures dynamically but I want to keep swf size to bare minimum.
mainegate is offline   Reply With Quote
Old 08-08-2008, 06:01 PM   #2
pj-co
Site Contributor
 
pj-co's Avatar
 
Join Date: Jun 2008
Location: Brooklyn
Posts: 360
Default

have a look at flash.display.Loader
pj-co is offline   Reply With Quote
Old 08-08-2008, 06:24 PM   #3
mainegate
Senior Member
 
Join Date: Nov 2007
Posts: 188
Default

I did but when I try to import the uiloader it doesn't work.
mainegate is offline   Reply With Quote
Old 08-08-2008, 06:32 PM   #4
pj-co
Site Contributor
 
pj-co's Avatar
 
Join Date: Jun 2008
Location: Brooklyn
Posts: 360
Default

What I mean is, dont use the component at all -- script the loading. Perhaps someone will post some code as to loading bitmaps but I wanted to just point you in the right direction as the learning process can be more fun and rewarding that way
pj-co is offline   Reply With Quote
Old 08-08-2008, 06:34 PM   #5
pj-co
Site Contributor
 
pj-co's Avatar
 
Join Date: Jun 2008
Location: Brooklyn
Posts: 360
Default

have a look here to:

http://actionscript.org/forums/showp...0&postcount=13

loading bitmaps is a lot like loading swfs
pj-co is offline   Reply With Quote
Old 08-08-2008, 07:07 PM   #6
mainegate
Senior Member
 
Join Date: Nov 2007
Posts: 188
Default

pj-co ...wow that is great...I was trying that before but without the urlloader...thank you very much. Is the process similar for doing it for textboxes or textarea's or other components?
mainegate is offline   Reply With Quote
Old 08-08-2008, 07:12 PM   #7
pj-co
Site Contributor
 
pj-co's Avatar
 
Join Date: Jun 2008
Location: Brooklyn
Posts: 360
Default

Quote:
Originally Posted by mainegate View Post
pj-co ...wow that is great...I was trying that before but without the urlloader...thank you very much. Is the process similar for doing it for textboxes or textarea's or other components?
Sort of yes. components are nothing more than pre-packaged graphics and actionscript to perform common tasks (like a scrollable text area). They are all written and made in flash so that anything a component can do, ActionScript can also do.

Often with components though the suffer from "feature creep bloat." Basically sometimes they are designed to handle so many different situations and have so many features, they are often more robust than you would need. Hence a simple scripted solution, can often (though not always) be smaller, simpler and faster.
pj-co is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sound | Lowering file size mandrews ActionScript 2.0 4 08-18-2006 04:53 PM
Flash file with *only* one image double the size if the image? OM2 Flash 8 General Questions 0 06-08-2006 05:16 PM
file size monkeygurl ActionScript 1.0 (and below) 5 03-28-2006 09:22 AM
components - file size increase ahungryghost Components 1 04-20-2005 03:12 PM
Needlessly large fla file size duffi ActionScript 1.0 (and below) 3 08-19-2004 03:32 PM


All times are GMT. The time now is 03:07 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.