Hi everyone...
I hope there is someone who can demystify and solve the problem I'm having.
I would like to load flashbanners in to other movies, like this:
Movie on one domain loads a movie from another domain.
Locally I get a Sandbox Security Violation notice
*** Security Sandbox Violation ***
SecurityDomain 'http://mini6.mcbtest.dk/cultbanner.swf' tried to access incompatible context 'file:///Z|/Flash%20Skin%20All/web/bannerTest.swf'
and when i add this to the top of my script it goes away
Code:
System.security.allowDomain("*")
So thats all fine, but here's the problem, when I upload it to a server, my mask will not work.
The movie can be seen here:
http://mini5.mcbtest.dk/bannertest.swf
And my script looks like this:
Code:
textPadding = 20
bannerWidth = 174
bannerHeight = 62
textBGColor = 0x000000
textBGAlpha = 40
rightBoxWidth = 174
this.createEmptyMovieClip("sideWindow",this.getNextHighestDepth())
with (sideWindow) {
beginFill(textBGColor, textBGAlpha);
moveTo(0, 0);
lineTo(bannerWidth + (textPadding * 2), 0);
lineTo(bannerWidth + (textPadding * 2),bannerHeight + (textPadding * 2));
lineTo(0,bannerHeight + (textPadding * 2));
endFill();
}
this.createEmptyMovieClip("bannerContainer",this.getNextHighestDepth())
bannerContainer._x = textPadding
bannerContainer._y = textPadding
bannerContainer.createEmptyMovieClip("entityClip",bannerContainer.getNextHighestDepth())
bannerContainer.createEmptyMovieClip("bannerMask",bannerContainer.getNextHighestDepth())
with (bannerContainer.bannerMask) {
beginFill(0x00FF00, 50);
moveTo(0, 0);
lineTo(bannerWidth, 0);
lineTo(bannerWidth,bannerHeight);
lineTo(0,bannerHeight);
endFill();
}
bannerLoader = new MovieClipLoader();
oListener = new Object();
oListener.onLoadStart = function():Void {
trace("start")
}
oListener.onLoadProgress = function():Void {
trace("progress")
}
oListener.onLoadComplete = function():Void {
trace("complete")
}
oListener.onLoadInit = function(mHolderClip:MovieClip):Void {
mHolderClip.setMask(mHolderClip._parent.bannerMask)
createContent()
trace("init")
};
bannerLoader.addListener(oListener);
bannerLoader.loadClip("http://mini6.mcbtest.dk/cultbanner.swf", bannerContainer.entityClip);
createContent = function(){
bannerContainer.bannerMask.onRelease = function(){
trace("click")
}
}
Hope somone can help, thanks