1 Reply Latest reply on Aug 30, 2010 6:07 AM by schreiter

    swf dimensions

    schreiter

      Hi,

       

      i'm trying to play an swf animation with osmf.

      how can i control the swfs dimensions.

      the swf is displayed but is scaled weirdly.

       

      var swf:SWFElement = new SWFElement(new URLResource("test.swf"));
                 
                  var layout:LayoutMetadata = new LayoutMetadata();
                  layout.width = 640;
                  layout.height = 360;
                  layout.scaleMode = ScaleMode.NONE;
                 
                  swf.addMetadata(LayoutMetadata.LAYOUT_NAMESPACE, layout);
                 
                  container.addMediaElement(swf);
                 
                  mediaPlayer = new MediaPlayer();
                  mediaPlayer.autoPlay = true;         
                  mediaPlayer.media = swf;
                  mediaPlayer.addEventListener(MediaErrorEvent.MEDIA_ERROR, onMediaError);

       

      greets

      vincent