So my script is setting a custom var on library items in a collection. To my surprise, the variables retained their data the next time the script was run, so I had to include a loop which reset the data to defaults before running.
This is prety cool!
My question is this: If I were to want this, would the data save to the .FLA file and be retained the next time I opened it?
Nope.
But the LibraryItem class is dynamic, therefore you can set properties on it without any problem within a session. Some classes, like Document, you can't.
xJSFL even defines a shortName getter on the LibraryItem.prototype at startup, so you can do this:
var item = $library.items[5];
trace(item.name);
trace(item.shortName);
// assets/graphics/Symbol 01
// Symbol 01
Generally though, xJSFL doesn't extend native items, it would subclass or wrap them.
If you're setting variables on native objects, such as a counter, I'd think you'd probably want to think of another way to do what you're doing.