cancel
Showing results for 
Search instead for 
Did you mean: 

SecurityError: Error #2148: SWF file

Former Member
0 Kudos

Hi All,

I have created a project using GMap API, then I added markers on GMap using marker.xml file. When I execute this project in

Flex Builder 3.0, it is working fine or if I open swf from bin directory then also it shows correct result.

But, the problem is when I copy this swf file to other location let's say on desktop, it throws <b>" SecurityError: Error #2148 "</b>

this error. Says that " %/GMapFlexComponent.swf cannot access local resource file: %//Desktop/markers.xml. Only local-

with-filesystem and trusted local SWF files may access local resources. And swf shows google map with polygon but does

not show markers.

I also tried crossdomain.xml concept, but did not work.

I would appreciate if anyone could help.

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello there,

2148 can also be caused by Flash Security Settings. Please go here:

http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html

Then give the flash player access to whatever hard drives and folders it needs.

Good Luck,

Javier

Former Member
0 Kudos

Security is also covered in the Xcelsius 2008 General Best Practices: https://boc.sdn.sap.com/node/19898

Regards,

Matt

Former Member
0 Kudos

Hi,

Thanks to both Matt and Javier.

My problem is partially solved means when I open swf as standalone, it is showing correct results with markers and did not show any error.

But, the other part of the problem is related with Xcelsius 2008.

When I add this swf in Xcelsius 2008, it does not show markers and also does not reflect any error.

I think it requires markers.xml, but I don't know how to provide it to Xcelsius 2008.

Thanks!

Former Member
0 Kudos

Hi,

I would create a property in your component to pass in the url of "markers.xml". Make this property something that can be set by the user in Xcelsius like you would with other add-on component properties.

Then in your component load the xml from the url when it is passed to your component. A bit like this:

var xmlLoader:URLLoader = new URLLoader();
var xmlRequest:URLRequest = new URLRequest("markers.xml");
xmlLoader.addEventListener(Event.COMPLETE, onXmlLoadComplete);
xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, onXmlIoError);
xmlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onXmlSecurityError);
xmlLoader.load(xmlRequest);

Regards,

Matt

Answers (0)