Trying to make a local connection using Flash Professional CC targeting Flash Player 11.1 This code works in testing and in the browser, no errors during debugging, works fine on my server with no domain, but does not work on my server with an SSL. Any idea what might be wrong?
Sending SWF
import flash.net.LocalConnection;
import flash.system.Security;
Security.allowDomain("*");
var conn:LocalConnection = new LocalConnection();
conn.allowDomain("*");
var analstring:String = new String();
function fun():void{
conn.send('analconnect', 'analHere', analstring);
}
var button:myBut = new myBut();
button.addEventListener(MouseEvent.CLICK,gogo);
function gogo(event:MouseEvent):void{
loaderSprite.scaleX = loaderSprite.scaleX * 1.5;
analstring = loaderSprite.width.toString();
fun();
}
Receiving SWF
import flash.system.Security;
import flash.net.LocalConnection;
Security.allowDomain("*");
var conn:LocalConnection = new LocalConnection();
conn.allowDomain("*");
conn.client = this;
for (var ccc:int = 0;ccc<3;ccc++){
try{conn.connect('analconnect')}catch(error:Error){gotoclose()};
}
function gotoclose():void{
try{conn.close()}catch(error:Error){};
}
function analHere(newText:String):void{
tesa2.text = newText;
tesa2.setTextFormat(tesaform2);
addChild(tesa2);
}
Try using
allowInsecureDomain
instead ofallowDomain
.