PDA

View Full Version : JSFL beginner's tutorial?


shmoo525
01-10-2008, 04:40 PM
Hi, I'm new to JSFL. So new, that I'm not entirely sure what it is, exactly.

Basically, I'd like to be able to add and/or revise some of Flash's functionality. I'm specifically interested in adding some features to the Actions panel, like code highlighting.

Anyway, are there any beginner's tutorials out there that can help get me started? Tutorials that explain "what is JSFL" and gives some simpler examples of what it can do. For example, is it just a way to run automated scripts on your files... or can you do things like make your own GUI palettes, modify existing palettes, etc?

Or, if there's a tutorial like that written on this forum, maybe we can sticky it?

Thanks :)

hangalot
01-10-2008, 05:39 PM
jsfl is extremely limited. think of it basically as a macro language which describes user clicks. changing the ide is not really possible (you can write some tools i posted some info on this about 3 years ago) but you are going to frustrate yourself so be warned

shmoo525
01-10-2008, 08:36 PM
From what I've managed to find on the web, it seems like you can create NEW interface panels, but not EDIT existing ones. Is that correct?

PS: Here are some links I found that might help other JSFL noobs like me:

http://mxdj.sys-con.com/read/43530.htm

http://www.flashadvisor.com/tutorial/Dynamic_Content/Organizing_Library_using_JSFL-43.html

http://www.flashadvisor.com/tutorial/Dynamic_Content/Flash_Javascript_API_JSFL-38.html

http://www.devx.com/webdev/Article/20824/0/page/2

http://www.sitepoint.com/article/flash-panels

Also, look at "Extending Flash" in the Adobe Livedocs.

hangalot
01-10-2008, 08:41 PM
you can create new panels, once again tons of niggeling issues. you cannot alter existing ones

jjbilly
01-11-2008, 12:34 PM
Ah, Hangalot, you're sounding jaded!

He's right though shmoo - it is limited, it's maddening to code in, and its buggy: it's frustrating. I'd only embark if you have a particular thing you want to do (and unfortunately, I don't think the actionscript highlighting is a good candidate project - as Hangalot says, you've not enough scope).

Having said that, for the right kind of job, it is very useful, and we make pretty extensive use of it where I work. It would be well worth running past us on this board what you'd like to do before you start though - there's a lot of pain to share. Three years in, it's still got plenty of nasty tricks up its patchy sleeves.

hangalot
01-11-2008, 12:37 PM
hey jjbilly

yeah i am jaded. jsfl is amazing for certain things, automation but the bugs still killl me. the happiest moment in my swf coding recently was switching to eclipse and using ant and custom eclipse plugins

jjbilly
01-11-2008, 12:47 PM
Yep, we've got Nant actually running things, with JSFL doing some of the grunt work. Though we do also write some wizards using windowswfs to let non-Flash specialists configure some template FLAs - and that's where the pain still is.

hangalot
01-11-2008, 01:44 PM
window swf's is the reason i gave up on jsfl, i spent ages writing a library merger tool (and it worked in a weird way) but your clips had to be structered in certain way etc etc. in the end i only used jsfl for compiling and commands.
:'(
i was completely infatuated with it however as coding in flash was such a pain.

shmoo525
01-11-2008, 02:21 PM
Thanks for all the info and advice :)

I wanted to make a panel that would let me highlight (ie; change the background color) of areas of code. This would make it easier for me to quickly scrub through the code to find the function I'm looking for or whatever. (I only know AS 2.0 at this point, mind you.)

Anyway, it doesn't look like that can be done. So my next idea was to create a panel that "bookmarks" my functions and other code sections. It looks like this might work. I'd have to create "markers" in my code, like:


// *myFunctionName*


...because the whole thing would basically be using a search function to find a particular marker and skip/scroll to it. It looks like I can make the Actions panel select certain text using


fl.actionsPanel.setSelection(i,j);


...thereby (hopefully) making it skip/scroll to that text from whatever point I'm at in the document.

I'm basically trying to make the Flash Actions Panel equivalent of HTML's anchor tags.

jjbilly
01-11-2008, 02:38 PM
That looks like something you could do. Will it give you more than the built-in find tool though? Also, if you're coding in AS2.0, perhaps you should consider moving all your code out and using an editor like FlashDevelop or Sepy?

hangalot
01-11-2008, 03:29 PM
If you're coding in AS2.0, perhaps you should consider moving all your code out and using an editor like FlashDevelop or Sepy?
i would like to rephrase that :)

If you're coding you should move all your code out and use an editor.

shmoo525
01-11-2008, 03:54 PM
My idea is not really a search function in its usage. It's a list of links (ie; function names, for example). One click and I can go straight to myCoolFunction instead of scrolling through thousands of lines of code.


Two questions, then (about 3rd party editors) :)

1. Any good editors for the Mac?

2. HOW exactly does that work (using external editors)? Do you just code in the editor then copy and paste it into the Flash Actions panel? Or is there a way to link the .fla to an external AS 2.0 text file?

hangalot
01-11-2008, 03:56 PM
library symbols can be linked to an external as file via the linkage id, then also consider that even _root is a MOvieclip, you can move all your code out of a fla

i always used fdt on pc and mac for flash, you pay for it, but its the best

thexgodfatherx69
02-17-2008, 06:48 AM
hey jjbilly

yeah i am jaded. jsfl is amazing for certain things, automation but the bugs still killl me. the happiest moment in my swf coding recently was switching to eclipse and using ant and custom eclipse plugins

So I have a bunch of .fla files that I need to compile into .swc's for my application. I am thinking of making a jsfl file and then use ant to run that jsfl. I don't really know too much about jsfl though and I was wondering if I am on the right track or is there another way to command line compile a fla?

Thanks for the help :)

hangalot
02-17-2008, 12:40 PM
jsfl is the only way of compiling flash.
ant will kick that off.
still a hassle

thexgodfatherx69
02-17-2008, 09:45 PM
yah... will it always launch the flash application though? I would like to compile it with the jsfl without the app gui launching :(

hangalot
02-17-2008, 09:59 PM
not possible. mtasc is your best bet

redlo
02-02-2009, 03:04 PM
Hi all,
I am trying to use ant for building my project.
I use mtacs for compiling all my AS code, and JSFL for compiling the graphical FLAs.
I am having problem ignoring alerts opened by the JSFL, Any idea on how to get around it?

Thanks
R.