This content has been marked as final. Show 9 replies
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.
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.
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".
Anyway, it must be totally dynamic. Is it possible to load just one frame of each swf?
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?
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.
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.
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!
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.