Page 1 of 1

Embedded script file > JavaScript

Posted: Sat Sep 06, 2008 7:59 pm
by jupitor6
Under Layer Settings > Embedded script file, could JavaScript be an alternative to Lua? I think JavaScript should be supported for programmatic animation of objects in layers.

Does Anime Studio have an online user manual that's regularly updated? I'm using Anime Studio 5.6 Pro and the user manual has no information on embedded script file under User Interface > Layer Window > Layer Settings. The screenshot of the Layer Settings panel's General tab does not show the Embedded script file option that comes with AS 5.6 Pro, so an official online manual that's regularly updated would be a great idea. :D

Posted: Sat Sep 06, 2008 11:25 pm
by Genete
You're absolutely right. Read these threads.

viewtopic.php?t=1928 (Embedded scripts)
viewtopic.php?t=1031 (Scripting documentation)

Those and searching the forums is the only information available.

The manual really needs to be updated...

-G

Re: Embedded script file > JavaScript

Posted: Sun Sep 07, 2008 6:38 pm
by heyvern
jupitor6 wrote:Under Layer Settings > Embedded script file, could JavaScript be an alternative to Lua? I think JavaScript should be supported for programmatic animation of objects in layers.
The good news is if you know Javascript, lua is a freaking piece of cake. They are very very similar, and in some ways I like lua better. I picked it up very quickly. Most of my experience was with Actionscript and Javascript. Learning lua was fairly easy to grasp once I got into it. I even converted a bunch of 2D Actionscript physics scripts into lua. There is a ton of stuff on the web for lua.

It would be nice to have JS support but I don't think that is likely to happen. Lua is designed for this type of application embedded scripting from the start. It has much more support for linking to the application built in. Javascript would need more development time with AS to do the same thing. Although Javascript has gotten into more things lately (Apple Widgets, MS Gadgets etc) it is still focused more on web applications. Javascripts core functionality is the DOM of web pages.

I would like to see JS support in AS mainly for exporting to Flash. Lua is just as powerful as JS or Actionscript and wicked screaming fast. If there were a way to "convert" lua to JS in exported SWF format scripted animations from AS would work in Flash. Who knows, there are "add ons" or "modules" for lua and someday there might be some kind of interpreter.

-vern