Is application ran from editor or online?
Posted by: Keith H in Flash Builder, Flex, tags: editor, Regular ExpressionsFor 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; }

Entries (RSS)