View Full Version : Swf encoder class?
hph
April 22nd, 2008, 03:13 AM
Has anyone come across a swf encoder as3 class? I mean similiar to JPEGEncoder and PNGEnocder (found in as3corelib for example) that can be used to create jpg and png files.
I know it can be done with as3 (using ByteArray) and I'm pretty sure someone has done it.
ajcates
April 22nd, 2008, 03:38 AM
That would be like a swf compiler. I think php has a swf class, but I don't know if it works, I guess you could like output a custom xml file get it read and translated and have it build an swf.
hph
April 22nd, 2008, 03:48 AM
That would be like a swf compiler. I think php has a swf class, but I don't know if it works, I guess you could like output a custom xml file get it read and translated and have it build an swf.
Yep, that's how I'm doing it now (with PHP and Ming). But I need to create the whole swf as a ByteArray in actionscript, then send the raw data to a php-script which writes the file.
But in case you know a server-side swf compiler better than Ming, which can create a swf with embedded images and embedded sounds, please tell me. I tried SWFMill some time ago, but the sounds just didn't work.
ajcates
April 22nd, 2008, 04:20 AM
http://www.mtasc.org/ - It only does AS2 tho.
There is also the flex sdk.
The Adobe® Flex™ 3 Software Development Kit (SDK) includes the Flex framework (component class library) and Flex compiler, enabling you to freely develop and deploy Flex applications using an IDE of your choice.
I guess you can write php wrappers to the Flex SDK, and use there compiler.
hph
April 22nd, 2008, 04:43 AM
http://www.mtasc.org/ - It only does AS2 tho.
There is also the flex sdk.
The Adobe® Flex™ 3 Software Development Kit (SDK) includes the Flex framework (component class library) and Flex compiler, enabling you to freely develop and deploy Flex applications using an IDE of your choice.
I guess you can write php wrappers to the Flex SDK, and use there compiler.
I far as I know, MTASC compiles only from .as files. I need to create the swf file on the fly from within my application (made with Flash) and I need to embed images and sounds in the swf.
Using a php wrapper and mtasc compiler wouldn't be much of an improvement over the php/ming solution I'm using now.
flyingbuddha
October 1st, 2008, 01:20 PM
Hi hph,
I'm trying to do exactly the same thing, have you had any luck with this?
senocular
October 1st, 2008, 01:30 PM
It depends on the degree of SWF you're looking at. If you're looking for just graphics and/or animation or imagery, that shouldn't be too hard. If you need to compile logic in the form of ActionScript, well, then you're going to have a problem.
The SWF format is pretty basic. It contains a header with some basic information followed by a collection of tags which describe the file and how it needs to be displayed. These tag can contain visual data as well as compiled script for executing code. Most of the non-script stuff is pretty straight-forward, just being a collection of bits/bytes to represent data, but for ActionScript, that requires a compiler to convert the language into AS bytecode. No such compiler (that I know of) currently exists in ActionScript, though I know a few people are working at it.
efactorial
November 14th, 2008, 06:14 PM
Hi,
On a similar note, I am looking to a converter/encoder that can convert video formats to as3 swf format on the server. Currently, I am using FFMpeg tool to convert any video formats to swf, but these swf files don't work well with as3 flash apps. I know there is ForceLoader that can load as2 swf files, but Force Loader has a problem with the last frame/totalFrames.
Does anyone know any tool that I can use to convert videos to as3 SWF on the server?
Thanks in advance.
OutsourceOnline
October 20th, 2010, 03:36 AM
It depends on the degree of SWF you're looking at. If you're looking for just graphics and/or animation or imagery, that shouldn't be too hard. If you need to compile logic in the form of ActionScript, well, then you're going to have a problem.
The SWF format is pretty basic. It contains a header with some basic information followed by a collection of tags which describe the file and how it needs to be displayed. These tag can contain visual data as well as compiled script for executing code. Most of the non-script stuff is pretty straight-forward, just being a collection of bits/bytes to represent data, but for ActionScript, that requires a compiler to convert the language into AS bytecode. No such compiler (that I know of) currently exists in ActionScript, though I know a few people are working at it.
Can you please explain this ?I am trying to create an online editing application and would like to save the resulting movieclip as vector(preferabbly swf) with php.do you already have written code for this
senocular
October 20th, 2010, 07:31 AM
I do not have code for this, no.
OutsourceOnline
October 21st, 2010, 04:03 AM
Ok,is there any way to save the DisplayObject graphics in vector format(svg,swf,pdf) ?
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.