PDA

Click to See Complete Forum and Search --> : Flash 5 File Format Documentation?



jjmartin
12-08-2000, 01:04 PM
I just saw a Flash 5 seminar on the new ActionScript. I'm anxious to play with it, but have no idea how to write them into my files (do they use some kind of bytecode?).

Is macromedia changing it's mind about Flash being an open file format?

jeff

JAEzell
12-08-2000, 01:19 PM
In the new SDK / API docs, the flash 5.0 action model is described. Download the Flash File Format SDK and check the documentation section.

jjmartin
12-08-2000, 02:05 PM
Thanks for the pointer!

Any clue how to turn a human readable script into flash (I'm in Java). Do I have to parse the script my self and turn it into this bytecode?

jeff

JAEzell
12-08-2000, 03:47 PM
I haven't worked with the F5 SDK much; however, it does appear that you can just give it the text string of the actionscript code in the 5.0 model without processing it at all if you use the right commands (the new 5.0 ones). If you use the 4.0 or 3.0 action models; however, you will need to process it first.

--Jesse

jjmartin
12-08-2000, 05:35 PM
I've tried to open a few Flash 5 swf files in a text editor and I don't seem to see the undisturbed Action Script code. I do see many action script strings, though. Perhaps there's a begin record tag that lets you append raw script code.

jeff

JAEzell
12-08-2000, 05:44 PM
Get familiar with the SDK and the API Docs, they explain everything. You won't be able to do anything with a text editor, you need a compiler.

jjmartin
12-08-2000, 06:00 PM
I'm way ahead of you - I've written my own SDK for our product ReportMill. It generates some pretty sophisticated flash files (and PDF). http://www.reportmill.com.

The SDK is only useful as example code because it's in C++.

:-)

jeff

jjmartin
12-12-2000, 11:10 PM
JAEzell, do you have any insight on what I would have to do to embed raw Flash 5 ActionScript text into a file (you seem to know a bit about Flash 5 action coding!). I can't figure out how to make Flash 5 generate such a file (they seem to be using opcodes). If I had a file to work with, I might be able to figure it out.

Send me a note if you can (jeff@reportmill.com).

JAEzell
12-12-2000, 11:28 PM
Actually, flash 5.0 NEVER includes RAW actionscript in a file, because it is not compact enough. Everything is still based on basically the same action model as the 4.0 SDK. I now have all the 5.0 actions coded in my SDK, and I will most liekyl release the updated SDK portions some time in the near future.

--Jesse

jjmartin
12-12-2000, 11:51 PM
Ah - I found something interesting! I can probably use the 'eval' tag to enter ascii action script. The only drawback seems to be that I have to strip out the newlines first (not so bad).

Might be enought to let me start hacking!

jeff

JAEzell
12-13-2000, 12:37 AM
Unless I am mistaken, the "eval" tag (outputted by swfparse) is a "GetVariable" command...not an action script executor.

--Jesse

nmain
12-13-2000, 01:13 AM
JAEzell is right - there is no way to embed ActionScript text into SWF.

ActionScript has to be compiled into action codes - which are a kind of machine code that the Flash Player understands.

If the Flash Player included the ability to interpret ActionScript text it would certainly be many 100's of K larger in size.

P1_6uy
12-26-2000, 06:41 PM
OK, are there a compiler to write raw bytecode? I mean somethings it does the inverse of a decompiler???

P1_6uy
12-26-2000, 06:51 PM
OK, are there a compiler to write raw bytecode? I mean somethings it does the inverse of a decompiler???
And on macromedia site the only things i saw in the SDK section is
the one for flash4. Nothing about Flash5.

[Edited by P1_6uy on 12-26-2000 at 05:53 PM]