Okay, I was originally going to reply to Stan and say that I never used data
binding on this project. Data binding is a feature of the components, and I'm
not using any. But after reading Scott's post, it seems as though he is right
and you are referring to the AS editor's pinning feature.
Yes, I have edited scripts while they were pinned. Though to be honest, I've
never done it intentionally. I haven't completely figured out how the pinning
works. All I know is sometimes when I click on a frame and press F9 I'm
confused wondering why I'm not seeing the right code, then I realize that pin
icon is pinned down.
Earlier today I decided that the best solution for now would be to use JSFL to
create a command that would Save As to the same file I'm working on. Then I
could map Ctrl+S to that command, and it'd feel the same, but it'd be using
Save As rather than Save. But after spending many hours exploring the
intricacies of JSFL, I decided it wouldn't be possible to do directly.
If you Save As to the same filename, Flash automatically uses the Save method.
So I tried many workarounds. One method was to try and Save As to a temporary
filename, then Save As back to the original, but that didn't work since using
more than one Save command in one script behaved screwy. I looked at all the
commands available, and I couldn't find one that'd update the correct
information to allow it to work.
I couldn't even Save As to a temp file, close all the files, reload the temp
file, Save As to the original file, and reload it. The way it dealt with it
required the script to execute first, using only 1 File Saving command before
it'd refresh everything.
So instead I scrapped that idea and used a different approach. I've created
three scripts.
[L=
http://www.kauldron.com/source/]
http://www.kauldron.com/source/[/L]
1) Save as current version
This script will use the Save As method as far as I can tell. Here's how it
works... Let's say you start a new file and add a few things, you then select
this command and it pops up the Save As dialog as it normally would if you hit
Save. You save to a file called, "superman.com.fla". Okay, now you add a little
drawing of superman, and then you hit this command again and it automatically
saves to, "superman.com_001_a.fla". Then you realize his cape was blue, so you
change it to red, and hit the command again, and now you are automatically
saved to, "superman.com_001_b.fla". If you save again it will be back to _a,
and so on. By saving between these two files, _a/_b, it seems to use the Save
As method instead of Save. So a new file will be written, it will have a
smaller filesize if you deleted something from your movie, and it shouldn't
lose data from the bug like Save does.
2) Save as current version then preview
Same as above, except after saving it will automatically preview your new file
3) Save as next version
The first script is used to save minor changes as you work, to make sure you
don't lose them. But this script is handy for saving big changes. Let's say I'm
done drawing my superman, and have now animated him flying around. This is a
pretty big change, so I run this command, and my file that once said,
"superman.com_001_b.fla", is now saved as, "superman.com_002.fla". I'm now
ready to close Flash and go to sleep, in the morning I can load up 002, and
start using the first command as I make small changes.
I haven't used these scripts in a production environment yet. But I've tested
them out and fixed any bugs I found. If someone finds them useful, I suggest
that you first test them on temporary files before applying them to your
important material. If they somehow mess up and you lose data, I don't want to
be responsible.
I used 3 digit numbering so that it can be used for 999 versions. If this
isn't ridiculous enough, after you reach 1000 it will append _001 to 1000 and
start all over again. :) If you prefer 2 digits the script is easy enough to
modify to do just that.
After you copy the .jsfl files into your Commands directory they will show up
in the Commands menu. Then if you go into your Keyboard Shortcuts you can
change your Ctrl+S shortcut to run the, "Save as current version", and maybe
change Ctrl+Enter to, "Save as current version then preview".
A few notes about using the commands... After saving with them, the * next to
the filename doesn't disappear. So it looks like you didn't save, but if you
close the file and re-open it then you can see that it did save. Also, make
sure you save using the command before you close Flash. When you close Flash it
will then warn you about not saving, and you should click no to keep it from
appending to the file. As long as you saved before exiting then there's no data
loss.
I'll be using this setup for working on my projects, so if there are any
problems I'll probably find them and I'll upload revised versions of the JSFL
files.
If anyone knows of a way to use Save As to save to the same file you are
working on using JSFL, then I'd be interested to know. That might be a cleaner
approach than alternating between _a and _b.
Assuming Save As isn't affected by the bug, and that these scripts I made are
truly using Save As, then I should be able to hit Ctrl+S like normal, without
consciously going out of my way to work around the bug.
Sometimes I wonder if the reason why Macromedia decided to create JSFL was so
that they could rely on the users to build work arounds for bugs, or things
they left out. :)