Hi Alex

Mm. ok... but if I were a bad guy wouldn't *I* just use a proxy server? :-)

It seems a bit of a stretch, frankly, that allowing flash to read the bitmap data constitutes a risk beyond that that simply rendering it poses, but I guess arguing that point won't fix my problem anytime soon.

When you say we could get around this using a proxy server, are you referring to some Flex/flash specific tech? Or are you just suggesting we whip up a web service that funnels the tile requests from our server to the original host?

We had considered that, but are not all that keen to do it that way as it increases server load and will increase round-trip times.

Is there really no other way?

Guy


On 18/02/2009, at 10:22 AM, Alex Harui wrote:


You can load foreign content, but you can’t touch it. There are potential security issues involving sniffing through images of charts and what not.



Normally you get around this using a proxy server



Alex Harui

Flex SDK Developer

Adobe Systems Inc.

Blog: http://blogs.adobe.com/aharui



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Guy Morton
Sent: Tuesday, February 17, 2009 4:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ImageSnapshot sandbox problem



Hi all

I'm using Virtual Earth and the UMap component (afcomponents.com) to
display maps in my app. I want to use ImageSnapshot to capture the map
(and my overlays) and allow the user to save it to disk etc. However,
when I run the code on the server I get the dreaded sandbox issue:

SecurityError: Error #2122: Security sandbox violation:
BitmapData.draw: http://www.blergh.com/bin/myapp.swf cannot 
accesshttp://us.maps1.yimg.com/us.tile.maps.yimg.com/tl?v=4.2&md=2&x=0&y=0&z=2&r=1
. A policy file is required, but the checkPolicyFile flag was not set
when this media was loaded.
at flash.display::BitmapData/draw()
at mx.graphics::ImageSnapshot$/captureBitmapData()
at mx.graphics::ImageSnapshot$/captureImage()
at com.blergh.control::Map/saveSnapshot()
at com.blergh.view::SnapshotDialogue/generate()
at com.blergh.view::SnapshotDialogue/ ___SnapshotDialogue_Button2_click()

Now, first of all I don't really understand why if I can LOAD the maps
in the first place (which I can) I'm not then able to copy them.

Secondly, MS doesn't put crossdomain.xml files on it's tile servers,
so does that mean I'm up the proverbial creek without a paddle?

Guy





Reply via email to