Redscrapbook
asked on
Playing YouTube Videos In Flash Using ActionScript 3.0: Security Sandbox Violation
I've been working on Give Blood Awareness program a year ago. It is on YouTube. I've included a YouTube video clip as a portfolio. The sample of a YouTube video: http://youtu.be/GdO7CIo7jIA I've tried it and it worked as external SWF file.
However, I read the compiler error as below:
*** Security Sandbox Violation ***
SecurityDomain 'http://s.ytimg.com/yt/swfbin/apiplayer3-vflG5ATnH.swf' tried to access incompatible context 'file:////Volumes/LaCie/Fl ash/Report /youtube.s wf'
For your information I've used a tutorial www.republicofcode.com/tutorials/flash/as3youtube/ to achieve a YouTube plugin connection.
However, I read the compiler error as below:
*** Security Sandbox Violation ***
SecurityDomain 'http://s.ytimg.com/yt/swfbin/apiplayer3-vflG5ATnH.swf' tried to access incompatible context 'file:////Volumes/LaCie/Fl
For your information I've used a tutorial www.republicofcode.com/tutorials/flash/as3youtube/ to achieve a YouTube plugin connection.
Security.allowDomain("www.youtube.com");
var my_player:Object;
var my_loader:Loader = new Loader();
my_loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3"));
my_loader.contentLoaderInfo.addEventListener(Event.INIT, onLoaderInit);
function onLoaderInit(e:Event):void{
addChild(my_loader);
my_player = my_loader.content;
my_player.addEventListener("onReady", onPlayerReady);
}
function onPlayerReady(e:Event):void{
my_player.setSize(640,360);
my_player.loadVideoById("GdO7CIo7jIA",0);
}
play_btn.addEventListener(MouseEvent.CLICK, playVid);
function playVid(e:MouseEvent):void {
my_player.playVideo();
}
pause_btn.addEventListener(MouseEvent.CLICK, pauseVid);
function pauseVid(e:MouseEvent):void {
my_player.pauseVideo();
}
Accessing local files in a web application is a security violation in all browsers and apparently in the image player also. To make it work locally, you would have to load the player locally.
ASKER
Load the player locallyCan you clarify please?
"http://s.ytimg.com/yt/swfbin/apiplayer3-vflG5ATnH.swf%27" is being loaded from the web. Save a copy to your server, preferably where the FLV is, and load it from there. Then it will be in the same domain and not a security violation.
ASKER
All I see is a black screen with UTube logo on bottom right corner after download as screengrab as below? Can you re-send please or zip it if is possible, I appreciate it?
Screen-shot-2011-12-24-at-18.56..png
Screen-shot-2011-12-24-at-18.56..png
ASKER
How do I save a copy to my server, my right click doesn't do anything either, please advise?
ASKER
I've managed to download apiplayer3-vflG5ATnH.swf with a black screen and YouTube logo as above.
And a screen still look as black blank screen. With code as below. have I missed something?
And a screen still look as black blank screen. With code as below. have I missed something?
Security.allowDomain("www.youtube.com");
var my_player:Object;
var my_loader:Loader = new Loader();
my_loader.load(new URLRequest("apiplayer3-vflG5ATnH.swf"));
my_loader.contentLoaderInfo.addEventListener(Event.INIT, onLoaderInit);
function onLoaderInit(e:Event):void{
addChild(my_loader);
my_player = my_loader.content;
my_player.addEventListener("onReady", onPlayerReady);
}
function onPlayerReady(e:Event):void{
my_player.setSize(640,360);
my_player.loadVideoById("GdO7CIo7jIA",0);
}
play_btn.addEventListener(MouseEvent.CLICK, playVid);
function playVid(e:MouseEvent):void {
my_player.playVideo();
}
pause_btn.addEventListener(MouseEvent.CLICK, pauseVid);
function pauseVid(e:MouseEvent):void {
my_player.pauseVideo();
}
This Security.allowDomain("www.youtube.com"); needs to be changed. Try 'localhost'. Maybe try removing it.
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001490.html
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001490.html
Redscrapbook,
Add your root drive "/" or "/Volumes" to trust location and run application again
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
Add your root drive "/" or "/Volumes" to trust location and run application again
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
ASKER
I've a new code straight off from YouTube Loading the player SWF:
http://code.google.com/apis/youtube/flash_api_reference.html#Standalone_sample
I've tried
Security.allowDomain("ww.y outube.com ");
Security.allowDomain("/Vol umes");
Security.allowDomain("/");
I still get this error and it is still throwing up...
Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL: file:////Volumes/LaCie/Fla sh/Report/ loader.loa d
*** Security Sandbox Violation ***
SecurityDomain 'http://s.ytimg.com/yt/swfbin/apiplayer3-vfl_XoZIW.swf' tried to access incompatible context 'file:////Volumes/LaCie/Fl ash/Report /youtube%5 Fgiveblood 2.swf'
Am I missing a plugin or server, I read that some may need yt.swf? Whatever that mean?
I've searched on the internet and it is forever so secretive...
I read YouTube title page: YouTube ActionScript 3.0 Player API Reference.
Is it anything to do with API with my problem?
http://code.google.com/apis/youtube/flash_api_reference.html#Standalone_sample
I've tried
Security.allowDomain("ww.y
Security.allowDomain("/Vol
Security.allowDomain("/");
I still get this error and it is still throwing up...
Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL: file:////Volumes/LaCie/Fla
*** Security Sandbox Violation ***
SecurityDomain 'http://s.ytimg.com/yt/swfbin/apiplayer3-vfl_XoZIW.swf' tried to access incompatible context 'file:////Volumes/LaCie/Fl
Am I missing a plugin or server, I read that some may need yt.swf? Whatever that mean?
I've searched on the internet and it is forever so secretive...
I read YouTube title page: YouTube ActionScript 3.0 Player API Reference.
Is it anything to do with API with my problem?
// The player SWF file on www.youtube.com needs to communicate with your host
// SWF file. Your code must call Security.allowDomain() to allow this
// communication.
Security.allowDomain("/");
// This will hold the API player instance once it is initialized.
var player:Object;
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, onLoaderInit);
loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3"));
function onLoaderInit(event:Event):void {
addChild(loader);
loader.content.addEventListener("onReady", onPlayerReady);
loader.content.addEventListener("onError", onPlayerError);
loader.content.addEventListener("onStateChange", onPlayerStateChange);
loader.content.addEventListener("onPlaybackQualityChange",
onVideoPlaybackQualityChange);
}
function onPlayerReady(event:Event):void {
// Event.data contains the event parameter, which is the Player API ID
trace("player ready:", Object(event).data);
// Once this event has been dispatched by the player, we can use
// cueVideoById, loadVideoById, cueVideoByUrl and loadVideoByUrl
// to load a particular YouTube video.
player = loader.content;
// Set appropriate player dimensions for your application
player.setSize(640, 360);
player.loadVideoById("GdO7CIo7jIA",0);
}
function onPlayerError(event:Event):void {
// Event.data contains the event parameter, which is the error code
trace("player error:", Object(event).data);
}
function onPlayerStateChange(event:Event):void {
// Event.data contains the event parameter, which is the new player state
trace("player state:", Object(event).data);
}
function onVideoPlaybackQualityChange(event:Event):void {
// Event.data contains the event parameter, which is the new video quality
trace("video quality:", Object(event).data);
}
ASKER
Update:
I've sorted the Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL: file:////Volumes/LaCie/Fla sh/Report/ my_loader.load
by removing the my_loader.load on property > source > my_loader.load
as long a Ul container is still there and it works.
But, I still get this...
*** Security Sandbox Violation ***
SecurityDomain 'http://s.ytimg.com/yt/swfbin/apiplayer3-vfl_XoZIW.swf' tried to access incompatible context 'file:////Volumes/LaCie/Fl ash/Report /youtube%5 Fgiveblood 2.swf'
I've updated Adobe Flash Player to 10.3 after reading on YouTube site that min is Flash Player 10.1.
I've this already and upgraded it anyway. It doesn't do anything.
I think it is something to do with tried to access incompatible context, can you find anything on this.
Perhaps a correct apiplayer3.
I'm trying to find what is apiplayer3?
I've sorted the Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL: file:////Volumes/LaCie/Fla
by removing the my_loader.load on property > source > my_loader.load
as long a Ul container is still there and it works.
But, I still get this...
*** Security Sandbox Violation ***
SecurityDomain 'http://s.ytimg.com/yt/swfbin/apiplayer3-vfl_XoZIW.swf' tried to access incompatible context 'file:////Volumes/LaCie/Fl
I've updated Adobe Flash Player to 10.3 after reading on YouTube site that min is Flash Player 10.1.
I've this already and upgraded it anyway. It doesn't do anything.
I think it is something to do with tried to access incompatible context, can you find anything on this.
Perhaps a correct apiplayer3.
I'm trying to find what is apiplayer3?
ASKER
I've download apiplayer3-vflG5ATnH.swf and used it on a same file where flash is. It still throw up *** Security Sandbox Violation ***
loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3"));
Are you loading movie from other domain?
If you want to avoid such errors you have to upload FLV file on your server and load remotely from the same domain
If you want to avoid such errors you have to upload FLV file on your server and load remotely from the same domain
ASKER
Thank you for your reply. I'm working from local host: offline that is my laptop.
The final result will on a DVD so it is not going to be online...the internet will be on for YouTube video.
I'm loading a movie from other domain that is http://youtu.be/GdO7CIo7jIA using ID on YouTube video.
And this will be loaded too as long the internet connection is on for loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3"));.
So that mean I'll have to upload the lot on to the server and load remotely from the same domain?
How can I load remotely from the same domain if I've Youtube and loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3")); from a different domain?
If that is all it stakes to get it working if I've a the lot on a same domain? Please advise?
The final result will on a DVD so it is not going to be online...the internet will be on for YouTube video.
I'm loading a movie from other domain that is http://youtu.be/GdO7CIo7jIA using ID on YouTube video.
And this will be loaded too as long the internet connection is on for loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3"));.
So that mean I'll have to upload the lot on to the server and load remotely from the same domain?
How can I load remotely from the same domain if I've Youtube and loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3")); from a different domain?
If that is all it stakes to get it working if I've a the lot on a same domain? Please advise?
loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3"));
HI Redscrapbook,
You shouldn't get problem running your application on local machine and test files from hard drive or DVD when you will add a security exception
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
But I cannot guaranteed that same application will work on your host because Flash Player rejecting cross domain communication if crossdomain.xml file is missing on the remote host
You shouldn't get problem running your application on local machine and test files from hard drive or DVD when you will add a security exception
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
But I cannot guaranteed that same application will work on your host because Flash Player rejecting cross domain communication if crossdomain.xml file is missing on the remote host
ASKER
Ah, what is crossdomain.xml file? Am I missing something?
http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html
http://gdata.youtube.com/crossdomain.xml
By the way if you want to load video via youtube you must use Youtube ActionScript API
http://blog.martinlegris.com/2008/02/12/youtube-data-api-actionscript-3/
http://gdata.youtube.com/crossdomain.xml
By the way if you want to load video via youtube you must use Youtube ActionScript API
http://blog.martinlegris.com/2008/02/12/youtube-data-api-actionscript-3/
ASKER
Where do I find this...Global Security Settings panel?
Screen-shot-2012-01-18-at-01.22..png
Screen-shot-2012-01-18-at-01.22..png
Select "Always allow"
Click on combobox "Edit location..."
You will get "Add location" button add your root drive as trusted location or C:\ for windows and D:\ - DVD drive
Click on combobox "Edit location..."
You will get "Add location" button add your root drive as trusted location or C:\ for windows and D:\ - DVD drive
ASKER
I'm using mac not PC so I don't read anything like C:\ or D:\.
use "/'
ASKER
Ok what is combobox? I've seen it few days ago. This is not what I thought as Global Security Settings panel.
Is combobox for PC or Mac? Is there something for mac for Global Security Settings panel?
Is combobox for PC or Mac? Is there something for mac for Global Security Settings panel?
ComboBox is Drop Down Menu is the same
ASKER
Ok I've finally downloaded crossdomain.xml from
http://gdata.youtube.com/crossdomain.xml
After coming across this one by chance from thru Dgofan.
http://groups.google.com/group/youtube-api-gdata/browse_frm/thread/0ec60f8fd5e4848c/e56f2af2bb06b4d2?pli=1
Ok where so I use crossdomain.xml? I've tried on Property > Source. It did not work. Can you advise me where do i add crossdomain.xml?
http://gdata.youtube.com/crossdomain.xml
After coming across this one by chance from thru Dgofan.
http://groups.google.com/group/youtube-api-gdata/browse_frm/thread/0ec60f8fd5e4848c/e56f2af2bb06b4d2?pli=1
Ok where so I use crossdomain.xml? I've tried on Property > Source. It did not work. Can you advise me where do i add crossdomain.xml?
no,no,no
You cannot upload crossdomain.xml into Youtube server.
Ok, I found an example how you should request get video using Youtube API
http://www.zedia.net/2010/using-the-actionscript-3-youtube-api/
You cannot upload crossdomain.xml into Youtube server.
Ok, I found an example how you should request get video using Youtube API
http://www.zedia.net/2010/using-the-actionscript-3-youtube-api/
You can use existing youtube class
http://blog.agitcraft.com/2010/01/displaying-youtube-content-in-as3/
http://blog.agitcraft.com/2010/01/displaying-youtube-content-in-as3/
ASKER
This one worked...yippeee. At long long last!
from this http://blog.agitcraft.com/2010/01/displaying-youtube-content-in-as3/
and I've downloaded the Download AS3 YouTube Classes
I need to modify to fit the size 640 width x 360 height, please.
For your information I've tried http://www.zedia.net/2010/using-the-actionscript-3-youtube-api/
and returns as:
Scene 1, Layer 'ActionScript 3.0', Frame 1, Line 12 1037: Packages cannot be nested.
from this http://blog.agitcraft.com/2010/01/displaying-youtube-content-in-as3/
and I've downloaded the Download AS3 YouTube Classes
I need to modify to fit the size 640 width x 360 height, please.
For your information I've tried http://www.zedia.net/2010/using-the-actionscript-3-youtube-api/
and returns as:
Scene 1, Layer 'ActionScript 3.0', Frame 1, Line 12 1037: Packages cannot be nested.
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import com.agitcraft.youtube.*;
public class Main extends MovieClip {
private var _tube:YouTube;
public function Main() {
_init();
}
/*
public static const UNSTARTED:int = -1;
public static const ENDED:int = 0;
public static const PLAYING:int = 1;
public static const PAUSED:int = 2;
public static const BUFFERING:int = 3;
public static const VIDEO_CUED:int = 5;
*/
private function _stateHandle(e:YouTubeEvent):void {
trace("STATE CHANGE:",e.state);
switch (e.state) {
case YouTubeState.ENDED:
//_tube.seek(0);
//_tube.pause();
btn_play.visible = true;
btn_pause.visible = false;
_tube.removeEventListener(Event.ENTER_FRAME, _progUpdateHandle);
break;
case YouTubeState.PLAYING:
btn_play.visible = false;
btn_pause.visible = true;
_tube.addEventListener(Event.ENTER_FRAME, _progUpdateHandle, false, 0, true);
break;
case YouTubeState.PAUSED:
btn_play.visible = true;
btn_pause.visible = false;
_tube.removeEventListener(Event.ENTER_FRAME, _progUpdateHandle);
break;
}
}
private function _init():void {
_tube = new YouTube(true, "GdO7CIo7jIA");
_tube.addEventListener(YouTubeEvent.STATE_CHANGE, _stateHandle, false, 0, true);
//_tube.cueURL("http://www.youtube.com/v/-CsA1CcA4Z8", 0);
_tube.cueID("GdO7CIo7jIA");
addChildAt(_tube, 0);
_configButton(btn_play);
btn_play.addEventListener(MouseEvent.CLICK, _playbackClickHandle, false, 0, true);
_configButton(btn_pause);
btn_pause.addEventListener(MouseEvent.CLICK, _playbackClickHandle, false, 0, true);
btn_pause.visible = false;
_configButton(btn_mute_on);
btn_mute_on.addEventListener(MouseEvent.CLICK, _volClickHandle, false, 0, true);
btn_mute_on.visible = false;
_configButton(btn_mute_off);
btn_mute_off.addEventListener(MouseEvent.CLICK, _volClickHandle, false, 0, true);
}
private function _progUpdateHandle(e:Event):void {
indicator.scaleX = _tube.time / _tube.duration;
}
private function _playbackClickHandle(e:MouseEvent):void {
var targ:MovieClip = e.target as MovieClip;
if (targ == btn_play) {
_tube.play();
} else if (targ == btn_pause) {
_tube.pause();
}
}
private function _volClickHandle(e:MouseEvent):void {
var targ:MovieClip = e.target as MovieClip;
if (targ == btn_mute_on) {
_tube.volume = 1;
btn_mute_on.visible = false;
btn_mute_off.visible = true;
} else if (targ == btn_mute_off) {
_tube.volume = 0;
btn_mute_on.visible = true;
btn_mute_off.visible = false;
}
}
private function _configButton(btn:MovieClip):void {
btn.mouseChildren = false;
btn.buttonMode = true;
btn.useHandCursor = true;
btn.addEventListener(MouseEvent.MOUSE_OVER, _btnOverHandle, false, 0, true);
btn.addEventListener(MouseEvent.MOUSE_OUT, _btnOutHandle, false, 0, true);
addChild(btn);
}
private function _btnOverHandle(e:MouseEvent):void {}
private function _btnOutHandle(e:MouseEvent):void {}
}
}
Ok, Let go back to your code
I made small changes please tell me what's not working in this example:
I made small changes please tell me what's not working in this example:
Security.allowDomain("*");
var player:Object;
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, onLoaderInit);
loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3"));
addChild(loader);
function onLoaderInit(event:Event):void {
loader.content.addEventListener("onReady", onPlayerReady);
loader.content.addEventListener("onError", onPlayerError);
loader.content.addEventListener("onStateChange", onPlayerStateChange);
loader.content.addEventListener("onPlaybackQualityChange", onVideoPlaybackQualityChange);
}
function onPlayerReady(event:Event):void {
// Event.data contains the event parameter, which is the Player API ID
trace("player ready:", Object(event).data);
// Once this event has been dispatched by the player, we can use
// cueVideoById, loadVideoById, cueVideoByUrl and loadVideoByUrl
// to load a particular YouTube video.
player = loader.content;
// Set appropriate player dimensions for your application
player.setSize(640, 360);
player.loadVideoById("GdO7CIo7jIA",0);
}
function onPlayerError(event:Event):void {
// Event.data contains the event parameter, which is the error code
trace("player error:", Object(event).data);
}
function onPlayerStateChange(event:Event):void {
// Event.data contains the event parameter, which is the new player state
trace("player state:", Object(event).data);
}
function onVideoPlaybackQualityChange(event:Event):void {
// Event.data contains the event parameter, which is the new video quality
trace("video quality:", Object(event).data);
}
I ran on my machine working fine
ASKER
Thank you for taking your time to work this out and I appreciated it, dgofman.
It worked on a 1st SWF file and then I tried it on external SWF file with Security.allowDomain("*"); ,
it worked also perfect.
Third level external SWF file into homepage, there is a security issue.
To recap:
YouTube.SWF (with code as above)(It works) > YouTubePortfolio.SWF(with description)(It works) > YouTubeHomepage.SWF (Security issue).
Maybe I've to rethink of a container page on a homepage that 1st SWF file will go straight to homepage
along with workable YouTube.SWF file and external SWF file.
I already have one container page for portfolio slide in / out as external swf files.
It worked on a 1st SWF file and then I tried it on external SWF file with Security.allowDomain("*");
it worked also perfect.
Third level external SWF file into homepage, there is a security issue.
To recap:
YouTube.SWF (with code as above)(It works) > YouTubePortfolio.SWF(with description)(It works) > YouTubeHomepage.SWF (Security issue).
Maybe I've to rethink of a container page on a homepage that 1st SWF file will go straight to homepage
along with workable YouTube.SWF file and external SWF file.
I already have one container page for portfolio slide in / out as external swf files.
ASKER
I'm bringing forward a YouTube and putting on a portfolio page instead. It is not sitting on X Y
player.setSize(640, 360);
player.move(301, 81);
There must be something else that fit the same thing?
To recap:
YouTubePortfolio.SWF(with description)(It works) > YouTubeHomepage.SWF (Security issue).
Screen-shot-2012-01-18-at-09.20..png
player.setSize(640, 360);
player.move(301, 81);
There must be something else that fit the same thing?
To recap:
YouTubePortfolio.SWF(with description)(It works) > YouTubeHomepage.SWF (Security issue).
Screen-shot-2012-01-18-at-09.20..png
Please can you attach your FLA file save as CS4
ASKER
As attached: FLA File.
It would be great if if i've this swf file works and it can work as external swf file as well.
Thanks a million for looking at FLA file.
noScrollingBar-video-YouTube-all.fla
It would be great if if i've this swf file works and it can work as external swf file as well.
Thanks a million for looking at FLA file.
noScrollingBar-video-YouTube-all.fla
Oh my god,
Now I understood why it was not working you are adding into stage but expecting get on the middle where you dropped UILoader. If you want to use this component just give a name in the Property window: "uiloader"
And replace your ActionScript code with tiny implementation
Security.allowDomain("*");
uiloader.source = "http://www.youtube.com/apiplayer?version=3";
uiloader.addEventListener( Event.INIT , onLoaderInit);
function onLoaderInit(event:Event): void {
event.target.content.addEv entListene r("onReady ", onPlayerReady);
}
function onPlayerReady(event:Event) :void {
var player:Object = event.target;
player.setSize(640, 360);
player.loadVideoById("GdO7 CIo7jIA",0 );
}
Now I understood why it was not working you are adding into stage but expecting get on the middle where you dropped UILoader. If you want to use this component just give a name in the Property window: "uiloader"
And replace your ActionScript code with tiny implementation
Security.allowDomain("*");
uiloader.source = "http://www.youtube.com/apiplayer?version=3";
uiloader.addEventListener(
function onLoaderInit(event:Event):
event.target.content.addEv
}
function onPlayerReady(event:Event)
var player:Object = event.target;
player.setSize(640, 360);
player.loadVideoById("GdO7
}
ASKER
Thank you for looking it it up for me, I appreciated it.
It is ok on first SWF and I've tried to import a first SWF file into homepage, there is an error, Is there a way to fix this? There is
or even a menu page, it come out as error. I've attached CS4 FLA of menu page to see if I've missed something?
Screen-shot-2012-01-18-at-18.29..png
Screen-shot-2012-01-18-at-18.30..png
homeD3-CS4.fla
It is ok on first SWF and I've tried to import a first SWF file into homepage, there is an error, Is there a way to fix this? There is
or even a menu page, it come out as error. I've attached CS4 FLA of menu page to see if I've missed something?
Screen-shot-2012-01-18-at-18.29..png
Screen-shot-2012-01-18-at-18.30..png
homeD3-CS4.fla
Redscrapbook,
I gave you an example how to resolve your problem I am sure you will able to fix your problems in other frames by using my solution
Please take a challenge for resolving other frames, if you will get troubles I will happy to help you.
I gave you an example how to resolve your problem I am sure you will able to fix your problems in other frames by using my solution
Please take a challenge for resolving other frames, if you will get troubles I will happy to help you.
ASKER
ok I'll try.
I've got play and pause button worked the first time fro my very first post and now its is taken away.
At least try put it back in...I've tried for ages...it seems there is two type of loader: uiloader and muLoader?
I'm trying my utmost...it is starting to get weary to try and work it out.
play_btn.addEventListener( MouseEvent .CLICK, playVid);
function playVid(e:MouseEvent):void {
player.playVideo();
}
pause_btn.addEventListener (MouseEven t.CLICK, pauseVid);
function pauseVid(e:MouseEvent):voi d {
player.pauseVideo();
}
I've got play and pause button worked the first time fro my very first post and now its is taken away.
At least try put it back in...I've tried for ages...it seems there is two type of loader: uiloader and muLoader?
I'm trying my utmost...it is starting to get weary to try and work it out.
play_btn.addEventListener(
function playVid(e:MouseEvent):void
player.playVideo();
}
pause_btn.addEventListener
function pauseVid(e:MouseEvent):voi
player.pauseVideo();
}
ASKER
Correction:
uiloader and myLoader?
uiloader and myLoader?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you.
I've uiloader for YouTube and I've myLoader on main page so that mean I'll have to change a home page uiloader instead?
I've made all the changes uiloader on homepage and included property: uiloader.
and inserted
import flash.events.MouseEvent;
Security.allowDomain("*");
Look like it going to be a long night?
I've uiloader for YouTube and I've myLoader on main page so that mean I'll have to change a home page uiloader instead?
I've made all the changes uiloader on homepage and included property: uiloader.
and inserted
import flash.events.MouseEvent;
Security.allowDomain("*");
Look like it going to be a long night?
do you think it will take only night? :)
That will be good for you
That will be good for you
ASKER
I don't know...it took me weeks since I posted here first...that was on 24th December. I'll stop altogether this Friday. If I don't get it. I'll have to stop regardless, to expensive to keep going at my expense.
ASKER
Any hint? At least it'll get me going. I've used your hint earlier but it didn't go far but my AS3 is working knowledge.
OK, close this question by accepting and answer #37458272
At least I resolved in my sample
Playing YouTube Videos In Flash Using ActionScript 3.0: Security Sandbox Violation
Now if you want to get more help I will suggest opening a new question and describe other problems in your application
At least I resolved in my sample
Playing YouTube Videos In Flash Using ActionScript 3.0: Security Sandbox Violation
Now if you want to get more help I will suggest opening a new question and describe other problems in your application
ASKER
Ok point taken, It would be easier to have all the files as above together when describing? Unless same expert will go through it? or would it be better to start witha new question as
external SWF file: Playing YouTube Videos In Flash Using ActionScript 3.0: Security Sandbox Violation
external SWF file: Playing YouTube Videos In Flash Using ActionScript 3.0: Security Sandbox Violation
you can always pointing to related question in your new question
ASKER
Dgofman has provided his solution and an excellent problem solver in which I'm very grateful for persistance. I accept the solution number 37458272. Deserved full points to his/her credit.