0

I need to render the final state of a SWF passing flash vars parameters.

Let's say I use the var text="Some text", and the swf shows the text over a static background. I need to render this to a png file, I've tried with gnash but with no luck so far, here is an example of the command I'm running.

gnash --screenshot last --screenshot-file imagename.png -1 -r1 test.swf -P "FlashVars=parameter=text"

The problem is that this renders the background image, without the text that's supposed to be over it.

I can't use swftools because I don't control the server and they don't want to install the software.

Now I'm allowed to install this on the server.

carcargi
  • 516
  • 2
  • 8
  • 23
  • Extra info: Apparently gnash is not sending the flashvars to the swf, in my example: `gnash loaderInfo.swf --param "FlashVars=userName=permadi"` Shows nothing, As html code with the exact same flashvar it works flawlessly. – carcargi Aug 23 '12 at 23:32

1 Answers1

0

Hmm do you have access to the swf code? If so you could for instance save the contents of the stage to a bitmap and then save as png/jpeg which you can transfer to a server side or serving it directly to the client for download.

Look at this post for example code Trying to capture stage area using BitmapData

Community
  • 1
  • 1
cristobal
  • 462
  • 5
  • 14
  • That would be a solution but I can't run the `SWF` file from the client side, because we are trying to accomplish this as a workaround for iOS systems. Also i'm editing the question, I'm allowed to use `SWFTools` now :) – carcargi Aug 23 '12 at 22:33