0 Replies Latest reply on Aug 10, 2011 3:47 PM by 335098

    Can't add a mediaContainer to the stage in AIR


      Im trying to do a hello-world type application in AIR using OSMF, but for some reason when it comes to appending the container to the stage, I get an error :

      Implicit coercion of a value of type org.osmf.containers:MediaContainer to an unrelated type mx.core:IVisualElement.


      Here is the code :


                      var videoElement:VideoElement = new VideoElement(new URLResource("http://mediapm.edgesuite.net/osmf/content/test/manifest-files/dynamic_Streaming.f4m"));
                      var mediaPlayer:MediaPlayer = new MediaPlayer();
                      mediaPlayer.media = videoElement;
                      var mediaContainer:MediaContainer = new MediaContainer();



      it throws an error on the last line. Ofc I have tried addElement and addChild, they both fail in the same way.

      What am I missing ?