As I have played with RSLs more I saw something surprising: If I compile the swc into a swf the resulting swf is bigger (almost twice) as it should have been. When you use compc to create a SWC, the SWF inside the SWC contains a lot of unnecessary stuff when used as [...]
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 [...]
In a previous article I told you about the benefits of RSL’s. But you need also to know how to create them from a swc and how to use them.
First step is to create a new “Flex Library Project”. Write all the code you want to have in it. Then in your main application [...]
If you ever wanted to make a complex application with Flex you always asked yourself: Is the swf to big? How can I reduce it’s size?
Here are some small tips that do not relate to flex only, and one specific to flex:
One of the first questions any beginner in OOP and Flex will ask is: What do those public/protected stuff really mean?
Well here is a short table to describe them.
I was working to a flex project, I need a canvas where I have to put some elements on a big surface, so I really need to have scrollbars. That’s fine. If I move an object to the right-bottom corner it’s working great, if the object goes out of working space, will go under scrollbars, [...]
If you ever wondered how can you compare 2 objects (big structure objects that can not be compared by Flex itself using the === operator) in Flex to find out if they are identically the same one of the methods used were to check all their attributes.
I wanted to talk a while ago about the [Mixin] meta-data tag but I forgot .
Most programmers have heard of the static code concept but if they try to implement it in AS3/Flex they have problems. Here is how to do it:
package
{
import mx.managers.ISystemManager;
[Mixin]
public class StaticCode
[...]
A very handy parameter is the rest one. Imagine you want a function that will calculate the sum of any number of parameters of type number. One way to do it is to send an array to the function. But one better way is to use the “rest” parameter.
Here is the function:
public function MakeSum(a:int, … [...]
This it’s a clean example about how to add a CSS style to a component in Flex.
We need to create the CSS file (style.css) and add a custom style:
.myStyle {
font-size: 20px;
color: #cc0000;
}
Make a new Flex project and in the defalul MXML aplication file add this code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" >
<!–// Here we call our [...]
Adobe has announced a RIA Developer Camp November 5, 2007 4:00 p.m. – 8:30 p.m.
Details:
Learn from other developer community leaders on how they use Adobe® Flex™ 2, Flash® CS3, and AIR™ (Adobe Integrated Runtime) to help them improve their business applications.
Join this seminar and hear speakers from Yahoo!®, PayPal™, ActionScript.com, and Adobe discuss how business [...]
Recently I had to put a mask to an UIComponent. Here is the way to do it:
var largeMask:UIComponent = new UIComponent();
largeMask.graphics.beginFill(0×00FFFF, 0.5);
largeMask.graphics.drawRect(0, 0, 120, 40);
largeMask.graphics.endFill();
largeMask.x = 0;
largeMask.y = 0;
this.addChild(largeMask);
this.mask = largeMask;
this should be UIComponent or Shape or similar object.
Obs: the mask must be added as child to the object you need to add the mask [...]
So you need a modal window and you are using Flex . This a small example that will open a modal window when application it’s initialized. I put the title to the modal window, but you can add also an icon.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" initialize="openModalWindow()">
[...]
Luke Bayes and Ali Mills of PatternPark presented 9 Flex Frameworks for the Silicon Valley Flex Users Group (SilvaFUG) at Adobe’s offices in San Francisco.
Those frameworks are: Cairngorm, PureMVC, ARP, MVCS, Flest, Model-Glue: Flex, ServerBox Foundry, Guasax, and Slide.
The final conclusion was that PureMVC by Cliff Hall beats out the alternatives. We prefer PureMVC [...]
A feature of Flex (and any decent programming language) is the garbage collector. What it does? Once it detects that an object in memory is no longer needed it will clean up the memory. Simple no?
Well is not that simple: you may have finished your work with that object but there are references to [...]