Skip to main content
Participant
January 15, 2010
Question

DynamicStreamItem Issues

  • January 15, 2010
  • 1 reply
  • 729 views

Hello Everyone!

I followed Tom Green's example on using the FLVPlayback 2.5 components with the DynamicStreamItem class (http://www.adobe.com/devnet/flashmediaserver/articles/beginner_dynstream_fms.html) and I get these errors:

·         1119: Access of possibly undefined property uri through a reference with static type DynamicStreamItem.

·         1120: Access of undefined property myVideo

BUT, if I remove the DynamicStreamItem.as and DynamicStream.as files from the same folder that my FLA files live it works like a champ.  My next thought was maybe there's another DynamicStreamItem.as and DynamicStream.as somewhere on my PC, because it's pulling in the code from somewhere, right?  I did a search and saw that it also lives in the new FLVPlayback 2.5 component folder, C:\Program Files\Adobe\Adobe Flash CS4\Common\Configuration\Component Source\ActionScript 3.0\FLVPlayback\fl\video.  So I also delete that one for testing purposes, but it still compiled and worked perfectly.

I need to find out where the compiler is pulling this class from so I can alter it.  Also, if this is a problem the documentation on the web site needs to be updated.

Thanks in advance for all the help!

Eric

    This topic has been closed for replies.

    1 reply

    Participant
    February 4, 2010

    Thanks to Joseph Labrecque at Denver University and Tom Green at Humber Institute of Technology and Advanced Learning and for helping me figure out a couple issues I ran into while trying to figure this out: 

    1) The version of FLVPlayBack component that I downloaded (v2.5) comes with these functions already built in.  So, there’s no need to place the .as files in the root of your project.  If you want to customize the DynamicStreamItem and DynamicStream classes and still use the FLVPlayBack 2.5 (more specifically the play2 method) you will need to place the two .as files in a folder within the root of your project like this,


    projectRoot\fl\video\

    Then, you will need to import the files like this in your code:

    import fl.video.*;

    That should allow you to modify these classes.  I personally haven’t done it yet, but will give it a go soon.

    2) Apparently the version of DynamicStreamItem (v1.1.0.6) that I downloaded from Adobe.com didn't have the uri member defined in the DynamicStreamItem.as.  If you get this error in Flash CS4 while compiling, then you have the same problem:

    ERROR - 1119: Access of possibly undefined property uri through a reference with static type fl.video:DynamicStreamItem.

    The fix?  Open up your DynamicStreamItem.as class and insert this line of code:

    public var uri:String;

    I don’t think the order of the variables matter, but mine is right after the variable startRate.

    This has me fixed up for now.  It would be great if someone could update the tutorial on the web.  I know I can't be the only one out there who has run into this problem.

    Eric