V
V
Vladimir Golubev2015-07-02 11:29:41
PHP
Vladimir Golubev, 2015-07-02 11:29:41

How to fix access error from swf movie to php script?

There is a script for as3, in fact - a simple banner. It is loading the necessary data from various sources, including from a php script on another site. The main problem is that after loading the urlloder, I don't get a response not only from the onComplete listener, but also from the error listeners - general errors, I/O errors, security errors - none fired. The situation is complicated by the lack of player debugging - I see only the info that I display myself) As an experiment, I tried to get info from php on the same domain (on a local web server) - also zero reaction.

private function init():void {
        	removeEventListener(Event.ADDED_TO_STAGE, init);
        	
        	Security.allowDomain("*");
        	Security.allowInsecureDomain("*");
      Security.loadPolicyFile("http://tapixi.my:8080/crossdomain.xml");
        }
private function loadUserDomain():void {
        	debugWindow.text = 'load domain init';
        	domainLoader = new URLLoader();
      domainLoader.addEventListener(Event.COMPLETE, domainLoaded);
        	domainLoader.dataFormat = URLLoaderDataFormat.TEXT;
        	var request:URLRequest = new URLRequest('dom.php');
        	request.method = URLRequestMethod.GET;
        domainLoader.load(request);
        }
        
        private function domainLoaded(event:Event):void {
        	debugWindow.text = 'domain loader ';
        	//domain = event.target.data;
        	//debugWindow.text = 'domain: ' + domain;
        	//createLink();
        }

loadUserDomain() succeeds, domainLoaded(event:Event) never executes.
In crossdomain.xml this is:
<?xml version="1.0" ?>
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Golubev, 2015-07-02
@wladyspb

The problem was solved stupidly... I added listeners, made traces, and the browser loaded the swf from the cache >_<
Naturally, nothing changed...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question