9 Replies Latest reply on May 31, 2006 6:22 AM by Wolf_van_Ween

    SWF Thumbnails


      I'm building an application in Flash 8 that dynamically generates a list of thumbnails for each swf connected to the main movie. When the user clicks on the swf it plays.

      My question is how to make the thumbnail gallery of the swf:s.

      One way is of course to load all the swf:s in containers and scale them. My fear is though that with 100 swf:s the memory and CPU will complain at this ugly soultion.

      Another way is to screen-dump the first frame and scale it i PS, but then I cant make it dynamic.

      Is there a way to snapshot a frame in an extrernal swf and use it as a thumb?

        • 1. Re: SWF Thumbnails
          Well there are several ways of doing this, but the easiest way I think would be to screenshot the first frame of the SWF and then scale it down and load it as a bitmap. Then from there link it to the SWF.

          This would limit the memory and cpu load on the end users computer. Depending on the file size you will want to limit how many you load at once.
          • 2. Re: SWF Thumbnails
            Emil_RT Level 1
            Yep, thats probably the easiest way.

            Though, I want to generate the gallery dynamically, independent och how many swiffs there are. When I create a new swiff I would like to skip the screenshot step.
            • 3. SWF Thumbnails
              Wolf_van_Ween Level 1
              Emil, why not simply "File - Export - Export Image"?
              And you could use JSFL to open a list of .fla (or import the .swf) and write the .jpg with a standard name.
              Still not at runtime but fairly "dynamic".
              • 4. Re: SWF Thumbnails
                Emil_RT Level 1

                Anyway, it must be totally dynamic. Is it possible to load just one frame of each swf?

                • 5. Re: SWF Thumbnails
                  Wolf_van_Ween Level 1
                  No, but you can start a load and abort it once one frame is loaded. But I don't know whether you're not simply stretching the system too far here. Can you explain what you want to achieve?
                  • 6. Re: SWF Thumbnails
                    Emil_RT Level 1
                    I'm thinking of one small .exe created in flash.

                    When I start the .exe it reads a specific folder and looks for .swf:s. When the reading is done I want the first frame of each swf to be a thumbnail thats shown in the .exe. When I click on the thumbnail I want the .swf to execute.

                    My problem is that I dont want to load all the swiffs (wich would be the easy way) because I estimate the load to be about 100 swiffs.

                    • 7. Re: SWF Thumbnails
                      Wolf_van_Ween Level 1
                      Why does it have to be dynamic then? Where do the swf's come from?
                      Whenever a new SWF is produced, also produce a jpeg with the same name (but a different extension). That is easy to load in Flash, and the onPress handler is extremely straightforward, too.
                      • 8. Re: SWF Thumbnails
                        Emil_RT Level 1
                        The main purpose is to have a "shell" that loads "slides" for presentations.

                        When the customer makes a new slide (.swf) he only have to copy the .swf to the right folder and next time he starts the .exe it loads the new slide!

                        • 9. Re: SWF Thumbnails
                          Wolf_van_Ween Level 1
                          You're out of luck there with (standard) Flash, Emil.

                          There isn't even a function to search a directory.
                          You would need to program this in another system (e.g. C#) and teach it how to extract a frame from a SWF.