2 Replies Latest reply on Nov 5, 2009 3:58 PM by Mr Binitie

    MediaPlayerSprite does not clear Image when in Series with a SWF

    Mr Binitie

      I created a series of media elements, an image timed with a TemporalProxyElement and a SWF

      The image loads and it seems almost immdiately the SWF loads but, it is hidden behind the image and the image does not clear after the set time.

      Here is the code:

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                      layout="absolute" width="970" height="500"
                      applicationComplete="{aggregateStuff()}">

       

          <mx:Script>
              <![CDATA[
                  import flash.display.Sprite;
                  import flash.events.NetStatusEvent;

       

                  import org.openvideoplayer.display.*;
                  import org.openvideoplayer.events.LoadableStateChangeEvent;
                  import org.openvideoplayer.media.URLResource;
                  import org.openvideoplayer.net.NetLoadedContext;
                  import org.openvideoplayer.net.NetLoader;
                  import org.openvideoplayer.traits.ILoadable;
                  import org.openvideoplayer.traits.LoadState;
                  import org.openvideoplayer.traits.MediaTraitType;
                  import org.openvideoplayer.utils.FMSURL;
                  import org.openvideoplayer.video.VideoElement;
                  import org.openvideoplayer.composition.*;
                  import org.openvideoplayer.swf.*
                  import org.openvideoplayer.media.URLResource;
                  import org.openvideoplayer.utils.URL;
                  import org.openvideoplayer.net.dynamicstreaming.*;
                  import org.openvideoplayer.proxies.*;
                  import org.openvideoplayer.image.*
                 
              public function aggregateStuff():void
              {
                  stage.scaleMode=StageScaleMode.NO_SCALE;
                  stage.align=StageAlign.TOP_LEFT;
                 
                      var sprite:MediaPlayerSprite = new MediaPlayerSprite();
                      rawChildren.addChild(sprite);
                      //sprite.width = 800                   
                      //sprite.height=370;
                      sprite.scaleMode=ScaleMode.STRETCH;

       

                  // Create new Serial element
                  var serialElement:SerialElement=new SerialElement();
                  serialElement.addChild(new TemporalProxyElement(2, new ImageElement(new ImageLoader(), new URLResource(new URL(REMOTE_SLIDESHOW_IMAGE1)))));
                  serialElement.addChild(new SWFElement(new SWFLoader(), new URLResource(new URL(REMOTE_SWF))));
                  sprite.element=serialElement;
              }

       


              ]]>
          </mx:Script>
      </mx:Application>