Adding to the Fireworks Wish-List

This is really a note to myself so I don’t forget to post later as I’m currently busy, but still don’t want to forget these things:

– when merging a layer down, keep the name of the layer that is on top; even Photoshop doesn’t do it. Currently, it just blanks out the name.
– when bringing in a PNG into Flash that has symbols in it, Fireworks does not keep the Symbol names nor the bitmap names; maybe make the bitmap names the slice names or the name of the layer they were on
– support Adobe Photoshop CS files and 16bit ones at that
– if your symbol is an “animation”, bring it into Flash as a movie clip, not a graphic

Fireworks & Flash Panel Wrapper Code

Make Flash Panels? Sick of MMExecuting your coding life away? Check these wrapper scripts. I originally thought that the API that came with the FWCommandComponents would be my salvation… but it took more than a day and a lot of favor asking, which I hate doing btw, to get them. Thankfully, a fellow developer came through… after I had written my wrapper out of frustration…well, really lack of patience to be more accurate. See, the Extending Fireworks PDF claims that there is this aforementioned MXP on the Studio MX CD or on the website. I thought it meant the Studio MX 2004 CD, hence no one finding it, except for one developer who thought to check the MX one. It’s not on MM’s website.

At any rate, it turns out after installing, the homes who wrote it practically wrote a Flash wrapper function for EVERY Fireworks JSF command possible… pretty insane. My route was totally different. I just used resolve with a little string mods, and some AsBroadcaster since EventBroadcaster became tedious as hell that forwards the window panel events that Fireworks generates to whatever listener cares.

Bottom line, instead of this:

MMExecute(“fw.exportSWF();”);

You can do this right in Flash:

fwapi.exportSWF();

Feels good, don’t it?

Well, I’ve liked more of what Fireworks offers in terms of events, but still, I do do (gross) some occasional Flash Panel work too, and there has been an influx of more JSAPI/JSFL and Flash Panel developers releasing tools, so figured it was a great time to port it over to Flash too. I’ve included a sample with the Flash one, while the Fireworks one is in my previous post, the PNG to SWF Batcher. Both FLA’s in the source file utilize the AS class wrapper and use it, hopefully enough to give you an idea of how it works.

Weaknesses are, when returning complex values, like doc from getDocumentDOM for instance, your still better off doing multiple lines of code in a big string, and executing that, or just running an external script. Also, I don’t convert Boolean’s that are returned, so they’re still “true” and “false” as strings. Still, numbers and strings work great.

Now, before I get my ass kicked for not using AS2, here me out: which would you rather use? This:

import FWAPI
#include “JXLFWAPI.as”

And it HAS to be in that order, or:

#include “JXLFWAPI.as”

And just one file?

Thought so. If you said the first, your a goob, and just want to see me get all ticked off… well GIVE UP GOOBER!

__resolve is neato.

Fireworks Flash Panel Wrapper – <a href=”https://www.jessewarden.com/downloads/JXLFWAPI.as”>JXLFWAPI.as</a> | <a href=”https://www.jessewarden.com/downloads/pngtoswf_source.zip”>Source</a>

Flash Flash Panel (whoa) Wrapper – <a href=”https://www.jessewarden.com/downloads/JXLFLAPI.as”>JXLFLAPI.as</a> | <a href=”https://www.jessewarden.com/downloads/flashpanelwrapper.zip”>Source</a>

PNG to SWF Batcher

Actually, you can batch any amount of documents and/or files, but for most people, PNG to SWF is the way to go whether video editing multiple frames, or creating graphics for a project, etc.

I am finishing up a project that had about 2,500+ images of table pieces that had transparency on all of them. After finding out how Fireworks exported to SWF, I found the magic command, fw.exportSWF() and managed to make a batch file out of it. However, tweaking the images just right took time. Not to mention trying to explain to even someone technically proficient where to put the jsf file I just sent them via email… ridicolous. Once again, MXP saves the day.

I’ll explain more in the February’s issue of MXDJ about how I made this, but in the meantime, know this:

This panel is used to batch images to SWF, current files open in Fireworks, or just your current document. The Flash panel it comes with allows you to quickly edit the settings. I’ll upload the MX version tomorrow, but for now, it works with Fireworks MX 2004.

PNG to SWF Batcher – a Fireworks Flash Panel | Source