Skip navigation
Currently Being Moderated

Coercion failed on URLResource, why?

Dec 4, 2011 1:43 PM

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;

addElement(hostVideoUI);

hostVideoUI.addChild(hmps);

 

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?

 
Replies
  • Currently Being Moderated
    Dec 5, 2011 1:03 AM   in reply to SteveRicketts

    Hi,

     

    I don't think that a static initialization will work. what about "new URLResource(...." ?

     

    S

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points