Created
October 27, 2011 16:49
-
-
Save develar/1320107 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.intellij.flex.uiDesigner.test { | |
import flash.display.DisplayObject; | |
import flash.display.Sprite; | |
[DefaultProperty("mxmlContent")] | |
public class FlashContainer extends Sprite { | |
private var _mxmlContent:Vector.<DisplayObject>; | |
public function set mxmlContent(value:Vector.<DisplayObject>):void { | |
if (value == _mxmlContent) { | |
return; | |
} | |
if (_mxmlContent != null) { | |
for each (var child:DisplayObject in _mxmlContent) { | |
removeChild(child); | |
} | |
} | |
_mxmlContent = value; | |
if (_mxmlContent != null) { | |
createChildren(); | |
} | |
} | |
protected function createChildren():void { | |
for each (var child:DisplayObject in _mxmlContent) { | |
addChild(child); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment