Importing AutoPlay Media Studio 7 Projects

AutoPlay Media Studio 8 is almost fully reverse-compatible with version 7 projects, however due to an update of the Lua scripting library, there may be some minor changes required after opening your v7 project in version 8.

Lua Language Changes

AutoPlay Media Studio now contains an updated version of the Lua scripting library, version 5.1 (previously 5.0). AutoPlay's version has been compiled to try to maintain compatibility, however there are some minor syntax changes/deprecations made to the language that you need to be aware of for future development as well as previously created projects and lua scripts.

When importing a project made with an earlier version of AutoPlay Media Studio, AutoPlay Media Studio 8 will automatically analyze your project file and create a report detailing any areas where it thinks the old style for loop is in use. If there are any old for loops found the report will automatically be saved in the same folder as your new 8 project file and opened in your default web-browser. We recommend analyzing each line of code found in the report to ensure that you only use the new for loop syntax.

Table Iterating For Loops

The syntax for iterating a table using for loop using in has changed (has been deprecated) If the syntax is not changed, a runtime error will be thrown when executed.

Old syntax:

mytable = {"One","Two","Three"};

for k, v in mytable do
    Dialog.Message("Table Item", k .. "=" .. v);
end -- for

Needs to be changed to:

mytable = {"One","Two","Three"};

for k, v in pairs (mytable) do
    Dialog.Message("Table Item", k .. "=" .. v);
end -- for

The functions table.foreach and table.foreachi are also deprecated. You can use a for loop as above with pairs or ipairs instead. While these two are deprecated, they still work (unlike the example above), however you are advised to also rework these types of loops in case they are removed from future versions.

If you commonly use Lua functions (non-AutoPlay actions) in your scripts, you may also want to review the list of other changes to the language in case other changes affect you. You can find this information in the Lua 5.1 Reference Manual found on http://www.lua.org.

Plugin Changes

As of AutoPlay Media studio 8, only plugins created with version 2 of the Plugin SDK (or higher) are compatible. When a version 7 project is opened in version 8, the project is analyzed to determine if it contains any plugin objects or actions. A list of these can be viewed in the analysis report that is automatically generated under the heading "Legacy Plugins."

In order for your project to work you will need to obtain updated versions of the plugins listed. Once you have the updated version of these plugins, simply install them into the correct plugin directory and your project should work properly. If you have already installed versions of the listed plugins that were created using version 2 of the Indigo Rose Plugin SDK then no further action is necessary.