Fx{r} is trying to start the Fx{r} Community! Please join our group on Adobe Groups following this link: http://groups.adobe.com/groups/ab29539ab9.
Fx{r} is now on Twitter too. Follow us @ twitter.com/fx_r!
«
»

Flex 2, Flex resources, MXML

How to reduce the size of any flex app using RSL

Virgil Cristea | 08.01.08 | 2 Comments

Google Buzz

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:
  • Twitter
  • Google Buzz
  • LinkedIn
  • Google Bookmarks
  • del.icio.us
  • Digg
  • Sphinn
  • blogmarks
  • Reddit
  • StumbleUpon
  • Facebook
  • DZone
  • FriendFeed
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • Slashdot
  • MySpace
  • Add to favorites




Tags: , , , ,

This post was written by Virgil Cristea

Views: 9829

related

2 Comments

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="" escaped="">

:

:


«
»