2 Replies Latest reply: Dec 5, 2011 3:24 AM by SteveRicketts RSS

    Coercion failed on URLResource, why?

    SteveRicketts Community Member

      I was just starting to use the OSMF media player with FB 4.5.1 and ran into a problem.  It worked on the first program I tried so I put it into a second project, using the same URL and I get the error #1034.  My code looks like:



      hmps = new MediaPlayerSprite();

      hostVideoUI = new UIComponent();

      hostVideoUI.width = 192;

      hostVideoUI.height = 144;

      hostVideoUI.x = 10;

      hostVideoUI.y = 3;




      var src:String = "rtmp://server/eTutor/128_316_1_1871_8_24_2011_10_02_22_AM/LS1";


      hmps.resource = URLResource(src); <- "Coercion failed: cannot convert "rtmp://server/eTutor/128_316_1_1871_8_24_2011_10_02_22_AM/LS1" to org.osmf.media.URLResource"


      Does anyone know what this is or what I'm doing wrong?