|
|
 |
 |
|
|
|
 |
|

11-04-2008, 09:02 AM
|
|
|
Flex Application Size Way To Large
I have looked in the help, however I have been unsuccessful in shrinking my
final web site.
I have created a 4 tabbed web page with NO photos, music or any other hog
adding feature.
The only things I have used were from the controls panel, like button, slider
and so on.
In my script section I have this in there so allow some of my controls to work
import flash.net.XMLSocket;
import flash.events.*;
import flash.utils.*;
import mx.collections.ArrayCollection;
I am a 3 week old flexer, so I would think that instead of importing *.* I
could be more specific and import exactly what it need ?
The resulting file size is 284k, This is for an embedded application and I
need to shrink this file size WAY down.
A few months ago when I was using Flash, I could do all the same stuff I am
doing now and the file size was around 25k.
Would someone please offer suggestions on what I can do to shrink the final
site size down.
Thanks.
|

11-04-2008, 09:02 AM
|
|
|
Re: Flex Application Size Way To Large
Hi.
This is a feature of Flex. The smallest Flex file I have made is just under
200k. Try it yourself. What makes it that size is the Flex Framework itself,
a must for a Flex example.
If you can do your app in Flash for some 25K, perhaps Flex is not the correct
tool for your job.
greg.
|

11-04-2008, 09:02 AM
|
|
|
Re: Flex Application Size Way To Large
Try going to your project's properties, Flex Build Path, then Library Path, and
set the Framework Linkage to "Runtime shared library (RSL)".
This will greatly reduce the file size. But you will have to deploy the
resulting framework files into the same folder as your application. You'll see
the two framework files in the bin-release folder. The file names will be
something similar to "framework_3.1.0.2710.swf" and "framework_3.1.0.2710.swz".
Search help for "Framework Linkage " to read more details about what this
accomplishes.
|

11-04-2008, 09:02 AM
|
|
|
Re: Flex Application Size Way To Large
That will reduce the size of the application's swf BUT will increase the
requires down loads to 3 files with a combined size larger than the original
single swf. This is ok IF you plan to deliver many small swf's to the user but
is bad for a one-up usage.
|

11-04-2008, 09:02 AM
|
|
|
Re: Flex Application Size Way To Large
Thanks for the info, The RSL thing wont work for me as I will have to store
those files on the system, so I have not accomplished anything doing that. My
system only has 1 Meg of storage and the web site is already 280k. When I add
the OS to that I am at 720k and I still have more system programming to go.
Flash may create a smaller file, but Flex is much quicker and friendlier to
work with. Not to mention faster to learn.
What I don't get is how can Adobe make a app like Flash, who's output files
size is small doing the same thing, yet Flex output is way greater. Just don't
make sense.
|

11-04-2008, 09:02 AM
|
|
|
Re: Flex Application Size Way To Large
ok, i tried this, i created a project and the only thing in there is this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
backgroundGradientAlphas="[1.0, 1.0]"
backgroundGradientColors="[#224281, #5B74A5]">
</mx:Application>
When i exported the project the .swf file was 152k, now i think that is INSANE
that just a bare bones page with nothing on it would be that large.
|

11-04-2008, 09:02 AM
|
|
|
Re: Flex Application Size Way To Large
Yes. That is what I was saying above.
What you get is the "basic" Flex framework as the starting place for your
application. If you do not need the Flex framework, you can use standalone
Flash and avoid the framework's overhead. For simple stuff I use a third party
swf generator, SWiSHmax. However it is AS2 based instead of Flash CS3 which is
AS3 based.
|

11-04-2008, 09:02 AM
|
|
|
Re: Flex Application Size Way To Large
@gsb: Using the runtime shared library only requires the user to download the
framework file once. For any subsequent visit it will not be downloaded because
it is cached on the user's machine. This is a great feature of Flex and pretty
much overcomes the difference in the file size between a similar Flash project.
There really is no downside.
@PastaPrimavera: Most Flex developers would disagree with your comment that
152k is 'insane'. I've done full-featured apps in Flex and obtained very
reasonable file sizes (using the RSL) of around 350KB. We're talking about RIAs
with an entire web site in one file, not HTML pages being loaded one at a time.
I'm not sure what kind of "system" you are using which limits you to only 1MB
of storage, but I wouldn't be able to do anything with that unless it was a
simple brochure website done in HTML. Sounds like you should be questioning
your project's scope and choice of tools, not an arbitrary limit imposed on
Flex by a 1MB storage limit.
By definition, any RIA website will be larger than what you are demanding. If
your target audience does not have broadband and the ability to handle the
inherently larger files, don't use Flex. You will only be frustrating yourself
for no reason. Wait until you get a project that will let you unleash Flex's
potential for creating media-rich web sites. Stick with an HTML editor for now.
|

11-04-2008, 09:02 AM
|
|
|
Re: Flex Application Size Way To Large
Another way of reducing the file size of your application is to use modules.
A monolithic application grows larger and larger as you add features to it.
A modular application remains slim. You add modules to your applications that
bring more features and you load them only when needed.
|

11-04-2008, 09:02 AM
|
|
|
Re: Flex Application Size Way To Large
I agree with most of your comments, as far as my choice of tools goes, what I
need to do cannot be done with standard HTML code.
I need to create a socket connection to my board to communicate back and
forth. I had the the same app I am using not 90% done with FLASH and it was a
good 8x smaller file size.
I suppose from a web site developers end 200k is not bad for a site.
however what I am questioning is why is FLASH able to produce such a small
size and FLEX is producing such a large size both doing the same thing ?
|
 |
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners. Proud member
of the Camley Interactive Network
All times are GMT. The time now is 09:47 PM.
|