views:

263

answers:

3

I'm about to start a project where there will be a Flash application where the visitor customizes a profile with externally loaded images and texts. Then the visitor needs to be able to download that profile as a dynamically created swf with all that external content baked into the swf.

Any ideas how to achive this?

Thank you!

A: 

I believe you would have to create the SWF on the server side and then either

1) provide the user with a URL

or

2) dynamically load it in to your application and use it as the target for a button click, or something like that.

There are a number of ways to create SWFs on the server, but that's an area outside of my experience. Maybe someone else can post some better information on it, but here's a link to one approach, to get you started.

http://www.sephiroth.it/weblog/archives/2006/02/swf_server_side_compiler_with.php

Ross Henderson
Yes, exactly. I was looking for a answer which answer more specificly how to do it, thought.
Ancide
A: 

Which aspect are you curious about? The overall workflow of setting up the server-side architecture? Information on tools that can generate SWFs? Or information on the SWF format itself?

As for tools, here are a few options off the top of my head:

  • The Flex SDK (i.e. mxmlc) will compile a pure AS3 project with embedded assets. If you've got reasonable control over the server, and don't mind a relatively heavyweight approach, that's probably the most "supported" way to go.
  • SWFMill (http://www.swfmill.org) has its own XML format for generating SWFs and importing assets. It's not quite up-to-date on newer SWF formats, but that may not matter depending on the requirements.
  • www.swftools.org has a few things that may be useful.
  • haxe.org has several options for generating SWFs.

If your question is about generating the format from scratch, all those projects are open-source, and personally, I've found the haxe sources to be the easiest reading. The library you want is http://code.google.com/p/hxformat/. Taking a look at the swf format spec might be helpful as well: www.adobe.com/devnet/swf/.

Or were you looking for more step-by-step detail?

(note: sorry for the lack of active hyperlinks, apparently the system doesn't believe I'm human yet :)

datageist
A: 

Hi Ancide,

Did u get any solutions for this. I am breaking my head into this as my task is similar to this. creating a swf from a swf.... :-(

any information from you will help me a lot.

thanks in adv minesh

Minesh