PDA

View Full Version : saving a SWF file serverside


Cremulator
09-04-2002, 01:44 PM
I am creating an interactive flash project, where the user can arrange symbols on the stage to create their own art piece.
What I am interested in doing is having this file online, and when the user opens the webpage and creates their layout in the swf, I want them to be able to submit their file to an online gallery.

Then other users could view previous works with name and date details.

What would the best way to do this?
I was thinking that if the user drags a shape onto the stage, then you could save those _x, _y positions to an external text file (using flash 5) that could be named, for example, "layout.as" and then in the gallery just have a blank file with all the symbols in the library, that, when loaded, would arrange the symbols using the coordiates from the external .as file.
...or would there be a way to do it using PHP?? (I don't know anything about PHP really, but if theres a way, I'll know to look in that direction)

JerryScript
09-05-2002, 12:29 AM
Using actionscript as you have described will work fine, for limited output such as you mentioned.

If you want to go more full featured in your app, check out PHP's Ming libraries, which allow you to create swf files on the fly. Rather then creating a movie from a list of actionscripts and stored objects, you can create the actuall swf file with only it's objects/actions.

http://ming.sourceforge.net

Jerry

tg
09-05-2002, 03:07 PM
what he said...
do a search here: criteria== username 'cyberfunk'
when you find one of his posts, look in the footer. one of his links goes to an app he did in ming. pretty slick. i think it saves the files. may even include source, not sure, but if not write to him. he seems pretty knowledgable and willing to help.

JerryScript
09-06-2002, 12:47 AM
Here's a plain simple swf banner maker using Ming. It saves the files (for 12 hours), and serves as a good example of the flexibility of using a server side language to generate swf files. If I had created this banner maker soley as an actionscript based application, the file and it's child files would be so large it would not be useable.

http://www.mingworks.com/banner/maker.php

I don't post the source as a whole, but am more than happy to share bits and pieces or other Ming tips, just post or email me.

Jerry