6 Replies Latest reply on Sep 4, 2008 10:00 AM by (John_Groh)

    Display SWFs instead of images?

      Hi all,

      I built some dynamic pages using ADDT, and on some of the pages, the customer wants .swf files to display instead of an image. I added a field in my mysql database that holds the path to the flash files (for example...."flash/file-1.swf"), and then I tried to put a "placeholder" and bind the field from the recordset I created. However, this didnt work.

      Is there a way to pull and place an swf onto a dynamic page like this? What am I doing wrong?

      Any help is appreciated
        • 1. Re: Display SWFs instead of images?
          Level 1

          There's quite a bit of code that is needed in a page to run flash content, including linking in a javascript file AC_RunActiveContent.js. I would get the flash working by hard coding it in the page first in Dreamweaver. Then once you get that working, edit the code to pull the correct link for the swf file dynamically from the database.

          • 2. Re: Display SWFs instead of images?
            Level 1
            Sorry, but, I dont follow. Has anyone done something like this? Instead of a static photo at the top of some of the pages, they want an animation. And since the whole site is dynamic, it would make sense to store the path for each page's swf in the database as well, but I am not having any luck and running out of time.
            • 3. Re: Display SWFs instead of images?
              Level 1

              It's not hard to do what you're talking about.

              If you FIRST get the flash displaying correctly without being dynamic(pulling the path from the database) then it should be very simple to edit the html flash code to pull in the path/filename from your database and display the flash correctly.

              You will probably need to share your code with us somehow if you need more specific help as there is not nearly enough information provided to troubleshoot this issue for you.

              • 4. Re: Display SWFs instead of images?
                Level 1
                Hi Shane,

                I didnt think it would be hard to do either, and maybe its just because I am juggling 5 other projects that I dont have the focus right now and its making this more difficult.

                Ok, I can post code but Ill tell you what I did. I created several flash files for each page (i.e. 1.swf, 2.swf, 3.swf, etc) and then in my MySQL database, I added a field to hold the path to those files for each page.

                In my page I created a filtered recordset. I place in the swf file where i wanted it and then went to the file field (this is in Dreamweaver) then opened the dialog box. Then I hit "Data Sources" and selected the correct field from my recordset that holds the path in the db.

                When I got to test the page, nothing comes up where the swf should be. When I look at the code, it is correctly bringing up the source from the database, its just not showing the file.

                Any ideas?
                • 5. Re: Display SWFs instead of images?
                  Level 1
                  Now save this page to a new html file from your browser. Edit that by removing the bit where the flash file should be displayed, and replace it with "1.Swf" in such a way that "1.swf" actually shows on the page.

                  Compare this file with the one that doesn't work, and fix whatever is wrong with the code that is meant to show the swf.
                  • 6. Re: Display SWFs instead of images?
                    Level 1
                    Im sure there are other ways to do it, but I just have to say this to myself first DUH!

                    While trying to get it to work, I happened across the help section to the old MX Kollection (now ADDT) and there is a feature in there, Show Object. This did the trick and I was done in a minute. Sorry for wasting time (but again, I have quite a few things in the air so I was just panicking)