A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Flash MX getURL bug?

  1. #1
    Hack
    Join Date
    Mar 2000
    Location
    Madison, WI
    Posts
    1,753

    Flash MX getURL bug?

    I have had a site up for some time, where a flash file has a getURL() action to .doc files, .pdf files, etc. I was compiling it as Flash 5 .swf for maximum compatibility.

    Recently I added some features that required me to compile as Flash 6 player. Immediately the links to the .doc files and .pdf files and such stopped working.

    I ended up having to have Flash call a javascript function to open the files. I'm sure this is some "security feature." Anyone else run into it and find a better way to get around it?

  2. #2
    Retired SCORM Guru PAlexC's Avatar
    Join Date
    Nov 2000
    Location
    NJ
    Posts
    1,387
    Nope.

    Code?
    "What really bugs me is that my mom had the audacity to call Flash Kit a bunch of 'inept jack-asses'." - sk8Krog
    ...and now I have tape all over my face.

  3. #3
    Hack
    Join Date
    Mar 2000
    Location
    Madison, WI
    Posts
    1,753
    The code is painfully simple.

    When published as a Flash 5 .swf, this works:

    getURL("Resources/Paper.doc","_blank");

    It causes IE to prompt for a download, and everything's fine.

    When published as a Flash 6 .swf, the same thing happens, but after you indicate whether you want to open or save the file (doesn't matter what you choose) IE says the file is unavailable.

    I think when a non-displayable file is requested in IE, it downloads the file in user cache, and then accesses it locally either to open or save it. Somehow Flash short-circuits that process, the file never makes it to local cache, and then when IE goes looking for it it's not there.

    So I had to do this:

    getURL("javascript:openDoc('Resources/Paper.doc')");

    And now it works fine again.

    I was just wondering if there's some kind of security setting I can change, because it's silly to have to go around Flash just to link to downloadable files.

  4. #4
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Is there any change in html location or if you now load the movie inside another?Any change that has with paths to do?
    I ask this as links are relative to the html doc's location and not the swf file's? The javascript thing may change that.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center