Playback starts YouTube’s embedded player (privacy-enhanced mode).
Embed YouTube videos in Flash using AS3.0 - Flash Tutorials
ChannelVerkkoNetDescription from the creator
In this video lesson, you can learn how to play youtube video using AS3.0 and API (Application Programming Interface)
Website: samsolomonprabu.com/
Here's the source code:
----------------------------
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.ui.MouseCursor;
Security.allowDomain("www.youtube.com");
var player:Object;
var loader:Loader = new Loader();
loader.load(new URLRequest("youtube.com/apiplayer?vers...
loader.contentLoaderInfo.addEventListener(Event.INIT, onInit);
function onInit(e:Event):void{
addChild(loader);
player = loader.content;
player.addEventListener("onReady",onPlayerReady);
}
function onPlayerReady(e:Event):void{
player.setSize(640,360);
player.loadVideoById("NBRqUqilRfY",0);
}
btnPlay.addEventListener(MouseEvent.CLICK, playVid);
function playVid(e:MouseEvent):void{
player.playVideo();
}
btnPause.addEventListener(MouseEvent.CLICK, pauseVid);
function pauseVid(e:MouseEvent):void{
player.pauseVideo();
}
btnStop.addEventListener(MouseEvent.CLICK, stopVid);
function stopVid(e:MouseEvent):void{
player.stopVideo();
}
btnMute.addEventListener(MouseEvent.CLICK, muteVid);
function muteVid(e:MouseEvent):void{
player.mute();
}
btnUnmute.addEventListener(MouseEvent.CLICK, UnmuteVid);
function UnmuteVid(e:MouseEvent):void{
player.unMute();
}
Website: samsolomonprabu.com/
Here's the source code:
----------------------------
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.ui.MouseCursor;
Security.allowDomain("www.youtube.com");
var player:Object;
var loader:Loader = new Loader();
loader.load(new URLRequest("youtube.com/apiplayer?vers...
loader.contentLoaderInfo.addEventListener(Event.INIT, onInit);
function onInit(e:Event):void{
addChild(loader);
player = loader.content;
player.addEventListener("onReady",onPlayerReady);
}
function onPlayerReady(e:Event):void{
player.setSize(640,360);
player.loadVideoById("NBRqUqilRfY",0);
}
btnPlay.addEventListener(MouseEvent.CLICK, playVid);
function playVid(e:MouseEvent):void{
player.playVideo();
}
btnPause.addEventListener(MouseEvent.CLICK, pauseVid);
function pauseVid(e:MouseEvent):void{
player.pauseVideo();
}
btnStop.addEventListener(MouseEvent.CLICK, stopVid);
function stopVid(e:MouseEvent):void{
player.stopVideo();
}
btnMute.addEventListener(MouseEvent.CLICK, muteVid);
function muteVid(e:MouseEvent):void{
player.mute();
}
btnUnmute.addEventListener(MouseEvent.CLICK, UnmuteVid);
function UnmuteVid(e:MouseEvent):void{
player.unMute();
}
About this tutorial
VerkkoNet published this 11:15 video tutorial on November 1, 2015. It has been watched 9,391 times on YouTube.
- Channel
- VerkkoNet
- Category
- People & Blogs
- Duration
- 11:15
- Published
- November 1, 2015
- Views
- 9,391
- Likes
- 48
Tags
Share
This tutorial in other languages
- FRIntégrer des vidéos YouTube dans Flash en utilisant AS3.0 - Tutoriels flash
- ESCómo insertar vídeos de YouTube en Flash usando AS3.0 - Flash Tutoriales
- PTIncorporar vídeos do YouTube no Flash usando AS3.0 - Flash Tutoriais
- ITVideo embed di YouTube in Flash utilizzando AS3.0 - Flash Tutorial
- DEEinbetten von YouTube-Videos in Flash mit AS3.0 - Flash-Tutorials
- NLIntegreer YouTube-video's in Flash met behulp van AS3.0 - Flash Tutorials
- RUвидео Вставить YouTube в флэш с помощью AS3.0 - Флэш Уроки
- PLOsadzanie filmów YouTube w Flash - Flash z użyciem AS3.0 Poradniki
- JAAS3.0を使用してFlashに埋め込むYouTubeの動画 - フラッシュチュートリアル
- ARأشرطة الفيديو تضمين يوتيوب في فلاش باستخدام AS3.0 - فلاش دروس
- HIAS3.0 का उपयोग कर फ़्लैश में एम्बेड यूट्यूब वीडियो - फ्लैश ट्यूटोरियल
- IDvideo embed YouTube di Flash menggunakan AS3.0 - Tutorial Flash