Ver Mensaje Individual
  #3 (permalink)  
Antiguo 31/08/2012, 07:28
moro666
 
Fecha de Ingreso: mayo-2011
Mensajes: 214
Antigüedad: 13 años, 9 meses
Puntos: 16
Respuesta: Descargar un video dentro de un swf dentro de un <object>???

Joer, que no cabe en una parte....
Código Swf:
Ver original
  1. private function removeListeners() : void
  2.         {
  3.             this._playerLoader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, this.progressHandler);
  4.             this._playerLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, this.completeHandler);
  5.             this._playerLoader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, this.errorHandler);
  6.             this._playerLoader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, this.errorHandler);
  7.             return;
  8.         }// end function
  9.  
  10.         private function onPlayerLoadInit(param1:Event) : void
  11.         {
  12.             var _loc_2:* = getDefinitionByName("com.brightcove.player.Main") as Class;
  13.             this._player = new _loc_2;
  14.             addChild(this._player as Sprite);
  15.             this._flashVars.playerDirectory = Object(this._playerLoader.content).playerDirectory;
  16.             return;
  17.         }// end function
  18.  
  19.         private function initializeUniqueSWFIdentifier() : void
  20.         {
  21.             this._cookieContents = this.getBandwidthCookie();
  22.             if (!this._cookieContents)
  23.             {
  24.                 this._flashVars.uniqueSWFIdentifier = new Date().getTime() + Math.ceil(Math.random() * 10000);
  25.             }
  26.             else if (this._cookieContents)
  27.             {
  28.                 this._flashVars.uniqueSWFIdentifier = this._cookieContents[0];
  29.                 this._flashVars.bandwidth = this._cookieContents[1];
  30.                 this._flashVars.cookieComments.push("Bandwidth loaded from cookie: " + this._flashVars.bandwidth + " Kbps");
  31.             }// end else if
  32.             return;
  33.         }// end function
  34.  
  35.         public function getModule(param1:String) : Object
  36.         {
  37.             return this._player.getModule(param1);
  38.         }// end function
  39.  
  40.         public function getModules() : Array
  41.         {
  42.             return this._player.getModules();
  43.         }// end function
  44.  
  45.         public function getBandwidthCookie() : Array
  46.         {
  47.             var cookieJar:Array;
  48.             var bcCookieComponents:Array;
  49.             var cookieDocument:String;
  50.             var cookie:String;
  51.             var cookieGrab:String;
  52.             try
  53.             {
  54.                 if (ExternalInterface.available)
  55.                 {
  56.                     cookieDocument = ExternalInterface.call(cookieGrab);
  57.                     if (cookieDocument)
  58.                     {
  59.                         cookieJar = cookieDocument.split(";");
  60.                         var _loc_2:int;
  61.                         var _loc_3:* = cookieJar;
  62.                         while (_loc_3 in _loc_2)
  63.                         {
  64.                             // label
  65.                             cookie = _loc_3[_loc_2];
  66.                             if (cookie.indexOf(this._cookieName + "=") != -1)
  67.                             {
  68.                                 if (cookie.indexOf("X") != -1)
  69.                                 {
  70.                                     bcCookieComponents = cookie.split("X");
  71.                                 }
  72.                                 else
  73.                                 {
  74.                                     bcCookieComponents = cookie.split(",");
  75.                                 }// end else if
  76.                                 bcCookieComponents[0] = bcCookieComponents[0].substring(this._cookieName.length + 2);
  77.                                 if (bcCookieComponents[0] == "" || bcCookieComponents[1] == "")
  78.                                 {
  79.                                     this._flashVars.cookieComments.push("Error loading bandwidth cookie: corrupt cookie string.");
  80.                                     return null;
  81.                                 }// end if
  82.                                 if (int(bcCookieComponents[1]) == 0)
  83.                                 {
  84.                                     this._flashVars.cookieComments.push("Error using bandwidth cookie: bandwidth value is 0 in cookie.");
  85.                                     return null;
  86.                                 }// end if
  87.                                 break;
  88.                             }// end if
  89.                         }// end while
  90.                         if (bcCookieComponents == null)
  91.                         {
  92.                             this._flashVars.cookieComments.push("Bandwidth cookie was not found.");
  93.                         }// end if
  94.                     }
  95.                     else
  96.                     {
  97.                         this._flashVars.cookieComments.push("Bandwidth cookie could not be found: unable to access the cookie document.");
  98.                     }// end else if
  99.                 }
  100.                 else
  101.                 {
  102.                     this._flashVars.cookieComments.push("Bandwidth cookie could not be found: ExternalInterface is disabled.");
  103.                 }// end else if
  104.             }// end try
  105.             catch (e:Error)
  106.             {
  107.                 _flashVars.cookieComments.push("Bandwidth cookie could not be found: " + e.getStackTrace());
  108.             }// end catch
  109.             return bcCookieComponents;
  110.         }// end function
  111.  
  112.     }
  113. }