Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I am trying to use youtube video inside adobe flex. I have added the video to the canvas but i cannot fix the size of the video. It is also render in full width and height. Below is my code.
- <mx:Canvas width="380" height="250" id="uplayer" />
- public function init(){
- _uic = UIComponent(uplayer.addChild (new UIComponent ()));
- _uic.width = 380;
- _uic.width = 250;
- _loader = new Loader();
- _loader.contentLoaderInfo.addEventListener(Event.INIT, onLoadInit);
- var request:URLRequest = new URLRequest("http://www.youtube.com/v/2030agUM_JY?version=2&autoplay=1&fs=0&hd=1");
- _loader.load(request);
- }
- private function onLoadInit(event:Event):void {
- _player = _loader.content;
- _playerObject = _player as DisplayObject;
- //_playerObject.addEventListener("jwplayerReady", onPlayerReady);
- // RootReference.root = _playerObject.root;
- _uic.addChild(_loader);
- _uic.width = 380;
- _uic.width = 250;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement