gpt4 book ai didi

actionscript-3 - Flash AS3安全沙箱违规/s.ytimg.com

转载 作者:行者123 更新时间:2023-12-03 05:59:30 26 4
gpt4 key购买 nike

我已经读了几天关于这个麻烦的事了,我快要疯了。请帮忙!

我想将YouTube视频白白地加载到我的投资组合中。我已将视频上传到YouTube,并且已公开。
我已经尝试将代码与其他YouTube视频一起使用,除了我的视频,它们都可以完美地与他们一起使用...
就像我说的我要疯了!!!请帮忙!!

*违反安全沙箱*
SecurityDomain'http://s.ytimg.com/crossdomain.xml'试图访问不兼容的上下文'file:/// M | /Architecture/PORTFOLIO/WEB/PORTFOLIO.swf'

这是上下文中零件的代码:

import flash.display.Loader;
import flash.net.URLRequest;
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.events.MouseEvent;
import flash.display.MovieClip;
import fl.controls.ProgressBar;
import fl.controls.ProgressBar;
import fl.transitions.TweenEvent;
import flash.events.Event;
import fl.controls.ProgressBar;
import flash.ui.MouseCursor;
import flash.system.Security;

pages.visible = false;
pages.fullPage.alpha = 0;
var my_images:XMLList;
var my_total:Number;

var page_no:Number = 1;
pages.pb.alpha = 0;

pages.btnBallon.visible = false;
pages.btnBallon.removeEventListener(MouseEvent.CLICK, lVid);
pages.btnBallon.buttonMode = false;

//Youtube loader

Security.allowDomain("*");
Security.allowDomain("www.youtube.com");
Security.allowDomain("youtube.com");
Security.allowDomain("s.ytimg.com");
Security.allowDomain("i1.ytimg.com");
Security.allowDomain("i.ytimg.com");
Security.allowDomain("http://s.ytimg.com/crossdomain.xml");
Security.allowDomain("popslinger.org");
Security.allowDomain("http://www.box.net/api/crossdomain.xml");

Security.loadPolicyFile("http://i.ytimg.com/crossdomain.xml");
Security.loadPolicyFile("http://www.youtube.com/crossdomain.xml");
Security.loadPolicyFile("http://s.ytimg.com/crossdomain.xml");
Security.loadPolicyFile('http://youtube.com/crossdomain.xml');
Security.loadPolicyFile("http://www.box.net/api/crossdomain.xml");



function video():void{
pages.btnBallon.visible = true;
pages.btnBallon.addEventListener(MouseEvent.CLICK, lVid);
pages.btnBallon.buttonMode = true;
}

function lVid(e:Event = null):void{

loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3"));

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{
var pageTween:Tween = new Tween(pages.fullPage, "alpha", Strong.easeOut,pages.fullPage.alpha, 0, 1, true);
player.setSize = (560,315);
player.x = pages.x + 120;
player.y = pages.y;
pages.visible = false;
pages.btnBallon.visible = false;
pages.btnBallon.removeEventListener(MouseEvent.CLICK, lVid);
pages.btnBallon.buttonMode = false;
/*pages.btnNext.removeEventListener(MouseEvent.CLICK, nextPage);
pages.btnNext.visible = false;
pages.btnPrev.removeEventListener(MouseEvent.CLICK, nextPage);
pages.btnPrev.visible = false;*/
player.loadVideoByUrl("www.youtube.com/embed/omcl93EYTrM",0);
//player.loadVideoById("omcl93EYTrM",0);

}

最佳答案

尝试更改此值:

文件->发布设置

关于actionscript-3 - Flash AS3安全沙箱违规/s.ytimg.com,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23437313/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com