Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
mtigges #1
hard-coded path?
I'm a complete newb to swf. I haven't got a clue yet what's going on. I've
built a simple little swf that implements a visualization algorithm that we
developed years ago, but I'm having trouble figuring out wtf is wrong with
playing it.
When I build it through the flex ide it gets created (along with the normal
html file and other stuff) in a bin/ subdirectory. If I do it on the command
line (my preferred method) it gets created in the current directory. When I
play the swf in the bin directory it works great, when I play it from anywhere
else it doesn't work.
This is regardless of which method (ide, or cmdline) I use to build the swf.
If I copy the cmdline swf to the bin/ directory it works. If I copy the ide
build swf to any other location it doesn't work.
This means that being in that directory is cardinal to performance. But I
can't find any option in the docs that explains this behaviour. So, I'm asking
for help on this.
By "not working" I mean:
SecurityError: Error #2047: Security sandbox violation: 'content':
'file:///D|/cygwin/home/swadmin/test.swf' may not access
'http://gallery.photo.net/photo/3894431-md.jpg'.
at mx.controls::Loader/get content()
at com.idelix.PDT::LensImage/com.idelix.PDT:LensImage::initBuffers()
at com.idelix.PDT::LensImage/com.idelix.PDT:LensImage::handleLoaded()
at flash.events::EventDispatcher/dispatchEvent()
at mx.controls::Loader/completeEventHandler()
at mx.controls::Image/completeEventHandler()
Thanks in advance for any insight.
Mark.
mtigges Guest
-
Server name coded into links - Am I seeing things ?
All. I'm a network admin handing a file server upgrade project for a large company. I have a store of about 100Gb of graphics file - a large... -
How to avoid accessing row values with hard coded index
Hi there , My code look like this, string var1,var2,var3,var4; foreach (DataGridItem item in MyDataGrid.Items) { -
must all global list be hard-coded in?
As customary, I use parameter dialogue boxes for most of the settings that I would change frequently; however, it seems that you can not use a... -
how hard to replace titanium internal hard drive? How to cloneold hard drive onto it?
Hi all - I have a 2001 titanium laptop with a 20 Gig hard drive. The thing is getting too full and I'm toying with the idea of getting a bigger... -
DISABLE The hard coded IE5+ security risk file types
I understand according to this article: http://support.microsoft.com/?id=232077 That there are hardcoded file types in IE that demands the... -
ntsiii #2
Re: hard-coded path?
From the error, I would say it is a security issue, not a path issue. The
Flash player sandbox security prevents accessing a swf (or pretty much
anything) from a domain that is different than the one that served the original
swf.
If this is Flex 1.5, you either need to use the Flex Proxy, or you need a
crossdomain.xml file in the web root of the server for this url:
'http://gallery.photo.net/photo/3894431-md.jpg'.
You can read all about the player security by searching the MM knowledgebase:
[url]http://www.macromedia.com/cfusion/knowledgebase/index.cfm[/url]
Tracy
ntsiii Guest
-
mtigges #3
Re: hard-coded path?
Thanks Tracy,
I don't believe that's the problem though. Like I said, if the .swf is in the
<dir>/bin directory everything works fine. If I copy it elsewhere I get this
problem.
I've already read all about this cross domain stuff, I don't understand why
it's not an issue when the swf is in one directory and it is when it's
elsewhere. That makes no sense to me.
Mark.
mtigges Guest
-
ntsiii #4
Re: hard-coded path?
What are the two urls you are using to run the swfs? I don't trust my ability
to interpret the error message very well, but I am pretty sure the Player will
see 'file:///D|/cygwin/home/swadmin/test.swf' and
'http://gallery.photo.net/photo/3894431-md.jpg' as being in different domains.
This is 2.0, right? You might get better help oven on the Labs site.
ntsiii Guest
-
mtigges #5
Re: hard-coded path?
Thanks,
I understand that, but as I said, it works fine, no problems at all when the
swf is in the bin/ directory. If I simply copy that swf else where and play it
I get that error. I get the same error loading a local file as loading a
remote file.
Yes, this is 2.0, the latest beta.
mtigges Guest
-
mtigges #6
Re: hard-coded path?
Something I didn't make quite clear either is that in ALL cases regardless of
the location in the filesystem of the swf the image does succesfully get
loaded. The difference is that my as code, the LensImage class does not run.
When the error happens I see the image fine, just no lensed visualization of
it. When everything works, I get the image, plus the lensing of it.
mtigges Guest



Reply With Quote

