Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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) {
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default 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

  4. #3

    Default 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

  5. #4

    Default 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

  6. #5

    Default 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

  7. #6

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139