0 Replies Latest reply on Jan 12, 2011 12:09 AM by kkonrad

    How to show a logo during playtime?




      I  just found the T04_IntegratingUIControls OSMF Example where a logo is  shown in the right bottom corner of the Container during the playback.


      The code looks like that:

      //Marker 1: Add Bug Overlay
                  var bugUrlResource:URLResource = new URLResource( "assets/osmf_stacked.png" );
                  var bug:ImageElement = new ImageElement( bugUrlResource );
                  var layoutData:LayoutMetadata = new LayoutMetadata();
                  layoutData.right = 10;
                  layoutData.bottom = 10;
                  layoutData.scaleMode = ScaleMode.NONE;
                  bug.metadata.addValue( LayoutMetadata.LAYOUT_NAMESPACE, layoutData )
                  var bugLoadTrait:LoadTrait = bug.getTrait( MediaTraitType.LOAD ) as LoadTrait; 
                  container.addMediaElement( bug );
                  //Adds the container to the stage
                  this.addChild( container );




      I work in Flex where this.addChild(container) doesn't work. Instead, I  tried to add "bug" to to the UIComponent with  videoParent.addChild(bug).


      This doesn't work because the UIComponents only excepts objects if the type DisplayObject and not ImageElement.


      Any idea how to show a logo during the whole playtime on the top layer whithout using a CompositeElement?