What is {mdm}Script 1.0?


 

NOTE: FSCommand Usage is now deprecated. It is still available in Zinc™ v2.5 to provide backwards compatibility but should not be exclusively used for new projects. This chapter is included as a point of reference on FSCommand Implementation. All new Zinc™ v2.5 Projects should be scripted with {mdm}Script™ 2.0.

 

 

{mdm}Script™ 1.0 was introduced in 2004 as a replacement for FSCommands. Just like FSCommands, {mdm}Script™ 1.0 is coded directly in your Flash Movie (Using Flash MX, Swift MAX, Adobe LiveMotion etc) but with the advantage of callbacks, result handling and simplified scripting structure. By far the biggest advantage of {mdm}Script™ 1.0 was that it had been developed as a Cross Platform Scripting language - Whilst FSCommands are exclusive to Windows Projectors only, {mdm}Script™ 1.0  is compatible on both Windows and Mac OSX Projector Types.

 

However {mdm}Script™ 1.0 was Asynchnorous in execution (just as FSCommands are) and it still follows some of the basic rules of FSCommands. A list of Guidelines which should be considered when using {mdm}Script™  is composed below:

 

Flash Version Compatibility

{mdm}Script™  is ONLY compatible with SWF's exported to version 6 or higher. {mdm}Script™  is not compatible any previous versions of Flash.

 

{mdm}Script™  Initialization

{mdm}Script™  must be initialized on the first frame of every SWF used in your Project with the code "mdminit();" (without the quotes).

 

Return Variables

Return Variables in {mdm}Script™  Commands must ALWAYS be encapsulated in quotes. For example, mdm.browsefile should look like this:

 

       mdm.browsefile("returnVar");

 

Each return variable in a command must have it's own set of quotes.

 

Cross Platform Compatibility

{mdm}Script™  is cross platform and works on both Windows PC Projectors and Mac OSX Projectors! Please note that if you are developing a Mac OSX Projector only, you MUST use {mdm}Script™ . FSCommands are NOT supported in Mac OSX Projectors.

 

Referencing Variables

Unlike FSCommands, {mdm}Script™  can reference variables from ANY location. You no longer need to declare variables on the _root.