Here is my code I am working with.
It seems to be working fine, But my problem is when i change scenes the audio dosent stop, and when I go back to the scene the video is stoped and can be restarted, ( the old sound from the video still playing)Code:Security.allowDomain("www.youtube.com"); var my_player1:Object; var my_loader1:Loader = new Loader(); my_loader1.load(new URLRequest("http://www.youtube.com/apiplayer?version=3")); my_loader1.contentLoaderInfo.addEventListener(Event.INIT, onLoaderInit); function onLoaderInit(e:Event):void{ addChild(my_loader1); my_player1 = my_loader1.content; my_player1.addEventListener("onReady", onPlayerReady); } function onPlayerReady(e:Event):void{ my_player1.setSize(410,410); my_player1.cueVideoById("_OBlgSz8sSM",0); } pause_btn1.addEventListener(MouseEvent.CLICK, pauseVid); function pauseVid(e:MouseEvent):void { my_player1.pauseVideo(); }
Just not sure how to stop the sound once you leave the page.
Any help is awesome, Thanks!
Edit: Also, I have a external Pause button to stop the video...
But I was wondering if it is possible to make the youtube default bar at the bottom appear?
With the Loader bar, pause play, sound, full screen etc.


Reply With Quote