0

I have to execute multiple navigateToURL in an swf on file:// protocol (so I can't use ExternalInterface). Unfortunately, I can't set this swf as trusted. I am using this code:

var urls:Array = [
'file:///tmp/1',
'file:///tmp/2',
'file:///tmp/3'
];

var timer:Timer = new Timer(300, urls.length);
timer.addEventListener(TimerEvent.TIMER, onTimer);
function onTimer(e:TimerEvent):void {
    navigateToURL(new URLRequest(urls[timer.currentCount - 1]), '_blank');
}
timer.start();

Unfortunately, now flash when navigateToURL() is used in an untrusted swf, ask for permissions in a popup like this

https://i.stack.imgur.com/pWQuB.jpg

with this code, this popup appears every time navigateToURL is executed, in my case 3 times, and it makes the program unusable. I thought flash was designed to ask for permissions just once.

There's a solution to avoid this behaviour?

  • Are you able to set the local playback security sandbox to "local with internet"? – Aaron Beall Mar 30 '15 at 14:40
  • Actually it's set to _local-with-filesystem_. Do you mean _local-with-networking_ sandbox? Wouldn't it make me unable to use file:// at all? – RIcapitolo Mar 30 '15 at 14:53
  • Yes I meant `local-with-networking`, but you're right I'm not sure if that would block `file://` urls. I would try it, though, because generally `local-with-filesystem` considers an "internet enabled environment" (ie any browser) as an internet call, while `local-with-networking` allows it freely. – Aaron Beall Mar 30 '15 at 15:01
  • Unfortunately requests on file:// aren't permitted if I choose local-with-networking – RIcapitolo Mar 30 '15 at 15:32
  • @RIcapitolo What's "tmp" ? A network dir ? or just a dir next to your swf ? – akmozo Mar 30 '15 at 17:52
  • It's a temporary directory in the local filesystem – RIcapitolo Mar 31 '15 at 02:48

0 Answers0