SecurityError: Error #2000: No active security context.

Thursday, July 24th, 2008 | Uncategorized

Always interesting to throw an error that has only 4 obscure results in google.
Using setTimeout with navigateToURL:
var urlRequest:URLRequest = new URLRequest(”http://google.com”);
setTimeout(navigateToURL, 1000, urlRequest, “_blank”);

Generates:
SecurityError: Error #2000: No active security context.
at global/flash.net::navigateToURL()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at <anonymous>()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

A work around is to wrap the call in an anonymous function:
setTimeout(function():void { navigateToURL(urlRequest, “_blank”); }, 1000);

Tags: ,

1 Comment to SecurityError: Error #2000: No active security context.

pallzoltan
November 18, 2008

well, i get this error when trying to access the data property of a filereference… :) weird stuff

Leave a comment

Meta

Search