We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have been looking around the Processing source code and the existing libraries. Many excellent libs already exist, and some great ideas have been suggested on the GSoC forum too. I was interested in working on something I have prior experience with, and it should be suitable for designers too. How about a project which aims to allow Processing to directly import Adobe Flash CS5/6 files and then generate the Processing code for that design? This seems like an exciting thought to me, and this could also ease the workflow of many designers and Flash users. People who have existing designs in Flash, can supply the xfl file directly, or the fla file (which can be used to extract the xfl file).
The basic idea is to parse the DOMDocument.xml using a Java XML library like dom4j, this xml file contains all the information for the flash document including design/timeline/motion paths. After parsing, the corresponding Processing code can be generated, and produced as a pde file. I already have plenty of experience working in Flash (along with AS3), and am comfortable with Java. Also, this could be a pretty big project depending on what features i plan to leave out and what to implement in the conversion from flash to processing code, would welcome suggestions on this. In general, this idea seems really promising to me, and look forward to suggestions. I will draft a proposal on this soon.
Thanks in advance.
Utkarsh
Comments
Thanks for your post. We are open to ideas for any libraries / tools for Processing and look forward to reading your proposal.
Personally, I don't see Flash used much by students and developers here in NYC so my point of view might be that this is lower priority. But I may be missing a part of the community and would love to hear from others. Right now I see a lot more work going back and forth between Processing and JavaScript/HTML5.
That's absolutely what I want too if I could! Cross mode libraries are what I'm searching for most! :-bd
@GoToLoop, I should note that our energy is now focused on https://github.com/lmccart/p5.js as processing.js has not been actively maintained. p5.js is not a port of Processing, but rather brings Processing ideas to the web. So instead of automatic translation, "cross-mode" might more be about multiple examples and tutorials and "libraries" for both environments.
Thank you for your inputs though I must admit I'm quite confused now. I am not sure if I should proceed in this direction. What I did initially have in mind was that my implementation would also serve as a fast visual way of making graphics in flash, and then using this tool to produce the corresponding processing code. That would make it easier for people/designers who are new to Processing and might not be familiar with coding well enough to directly dive in. Flash allows simple drag and drop and other GUI based methods to create graphics and subsequently the flash file produced could be made into Processing code.
So far my research shows that this is possible in principle, although the existing documentation for XFL from Adobe (the XML scheme for flash document) is scarce, the XML code itself is quite legible and the data can be parsed and converted to make graphics code in processing. I'm trying to build a proof-of-concept, though I don't think I will have enough time before proposal submission for that.
@shiffman , what a pity! Processing.JS is the best idea ever! Write in Java, get code running in browser too. \m/
Apart from using JS native syntax, I really dunno what that new P5.js is for.
For if we wanted to write in pure JS, it'd be enough to create a ".js" suffixed tab name! *-:)
Just like in Java Mode we can have ".java" tabs! /:)
After Java & JS modes, my 3rd favorite is CoffeeScript mode. We can also have ".js" tabs there, although not a ".cs" 1 yet!
A nice feature for both JS & CS modes would be a way to include libraries and have them running on the generated ".html" file! :D
@UtkarshV thanks for the reply and the clarification. Tools and libraries that help a beginner feel more comfortable in Processing are always welcome. I can't speak to the technical questions behind your idea as I don't have any experience with Flash. A user scenario / example of how you imagine the tool/library being used might be helpful.
Hi, I apologize for not being more clear earlier.
Something like this
For what I made as a simple graphic in flash on left, the corresponding processing code like on the right should be produced which on running makes the same design.
This is a very very plain example of what I've in mind, I plan to have more complicated things converted too. I've a class right now, will continue discussion as soon as I'm back.
Thanks again.
Hi again
I know this is last minute, but if this idea is not favorable, I'm interested in working on environment tweaks too. I have a feeling that my chances of getting a suitable mentor for this current idea are rather bleak :|
I would be interested in working on the example viewer and library & tool loader/unloader . From the information on this page , I'm not very clear on what it means by referencing master file from processing.org. Isn't the user supposed to directly supply the url for the required lib (for libs which are not already there in the Tool Manager), and the PDE would ideally fetch the lib from there and install it?
The example viewer part can be produced as a new menu item in PDE, with a select-able categorized list of examples (from the Processing website) and after selection, it displays the example in a new PDE window, or it can be implemented as inserting snippets into the already existing user file when user selects an example.
If this 2nd idea is more favorable, I would be glad to draft a proposal on it at the earliest. Thanks ! :)
Utkarsh
Hello again ! :)
I went ahead and submitted my proposal here .
I have tried to explain various use cases (3 in fact), I really hope this gets selected. :D Looking forward for this!
Sincerely
Utkarsh
Hello from France.
Interresting toppics, because is there any other tool than flash that allows pure designers to directly interact with developpers ? Html5 / js are great tools but they cut the rope and make interactions more complicated with non technical people.
can't wait for any solution that puts technology as a creative and intuitive solution.
@UtkarshV Not sure if this is of any help, but Haxe is one Free language that compiles to JavaScript, Flash, NekoVM, PHP, C++, C# and Java. http://haxe.org/#multiplatform
There's also Monkey X: https://en.wikipedia.org/wiki/Monkey_(programming_language)
Although I don't think they include ActionScript (Flash) particularly! :(|)
What could be great about Flash & Processing, but don't know if it's even possible, would be to build a library of assets with Flash inside a SWC file, and then be able to use it in processing.
Another solution that may be easier would be to create a JSFL file running in Flash that create automaticly folder of assets usable in processing, with maybe some xml data that represent vector-skecth drawn in the Flash IDE (I already do that before, I know it's possible).
I think it could be a true good solution because even if Flash is not used anymore it's still a part of Adobe Creative Suite and since there is "creative cloud", the last Flash version will always be Flash CC and then the JSFL file will always be compatible (because until now, JSFL worked only inside the Flash version it was built, and that was a big problem to get it running for every people)