View Full Version : Exporting swf from AS3
cupofnestor
July 10th, 2009, 01:30 PM
Hi there y'all,
First time poster, longtime lurker.
I'm designing kiosks for educational museums. My current project involves visitors generating content in a Flash-based interactive, and then having the ability to email their creation to themself, or others. My intention is to publish a swf from my program to a webserver, and then email the visitor a link to a webpage with the swf embedded. I'm having trouble finding any info on publishing a movieclip as a swf from AS3. There's gotta be way, right?
JonnyR
July 10th, 2009, 02:01 PM
Hi Cupofnestor,
Are you trying to create a SWF file in ActionScript? As far as I know this isn't possible. Obviously I don't fully understand your intentions, but you can export PNG images via ActionScript which could in turn by persisted back to a service layer (i.e.: a PHP webapp).
Jonny.
IQAndreas
July 10th, 2009, 02:03 PM
Hm... I have wondered the same thing, and if you find a solution let me know.
Otherwise, here is one possible workaround.
Are you granted database space? If so, you can save all the properties of the MovieClip (or other class) as XML. Then you send them a email similar to the following:
Congratulations!
Your creation was a success! Click here to view your creation:
http://www.theEducationalMuseum.com/creations/view.php?id=236244
When they click the link, the page looks for the XML inside of the database and returns that value to Flash. Then Flash loads their specially designed MovieClip based on the information inside of the XML file.
There might be other options (many simpler, and possibly less space consuming. Imagine tens of thousands of XML files clogging up the server for years. A little bit of a waste). Could you elaborate more on what the whole idea is? Do they just create an image? If so, you can make the MovieClip into BitmapData, and save it as a JPG or other file.
I'm thinking you might also need to use a bit of PHP in order to get the emailing working.
.ral:cr
July 10th, 2009, 03:09 PM
depends on what kind of swfs you want to create. is not viable to create a default swf and to customize it by xml which can be easily written on server?
otherwise, you need a hard core solution with haxe and hxformat: http://code.google.com/p/hxformat/
check this one too, but i don't think will help you: http://wonderfl.net/
cupofnestor
July 10th, 2009, 03:14 PM
Ooooo... I really like that XML Idea Andreas. I haven't gotten around to impllementing SQL in flash or anything else for that matter. I can have access to anything I want; I'm the technical systems coordinator as well (small company) =-). In fact, the webserver will probably be right in the museum. Can anyone suggest a link to more information on how to do this sort of thing with flash/php?
IQAndreas
July 10th, 2009, 03:21 PM
Try "The Flash and PHP Bible".
I'd recommend renting or borrowing it somewhere, since it's one of those one time reads. Once you know how to do it, there is really not much use in letting the book lie around gathering dust.
If you need any help, just ask. I am more of an MS SQL person, but I'm trying to find the time to learn MySQL better. Not much difference really, but MySQL has a lot more datatypes available, and several more functions (and it's free!)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.