0

I am trying to call a swf from a link in as3. I searched on internet and i used this code

var my_Loader:Loader = new Loader();
var my_url:URLRequest=new URLRequest("http://gurselgunacar.web44.net/flash/yalitimhesabi.swf");
my_Loader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading);
my_Loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
my_Loader.load(my_url);
function finishLoading(loadEvent:Event) {
addChild(loadEvent.currentTarget.content);
}
function errorHandler(errorEvent:Event):void {
trace("file missing");
}

as3 call link but i cant do anything in swf. In output flash give security error. And i tried crossdomain.xml thing and it didnt work :S

2
  • I think you cannot request files from internet like this when testing locally in flash environment. try uploading your swf file to your webhost. Commented Jul 19, 2013 at 20:05
  • but i need it in .exe format :S Commented Jul 19, 2013 at 20:09

2 Answers 2

2

The file http://gurselgunacar.web44.net/crossdomain.xml does not exists. You should create one.
The Loader will always look for a crossdomain.xml file at the target server.

Sign up to request clarification or add additional context in comments.

1 Comment

ı upload but still same. <?xml version="1.0"?> <?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "adobe.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <allow-access-from domain="&quot;*&quot;"/> </cross-domain-policy>
0


Humm. Try to add these Security things:

Security.allowDomain("*");
Security.loadPolicyFile("http://gurselgunacar.web44.net/crossdomain.xml");

And use this in the URLRequest:

var my_url:URLRequest=new URLRequest("http://gurselgunacar.web44.net/flash/yalitimhesabi.swf?" + new Date().getTime()); //this will avoid caching old swf.

I tested on a EXE projector and it seems to work.

1 Comment

security problem solved :) but now in output : TypeError: Error #1009: Boş nesne başvuru özelliğine veya yöntemine erişilemiyor. at asdfg_fla::MainTimeline/frame1() also i cant do anyting in swf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.