« How to create a swf RSL from a swc and how to use it
» RSL further details

Flex 2, Flex resources, MXML

How to reduce the size of any flex app using RSL

Virgil Cristea | 08.01.08 | 1 Comment

As you saw in the previous posts you can use RSLs to reduce the size of a flex application.

If you use mxml in your application you should know that behind the scenes Flex will include in the project a lot of classes and controls (some of them you do not even want). You can bypass this whole process using RSLs.

Instead use a RSL that will have included in it only the controls you will need to use:

package
{
  import flash.display.Sprite;
  import mx.core.Application;
  import mx.containers.Panel;
  import mx.controls.Alert;
  import mx.controls.Button;
  import mx.controls.CheckBox;
  import mx.controls.ComboBox;
  import mx.controls.DataGrid;
  import mx.controls.Image;
  import mx.controls.Label;
  import mx.controls.List;
  import mx.controls.Text;
  import mx.controls.TextArea;
  import mx.controls.TextInput;
  import mx.controls.ToolTip;
  import mx.effects.Move;
  import mx.effects.WipeDown;
  import mx.effects.WipeLeft;
  import mx.effects.WipeRight;
  import mx.effects.WipeUp;
  import mx.rpc.http.mxml.HTTPService;
 
  public class smallLinker extends Sprite
  {
     private var application:Application;
     private var panel:Panel;
     private var alert:Alert;
     private var button:Button;
     private var checkBox:CheckBox;
     private var comboBox:ComboBox;
     private var dataGrid:DataGrid;
     private var image:Image;
     private var label:Label;
     private var list:List;
     private var text:Text;
     private var textArea:TextArea;
     private var textInput:TextInput;
     private var toolTip:ToolTip;
     private var move:Move;
     private var wipeDown:WipeDown;
     private var wipeLeft:WipeLeft;
     private var wipeRight:WipeRight;
     private var wipeUp:WipeUp;
     private var httpService:HTTPService;
  }
}
Share and Enjoy:
  • Technorati
  • StumbleUpon
  • del.icio.us
  • NewsVine
  • Reddit
  • Digg
  • Furl
  • co.mments
  • blogmarks
  • Slashdot
  • description
  • Taggly
  • YahooMyWeb
  • connotea
  • Webride




Tags: , , , ,

This post was written by Virgil Cristea

Views: 4121

related

1 Comment

have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

:

:


« How to create a swf RSL from a swc and how to use it
» RSL further details