...

View Full Version : AS2 problem



maxwel
03-08-2012, 10:28 AM
System.security.allowInsecureDomain( '*' );
System.security.allowDomain( '*' );
System.security.allowDomain( 'www.youtube.com' );
System.security.allowInsecureDomain( 'www.youtube.com' );
System.security.allowDomain( 'youtube.com' );
System.security.allowInsecureDomain( 'youtube.com' );
System.security.allowDomain( 's.ytimg.com' );
System.security.allowInsecureDomain( 's.ytimg.com' );
System.security.allowDomain( 'i.ytimg.com' );
System.security.allowInsecureDomain( 'i.ytimg.com' );
System.security.loadPolicyFile("http://i.ytimg.com/crossdomain.xml");
System.security.loadPolicyFile("http://i1.ytimg.com/crossdomain.xml");
System.security.loadPolicyFile("http://i2.ytimg.com/crossdomain.xml");
System.security.loadPolicyFile("http://i3.ytimg.com/crossdomain.xml");
System.security.loadPolicyFile("http://i4.ytimg.com/crossdomain.xml");
System.security.loadPolicyFile("http://s.ytimg.com/crossdomain.xml");
System.security.loadPolicyFile("http://www.youtube.com/crossdomain.xml");


// create a MovieClip to load the player into
var ytplayer:MovieClip = _root.createEmptyMovieClip("ytPlayer", 1);

ytPlayer._x = 221
ytPlayer._y = 300
ytPlayer._xscale = 75
ytPlayer._yscale = 75

// create a listener object for the MovieClipLoader to use
var ytPlayerLoaderListener:Object = {
onLoadInit: function() {
// When the player clip first loads, we start an interval to
// check for when the player is ready
loadInterval = setInterval(checkPlayerLoaded, 250);
}
};

var loadInterval:Number;


function checkPlayerLoaded():Void {
// once the player is ready, we can subscribe to events, or in the case of
// the chromeless player, we could load videos
if (ytplayer.isPlayerLoaded()) {
ytplayer.addEventListener("onStateChange", onPlayerStateChange);
ytplayer.addEventListener("onError", onPlayerError);
clearInterval(loadInterval);
}
}

function onPlayerStateChange(newState:Number) {
trace("New player state: "+ newState);
}

function onPlayerError(errorCode:Number) {
trace("An error occurred: "+ errorCode);
}

// create a MovieClipLoader to handle the loading of the player
var ytPlayerLoader:MovieClipLoader = new MovieClipLoader();
ytPlayerLoader.addListener(ytPlayerLoaderListener);

// load the player
myLoadVars = new LoadVars();
myLoadVars.onLoad = function() {
zal = myLoadVars.myHTMLdata;


ytPlayerLoader.loadClip(zal, ytplayer);
};
myLoadVars.load("youtubelink.txt");
//scale it

_root.ytplayer._x = 221
_root.ytplayer._y = 300
_root.ytplayer._xscale = 75
_root.ytplayer._yscale = 75


and my output which is my problem


*** Security Sandbox Violation ***
SecurityDomain 'http://s.ytimg.com/crossdomain.xml' tried to access incompatible context 'http://www.youtube.com/crossdomain.xml'


everything appear and the movie clip but i cant remove the movie clip anymore cuz that error is there which stops it from removing...

so any idea???

thnx in advance

maxwel
03-08-2012, 05:02 PM
bump -too short-

maxwel
03-11-2012, 06:30 PM
bump -any help, please

maxwel
03-14-2012, 05:07 PM
bumpppp

help is so needed

maxwel
03-15-2012, 06:15 PM
that means it got no any solution?

adaminaudio
03-15-2012, 06:41 PM
hi

I'm sure there is an answer to your question but some of us (me included) just don't have enough expertise to answer this.

there are some guys over at actionscript.org that could probably answer this, you should try there.

I'm guessing you'll need to do some kind of error handling (in case this happens) like a try-catch block or something. That way you can catch the error and still be able to remove the stuff you need to get rid of

-Adam



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum