1 Reply Latest reply on Mar 3, 2008 3:13 AM by Pop_Clingwrap

    Video class props not recognised

      I am building a video player using AS2 and publishing for V7. I have a video object (which is strong typed as Video in my classes) on the stage and am using NetStream and NetConnection to play an external FLV through it. I have also built a progress bar and in order to make this as reusable as possible I want it to set itself to the width of the video object and this is where my problem arises.
      If I call videoObj.width it returns 0 and as I need the video object width not the encoded FLV width this would not do anyway.
      If I call videoObj._width I get back the correct width but I also get the error message "There is no property with the name '_width'. This is also the case with _x, _y, _alpha etc. I can get and set the properties but I always get this error despite them being listed as properties of the Video class.

      As the error does not seem to impact the way things actually work I could just ignore it but I would like to understand whats going on here so... any thoughts?

      Cheers all
        • 1. Re: Video class props not recognised
          Pop_Clingwrap Level 1
          Just found a possibly related issue.
          In my ProgressBar class I reference a clip with a subclip called handle and get it to call a method of ProgressBar:
          clip.handle,onEnterFrame = updateHandle;

          the method is defined like this:
          private function updateHandle():Void
          this._x += 1;

          This runs fine as 'this' refers to clip.handle but the compiler looks for _x within the class ProgressBar and when it doesnt find it it throws the error. If i define _x in the class the error is gone:
          private var _x:Number;//This is never used. It is here to stop a compile time error.

          I havnt managed to clear my original error like this yet but it seems to be the same type of thing.