0 Replies Latest reply on Jan 2, 2008 9:37 AM by Ukie_239

    Catch Video Source Error

    Ukie_239
      I want to have a heck to see if the video source does exists. I am trying to catch an error on the play() event of the video Object. Right now, it seems to try to play the object, and gives me back an error. I have tried dozens of different catches on the error.

      How can i catch the error once it tries to play the video, eventhough the video source is set but is not valid. (I guess another way is how can i check if the video source is valid)?

      mediaPlayer_vd.source = e.target.mediaFolder + e.target.mediaUrl
      try {
      mediaPlayer_vd.play();
      if (this.mediaPlayer_vd.state == "connectionError") {
      Alert.show("Media Source Sample Not Found", "File Not Found");
      dispatchEvent(new Event("destroyMediaE", true, true));
      dispatchEvent(new Event("enableListE", true, false));
      }
      } catch (e:*) {
      Alert.show("Media Source Sample Not Found", "File Not Found");
      dispatchEvent(new Event("destroyMediaE", true, true));
      dispatchEvent(new Event("enableListE", true, false));

      }


      Thanks