FlexApp LoadSignCtrl Example

FlexApp.mxml has member variable of type SystemManager. This member variable holds a pointer to the SignatureCtrl.swf embedded within the asset. The pointer is shown in the following sample:

private var m_signCtrl:SystemManager;
  public function loadSignCtrl(strSignCtrl:String):void
  {
	 loader.autoLoad = true;
	 loader.percentHeight = 100;
	 loader.percentWidth = 100;
	 loader.load(strSignCtrl); 
	 loader.addEventListener(Event.INIT, loadComplete);
	 loaderBox.addChild(loader);
 }
 private function loadComplete (event:Event):void
 {
    m_signCtrl = SystemManager(event.target.content);
 }

The Interactive Detailer sends the path of SignatureCtrl.swf and notifies the Signature Asset to load the Signature Control by calling a method called loadSignCtrl. This is all implemented by the Asset.

The Signature Asset method, loadSignCtrl, will load SignatureCtrl.swf into an SWF loader. The pointer to SignatureCtrl.swf is stored in the member variable m_signCtrl, as displayed in the loadComplete function.