4 Replies Latest reply on Apr 22, 2008 12:55 PM by wangal

    Catch VideoError exception?

    wangal
      Is there a way to catch VideoError exceptions thrown by the VideoDisplay class? I've tried wrapping it in try/catch, but it seems to be thrown asynchronously, via a callLater().

      For example, here's the code I'm trying:

      videoDisplay.source = 'asdf';
      videoDisplay.load();
      videoDisplay.play();

      And here's the RTE that results:
      Error: 1000: Unable to make connection to server or to find FLV on server.
      at mx.controls.videoClasses::VideoPlayer/play()
      at mx.controls::VideoDisplay/play()
      at mx.controls::VideoDisplay/autoPlaying()
      at mx.controls::VideoDisplay/creationCompleteHandler()
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/dispatchEvent()
      at mx.core::UIComponent/set initialized()
      at mx.managers::LayoutManager/doPhasedInstantiation()
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.core::UIComponent/callLaterDispatcher2()
      at mx.core::UIComponent/callLaterDispatcher()

      I'm using Flex 3 3.0.0.477.
      Thanks!