Hola amigos, espero que me puedan ayudar en un tema en el que ando muy perdido, tengo este codigo:
package
{
import flash.display.*;
import flash.events.*;
import flash.net.*;
import mx.core.*;
import mx.events.*;
import mx.styles.*;
public class uTubeFlvUrlFetch extends Application
{
private var loader:Loader;
public var _bindingsByDestination:Object;
private var _documentDescriptor_:UIComponentDescriptor;
public var _bindingsBeginWithWord:Object;
private var receiver:DynamicLocalConnection;
private var sender:LocalConnection;
private var videoData:Object;
static var _uTubeFlvUrlFetch_StylesInit_done:Boolean = false;
public function uTubeFlvUrlFetch()
{
_documentDescriptor_ = new UIComponentDescriptor({type:Application});
videoData = new Object();
mx_internal::_document = this;
.mx_internal::_uTubeFlvUrlFetch_StylesInit();
this.layout = "absolute";
this.addEventListener("initialize", ___Application1_initialize);
return;
}// end function
function _uTubeFlvUrlFetch_StylesInit() : void
{
var _loc_1:CSSStyleDeclaration;
var _loc_2:Array;
if (mx_internal::_uTubeFlvUrlFetch_StylesInit_done)
{
return;
}// end if
mx_internal::_uTubeFlvUrlFetch_StylesInit_done = true;
var _loc_3:* = StyleManager;
_loc_3.mx_internal::initProtoChainRoots();
return;
}// end function
public function ___Application1_initialize(param1:FlexEvent) : void
{
uTubeFlvUrlGrabber();
return;
}// end function
public function uTubeFlvUrlGrabber() : void
{
var handlerLoaderInit:Function;
handlerLoaderInit =
function (param1:Event) : void
{
var _loc_2:URLVariables;
var _loc_3:String;
_loc_2 = new URLVariables();
_loc_2.decode(loader.contentLoaderInfo.url.split(" ?")[1]);
_loc_3 = _loc_2.video_id + ", " + _loc_2.iurl + ", " + "http://www.youtube.com/get_video.php?" + "video_id=" + _loc_2.video_id + "&t=" + _loc_2.t;
sender.send("_setUTFLVURL", "returnData", _loc_3);
return;
}// end function
;
receiver = new DynamicLocalConnection();
sender = new LocalConnection();
receiver.connect("_getUTFLVURL");
receiver.fetch =
function (param1:String) : void
{
var _loc_2:Array;
var _loc_3:String;
var _loc_4:URLRequest;
_loc_2 = new Array();
loader = new Loader();
_loc_2 = param1.split("=");
_loc_3 = "http://www.youtube.com/v/" + _loc_2[_loc_2.length--];
_loc_4 = new URLRequest(_loc_3);
loader.contentLoaderInfo.addEventListener(Event.IN IT, handlerLoaderInit);
loader.load(_loc_4);
return;
}// end function
;
return;
}// end function
override public function initialize() : void
{
.mx_internal::setDocumentDescriptor(_documentDescr iptor_);
super.initialize();
return;
}// end function
}
}
y se supone que tiene que construirme una FLV de youtube pero no lo hace bien, hay algun fallo o esto esta bien hecho?
Saludos