If you ever get the eclipse “Out of Memory” error, then you need to increase the default memory size. It’s relatively easy, but you have to know where to look.
In your eclipse install folder, right click on the Eclipse launcher and choose “Show Package Contents”. Then navigate to Contents/MacOS and open eclipse.ini. Change the min & max values to:
I just got back from 360|Flex conference in San Jose. I got to meet a lot of cool people, as well as put faces to several fellow Universal Mind guys. At past 360s, you had to search to find someone with a PC because it was overwhelmingly Macs, but I was surprised at the amount of PCs I saw this time. There was also a lot of focus on mobile development. Looking forward to next time.1 comment
I wanted to experiment with the new 3D features in Flex 4 Gumbo, so I made this simple rotate demo. Your mouse controls the rotation of the paw. I used the new functionality of
for the ‘info’ button effects and when clicking the paw. Rather than use the Rotate3D effect, I am just setting the rotation properties on MouseMove.
This was done for my good friends at CFBgaming.com.
Here are my slides from Flex Flash Camp along with an uber-basic example button skin that shows a quick breakdown of a Spark Skin. Great for those who haven’t had time yet to really peer into Flex 4 skins. Look for more advanced skinning topics soon.
UBER-BASIC BUTTON SKIN EXAMPLE
- FXG Graphics
- Skin Parts
Mike Orth 2009
<s:Rect top="0" bottom="0" left="0" right="0">
top="5" bottom="5" left="20" right="20" />
My presentation on Skinning in Flex 4 from the Adobe User Group Tour & Flex / Flash Camp will be up soon. It covers the basics of what has changed for skinning and styling. The demos walk you through creating a new skin and how certain aspects affect the end result. I had a great time meeting more people from 615Flex. Matthew did an awesome job of getting the event organized and off the ground.
Special thanks to Greg Wilson from Adboe, all the attendaes & presenters.4 comments
If you’ve played with the new Flash Builder 4 Beta, you may have wanted to test out your existing projects in it. And like me, you may have just quickly pointed it to an existing workspace to import a project. If you haven’t – DON’T. Once you switch back to Flex Builder 3, you will start getting An internal error occurred during “Removing compiler problem markers…”
This is because FB4 is built on a different version of Eclipse and modifies your workspace files (not your .project files), i.e. it hoses your existing workspace. To get rid of it, just create a new workspace in FB3 and import your projects there.2 comments
This is one of those quirky things that is not all that well documented. I had a client that needed a datagrid but didn’t want the header row. It sparked the memory of struggling to find how to do this the first time I needed it. So hopefully this will help end your search for the answer
Don’t you hate having to specify validation on each individual control in your form? Or how about when project management is continually adding new form fields to a form? “A user should have to retype an email address” or, “we need to add a billing address section.” Well now rather than having to add a new validator source or explictly call validate() for the new control, this code takes care of it all automatically. This works especially great for forms with dynamic fields.
Just add the FormItem to your form, set it to required and you’re set! Simply call
passing in any Form object and it will create an array of all the fields inside of the form. Since mostly you’ll be dealing with TextInput controls in your FormItem, that’s what this example uses. See comments in example code for more detailed information on usage.
* Helper function that returns all the fields for a
* given form. Pass in requiredOnly = true if you only want
* the required fields.
private function getFields(form:Form, requiredOnly:Boolean=false):Array
var a:Array = ;
// get every child of the Form
var formItems:Array = form.getChildren();
for (var i:int=0; i<formItems.length; i++)
// make sure it's a FormItem - if you use FormHeading or have
// items that are not wrapped in a FormItem tag then ignore those
if (formItems[i] is FormItem)
var formItem:FormItem = formItems[i];
// add the formItem's child to the array.
// if you only need required items, set requiredOnly = true
// Note: this assumes you only have one form field per FormItem
// You could easily add additional logic here for more
if (formItem.required || !requiredOnly)
* Validates all fields in a given form.
private function validateForm(form:Form):Boolean
// reset the flag
var _isValid:Boolean = true;
// populate the fields - if your fields aren't dynamic put this in creationComplete
var fields:Array = getFields(form, true);
for each(var source:UIComponent in fields)
// create a simple string validator
var validator:StringValidator = new StringValidator();
validator.minLength = 2;
validator.source = source;
validator.property = "text";
// typical validation, but check to this checks for any different
// types of UIComponent here
if (source is TextInput)
result = validator.validate(TextInput(source).text)
else if (source is TextArea)
result = validator.validate(TextArea(source).text)
// if the source is valid, then mark the form as valid
_isValid = (result.type == ValidationResultEvent.VALID) && _isValid;
Typically if you choose to use a TitleWindow, odds are you’re going to add it with the PopupManager and use the Close button. So rather than having to always set that up and add listeners for the CloseEvent, use this extended class PopupBase. It’s used the same as TitleWindow, declared in actionscript
but by default it:
- sets showCloseButton=true
- sets a listener for CloseEvent
- removes the popup when Close button is pressed
You can override the onClose handler to add different functionality.
public class PopupBase extends TitleWindow
public function PopupBase()
showCloseButton = true;
protected function onClose(event:CloseEvent):void
MediaCoreLib – Here’s an easy way to play rich media content (audio, video) inside Flash or Flex and manage it all in one place.
The new MediaCoreLib alpha release includes an extensive PlaylistManager as well as a merging of my FadingSound component to allow for crossfading between tracks. For a more info check out the Google code repository.
- Prev / Next
- Rewind / Fast-forward
- Preloading and Caching
- Fade In / Out
This is an effort bewtween Justin Opitz and myself and we are continuing to add features. Look for a Beta release soon!2 comments