I have a custom component being distributed as a SWC file. I need to be able to differentiate whether the component is being used normally or if it is being shown in the design view.
UIComponentGlobals.designMode can be used to check if we are being run from design view or not.
import mx.core.UIComponentGlobals;
private function onInitialize():void{ if ( UIComponentGlobals.designMode ) { // show something design view specific } else { //render normally }}