I'm going to say try loading the crossdomain.xml explicitly and see if
that fixes it.
Security.loadPolicyFile("http://static.chatopica.com/crossdomain.xml");
Paul
On Nov 12, 2007, at 12:45 PM, dorkie dork from dorktown wrote:
I'm trying to load in a swf from another domain (chatopica chat
room) and cant work around the security sandbox. This works fine
locally but when I put it on the server I get the security domain
errors. What am I missing?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
initialize="{init()}"
backgroundGradientAlphas="[1.0, 1.0]"
backgroundGradientColors="[#FFFFFF, #FFFFFF]" xmlns:ns1="*">
<mx:Script>
<![CDATA[
private function init():void {
Security.allowDomain('static.chatopica.com')
Security.allowDomain(' static.chatopica.com/chat.swf')
Security.allowDomain('http://static.chatopica.com/chat.swf')
Security.allowDomain ('static.chatopica.com/chat.swf?
room=flash')
Security.allowDomain('
http://static.chatopica.com/chat.swf?room=flash')
Security.allowDomain('http://static.chatopica.com')
}
private function initLoader(event:Event):void {
// errors out here. this is a hack to fix the width
and height of the chat room to match the swfloader
event.target.application.width = swfLoader1.width;
event.target.application.height = swfLoader1.height;
}
]]>
</mx:Script>
<mx:SWFLoader id="swfLoader1" scaleContent="true" x="30" y="30"
width="500" height="500"
source="http://static.chatopica.com/chat.swf?room=flash"
init
=
"{event
.target.content.addEventListener('applicationComplete',initLoader)}"/>
<mx:Label x="30" y="4"
text="Example embedding Chatopica"/>
</mx:Application>