# navigateToURL error?

**URL:** <https://forum.kirupa.com/t/navigatetourl-error/293241>\
**Category:** Uncategorized\
**Created:** [July 25, 2009, 6:39pm UTC](https://forum.kirupa.com/t/navigatetourl-error/293241 "2009-07-25T18:39:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anix](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@anix](https://forum.kirupa.com/u/anix)\
**Post date:** [July 25, 2009, 6:39pm UTC](https://forum.kirupa.com/t/navigatetourl-error/293241/1 "2009-07-25T18:39:51Z")

</div>

Hi I am having issues with a navigateToURL command in AS3. When I run it in flash i get no errors but when i publish the file i get the following error:

SecurityError: Error #2148: SWF file file:///C:/Users/jack bauer/Documents/Flash Projects/Banner2.swf cannot access local resource xml/links.xml. Only local-with-filesystem and trusted local SWF files may access local resources.  
at [flash.net](http://flash.net)::URLStream/load()  
at [flash.net](http://flash.net)::URLLoader/load()  
at Banner2\_fla::MainTimeline/frame1()

I have also posted the AS3 code related to this navigation below and i hope someone can help. thanks!

[AS]stop();

var linkList:Array = [];// this array has the link information stored in it  
var xmlURLLoad:URLLoader = new URLLoader();//variable to load an XML  
var xmlURLReq:URLRequest = new URLRequest(“xml/links.xml”);//Variable to request a specific XML file  
var a:Number = 0;

xmlURLLoad.load(xmlURLReq);  
xmlURLLoad.addEventListener(Event.COMPLETE, dataLoaded);//event listener to listen for when the data is loaded

function dataLoaded(event:Event):void {//function to do something once the XML data is loaded

var xmlData:XML = new XML (xmlURLLoad.data);  
var n:Number = xmlData.url.length();//variable to assign a number to how many videos there are

//These are the event listeners that are listening for certain actions to be performed on certain objects  
peopleBttn.addEventListener(MouseEvent.MOUSE\_DOWN, peopleStart);  
projectsBttn.addEventListener(MouseEvent.MOUSE\_DOWN, projectsStart);  
collabBttn.addEventListener(MouseEvent.MOUSE\_DOWN, collabStart);

while(a \< n){  
linkList.push(xmlData.url[a]);  
a++;  
}  
///////////////////////////////////////////////////////////////////////  
///////////////////////////FUNCTIONS///////////////////////////////////  
///////////////////////////////////////////////////////////////////////  
function peopleStart(evt:Event):void  
{  
navigateToURL(new URLRequest(linkList[0]),"\_self");  
trace(linkList[0]);  
}

function projectsStart(evt:Event):void  
{  
navigateToURL(new URLRequest(linkList[1]),"\_self");  
trace(linkList[1]);  
}

function collabStart(evt:Event):void  
{  
navigateToURL(new URLRequest(linkList[2]),"\_self");  
trace(linkList[2]);  
}

}

///////////////////////////////////////////////////////////////////////  
///////////////////////////////////////////////////////////////////////[/AS]
