We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 130
    • 17 Posts
    Howdy!
    I'm running modx 2.2.8, and I'm trying to load a swf file (one of those flipping books/converted pdfs).

    I created a content type and linked to the swf via an inline static resource (I need to control access to the file). If I type in the direct link to the file, shockwave will engage and the file opens just fine. When I go to the static resource though, the flash file tries to load, but I get a flash Error #2036.

    It's hard to tell, but I think this is because the plugin is moving swf file's location, and hence the links to the flash assets are broken.

    I'm currently trying to figure out if I can decompile the swf and see/edit the links, perhaps make them absolute, but anybody here have any thoughts on this?
      • 30912
      • 463 Posts
      We had a similar situation - however the flipping book outputted a html file also, so we uploaded all the files to the /files/ area of our site and weblinked the index file - this seems to work

      not ideal but it works.
        • 130
        • 17 Posts
        Yeah, I looked at that. Unfortunately, I can't use a weblink, only a static resource/resource [as far as I know]. I have a deny all htaccess file with an exception for the server. I'm going to try creating a template from the html file and see if that works. It should, just when I first tried it, it didn't.
          • 30912
          • 463 Posts
          Why cant you use a weblink? no permission?

          you could use a static resource in place of the weblink, just link to the HTML file instead of the swf. Depending on the software the swf wont run without being run inside the .html file as it has all the linkage in there.

          i had flippingbook.com's version
            • 130
            • 17 Posts
            Yeah, the weblink won't work because of the htaccess deny from all, and unfortunately neither will a static resource loading the html, the htaccess file still blocks the file from loading [php's not my thing so much, but I believe this is because it's loading via html and not php]. Without the .htaccess file, it will load and play correctly loading the html from a static resource.

            I wondering if I'm just using the wrong approach .htaccess? I just used a simply deny from all, allow from xxx.xxx.xxx.xxx. Is there a better way to do it? I just need to block linking or downloading the swf file or any images that the swf uses and only allow logged in users to view.
              • 30912
              • 463 Posts
              Deny all from xxx.xxx is definately the problem, how do you know what your users IP address is?

              Im no htaccess wiz, at all, so i cant help you there smiley
                • 130
                • 17 Posts
                It's not the users IP you enter in, it's the servers. When the system generates the request, it allows access, but to anyone else, it blocks. This works with things like images and PDF's, but not with a flash file.

                I understand at this point why loading a flipping book from a static resource won't work, even though at first thought it seems like it should work. Loading a swf file (from a directory that has a deny from all .htaccess) by using a static resource is easy and will work, you just need to create the MIME type for the static resource.

                As I think through it, my error comes from the flash file itself. The flash file is being loaded, BUT then the it is linking to the high res jpgs for the pages. Those files are restricted, because it's not the server requesting the image files, it's the locally stored swf. So I either need an alternate access restriction, or all the jpgs need to be embedded in to the swf.