I’ve used JSFL a couple of times, but never really sat down to learn it, so I thought I’d post this little conundrum incase anyone starting to use it comes across it. We’ve just had a call from a friend wondering why his code was producing an error when he was sure there was no error in his code – indeed there wasn’t. The code was a simple one line copy and paste from the Help files, selecting an item from the library.
One thing I found with JSFL is that the commands are cached when they are sitting in your Commands folder. So if you are running them by either double clicking the JSFL file, or going Commands > Run Command and selecting the file you are fine. But beware that if you make any changes to a file once it has found its way into your Commands menu, you’ll have to restart Flash before the changes take effect. As a quick tip I’d probably say when writing and testing the commands, run them from file, and move them into the Commands folder when final.
- Previous Post
- January 24, 2006
- 4 Comments
- Next Post
senocular
Posted: January 24, 2006
Flash Commands are kept in the First Run folder. It is called the First Run folder because these are the files that are copied to the working user directory for Flash when Flash starts. If you want to edit commands you are using in Flash with Flash open, you'd want to edit them from the user directory, not the installation First Run. Those in the user directory are the ones actually being run from the Commands menu in the IDE. However, in editing those files, you will also want to be sure that you don't let your new version get overwritten by the old when you restart Flash again (i.e. copy the newest version into the Commands folder in First Run before restarting Flash).
johannes
Posted: February 4, 2006
there is a command called reload commands. which refreshes these "cached" commands. check out the sample chapter on commands by keith peters todd yard regarding this.
Richard Leggett
Posted: February 4, 2006
Guys thanks for your comments, it's good to know there is a reload commands command, and senocular I hadn't taken into account the user config folder and file copying when Flash boots up, nice tip!
uklon
Posted: February 17, 2006
I found an interesting application wrote in the flash language (itvp). Probably JSFL was used there too...