     }
 
     private function throwError(code: int, description: String): void {
-      var onError: String = loaderInfo.parameters.onError;
-      if (allow(onError)) {
-        ExternalInterface.call(onError, code, description);
+      if (callbackId) {
+        ExternalInterface.call(callback("onError"), code, description);
       }
     }
 


  [SWF(backgroundColor="0x000000")]
  public class Player extends Sprite {

    private var posterUrl: String;
    private var videoUrl: String;


      loadVideo();

      if (allow(loaderInfo.parameters.callbackId)) {
        callbackId = loaderInfo.parameters.callbackId;
      }

      if (callbackId) {
        ExternalInterface.call(callback("onReady"));
      }
    }

    private function callback(name: String): String {
      return ["divinePlayer", name, callbackId].join("_");
    }

    private function allow(callbackId: String): Boolean {
      return /^[0-9]+$/i.test(callbackId);
    }

    private function play(): void {
