package { import com.adobe.portfolio.properties.*; public class CustomProperties extends CommonProperties { public function CustomProperties() { super(); } [Bindable] public var headerHeight:PropertyNumberValue; [Bindable] public var widgetText:PropertyStringValue; [Bindable] public var widgetTextColor:PropertyColorValue; [Bindable] public var widgetLocation:PropertyListValue; [Bindable] public var showWidget:PropertyBooleanValue; override protected function loadContext(context:PropertyContext):void { super.loadContext(context); if (context == null) { return; } // there can be any number of contexts so I'm using a case statement here to future-proof this code // see the MAX2010_Final project in the Portfolio SDK for an actual use case switch (context.name) { case "com.my.properties": headerHeight = context.getProperty("headerHeight") as PropertyNumberValue; widgetText = context.getProperty("widgetText") as PropertyStringValue; widgetTextColor = context.getProperty("widgetTextColor") as PropertyColorValue; widgetLocation = context.getProperty("widgetLocation") as PropertyListValue; showWidget = context.getProperty("showWidget") as PropertyBooleanValue; break; } } } }