i'm trying to implement an custom MediaElement, wich can display custom layouts . Unfortunately, it doesnt work as expected. (I started with the org.osmf.examples.text.TextElement). But instead of the Textfield I'd like to show a custom DisplayObject like labels inside an HBox. But nothing shows up.
It only works if I'm using just an mx:TextField. Also tried with spark components
public class HTMLElement extends MediaElement
public function set text(value:String):void
if (value != text)
_text = value;
public function get text():String
private function updateLayout():void
var _hbox:HBox = new HBox();
var _label:Label = new Label();
_label.text = text;
displayObjectTrait = new DisplayObjectTrait(_hbox,500,500);
Maybe you can give me an hint were to find an implementation of such an complex custom component or an hint for showing something that's more complex than juat a Textfield.