Navigation:  Advanced >

Multimedia Extension

Previous pageReturn to chapter overviewNext page

SCRIPT for WEB/MM Extension

Menu: Files - MM & Script Export

Script, is a very powerful feature of WEB/Multimedia Export, allowing you to create text based documents, such as: HTML, XML, Java Script, CSS, and more.

It is up to you to decide what you want to do with the images. You can load them into your multimedia authoring tool, create a web page or Java script buttons etc. Or anything else that you might want.

Instead of doing these operations manually you can use the Script Generator to create the files for you.

script

The Script window appears after you select a MM & Script Export export type other than Multimedia Builder. For example, Web/Multimedia using JPG files. First you will be prompted to save the Main file - the background.

All other file names will be derived from this name by adding a number, and one of the letters a,b,c characterizing the frame, Normal, Over or Down.

The Web/Multimedia Script Generator window has 3 major areas:

A Script list. Here all the scripts stored in the directory, Script will appear. Script is a readable text format with the extension *.mms
An edit box, where you specify the name of an output file. This file will be saved in the same directory as you saved the main background image. You also have a Test button, and by pressing it, the output file will be run in a similar way as if you had double clicked on it in Explorer. For example an html file will launch a web browser, a text file or notepad etc.
A Script/Output windows. In this Script you have the source of the script as loaded from the Script List. In the Output window, you will see the generated output file - the file you want to create with the script.

The Script is based on a few tags, each with some connection to the exported image, such as filename, size, position etc. These tags will be replaced on the output image with the data behind the tag.

Script Tags

All script tags are uppercase. The tag must be exactly in the format as described.

<#EXTENSION>

This tag is followed by an extension that will be used to create the filename of an output file. This tag should be in the comment area of the script, before <#SCRIPTSTART> tag.

Example: <#EXTENSION>html

<#SCRIPTSTART>

This tag divides the script into the comment area and the main script. You have to use this tag even if you don't put anything in the comment area.

<#BGWIDTH> and <#BGHEIGHT>

The dimension tags of the background (main) image. This is the same as a document size.

<#BGFILE>

The filename of the background image - that's the file you specify before entering the Script Generator.

<#LOOP> <#END>

You can have more than one object to be exported, so it is necessary to specify the part of the script which will be used for all objects. You do it with the loop/end pair. Everything inside this pair will be generated for each object.You can use the loop/end pair more than once in the script, however they can't be nested one inside the other.

<#OBJECTNUM>

A number of the object and the counts start from 1.

<#OBJECT>

A name of the object - it is the same as a filename but without the extension.

<#LABEL>

A label of the object - this is what you enter if you double click on the object in the Layer Bar.

<#FILE0>

Filename of a Normal Frame Image of the Object.

<#FILE1>

Filename of a Over Frame Image of the Object.

<#FILE2>

Filename of a Down Frame Image of the Object.

<#LEFT>

A left position of the object relative to the background left/top corner.

 

<#TOP>

A top position of the object relative to the background left/top corner.

<#RIGHT>

A right position of the object relative to the background left/top corner.

 

<#BOTTOM>

A bottom position of the object relative to the background left/top corner.

<#WIDTH>

The width of the object, obviously width = right-left.

<#HEIGHT>

The Height of the object. Height = bottom - top. (Because the 0,0 is in left to corner)

Everything in between script, is the language you use for your file, for example for Java Script it is a Java Script...

Managing Scripts

You can easily create a new script by simply selecting any of the existing scripts and Pressing the New button. You will have to type a new name into the box, near the New button, and then press Create.

This will create a new copy of an existing script.

If you adjust the script, you can save it back to the file, but make sure that you're editing the Script, and not the Output!.

Just press the Save button.

Delete, will delete the script from the list.

When you modify the Script window, the Output window will be updated. You can also modify the output window directly, but this won't be translated back into the Script window. It could be used however if you wanted to make something quick, in to special case.

All scripts are located in the Script directory.

See next chapter for some real-life examples.