Posts Tagged “editor”

For most situations when I want to only execute code of an application running from the editor, I use regular expressions to check the application's url.
You could use other regular expressions for your own situation.

In Flash Builder 4

 
 
                        public static function isDevEnvironment():Boolean
			{
				return mx.core.FlexGlobals.topLevelApplication.url.search(/^file|^\w:\\ig/) != -1;
			}
 

In Flex Builder 3

 
			public static function isDevEnvironment():Boolean
			{
				return mx.core.Application.application.url.search(/^file|^\w:\\ig/) != -1;
			}
 
Vote in HexoSearch

Comments No Comments »

There are a lot of Flash physics engines available to use. I've only tried Box2D, APE, and Foam.
Foam is my favorite so far. I actually like the options of Box2D better but it's just not as ActionScript-friendly as Foam.

Foam sets up the easiest of these 3 engines for an ActionScript only project...In my opinion, setting it up to use in my Flex projects takes a little more work depending on what I use it for. Seeing the end result of it is fun to watch.

Below I'm currently using my polygon editor to test Foam out in Flex.

Click to view example

Vote in HexoSearch

Comments No Comments »

Thanks for visiting www.keith-hair.net