Introduction
Top Next

swishmaxlogo

SWiSHmax is a new addition to the SWiSHzone family of Flash™ authoring tools. If you want to create stunning and powerul Flash™ animations without using Flash™, then SWiSHmax is the tool for you!

SWiSHmax is so easy to use, you'll be producing complex animations with text, images, graphics and sound in no time. SWiSHmax now has over 230 built-in effects like Explode, Vortex, 3D Spin, Snake and many more. SWiSHmax has tools for creating lines, rectangles, ellipses, Bezier curves, motion paths, sprites, rollover buttons, and input forms all in an easy-to-use interface.

The big difference between SWiSHmax and SWiSH2 is a fully implemented scripting language: SWiSHscript.However there are many other fantastic new features which distinguish it from SWiSH2.

If you are over battling with complicated, expensive programs, use SWiSHmax. SWiSHmax takes the drama out of dramatic effects.

SWiSHmax exports the SWF file format used by Macromedia Flash™, so your animation will play on any machine that has the Flash™ Player installed.

SWiSHmax animations can be incorporated into any web page or imported into Flash™. They can also be sent in an email, embedded in a Microsoft PowerPoint presentation or included in a Microsoft Word document.

See the Purchasing SWiSH section for details on how to buy and unlock SWiSHmax.

Minimum system requirements:
· Windows 95/98/ME/NT4/2000/XP
· Pentium P2
· 64Mb of RAM
· 800x600 pixels by 256 color display
· SWiSHmax does NOT require Macromedia Flash™ be installed on your system.

Special thanks go to the SWiSHzone team for all their help.


What's New in SWiSHmax
Previous Top Next

SWiSHmax is a new addition to the SWiSHzone family of Flash™ authoring tools. Here are a few of the major differences:

Scripting
· Advanced scripting capabilities through the use of SWiSHscript
· A new Script editor allows the advanced user to directly enter scripts
· A new 'Debug' Panel simplifies finding and fixing errors in your scripts
· Copy and paste your scripts across Objects and Sprites
· New Physics properties simplify gaming and other scripted movements

Effects
· Now bundled with over 230 built-in Effects
· The ability to author and distribute your own Effects
· All Effects can be added to multiple Objects at once

Drawing
· Input and Dynamic Text functions allow you to create input forms
· Complex Shape editing options have been added to make it easier to modify your shapes add perspective, slice a section or break it into pieces
· New AutoShapes simplify adding and editing Complex Shapes like 3D cubes
· New guide, grid and advanced snapping options
· Alignment options to help align and organise your Movie's Objects
· Text Objects now have more word-processor-style options including better spacing, margins and word-wrapping

Interface
· Objects, Frames and Effects can all be added, modified or deleted directly from the Timeline
· Managing all Objects used in your Movie is made simple with SWiSHmax's content management features. You can quickly see all Objects used in your Movie, delete unused Objects, import new Objects and define global settings
· New Templates allow you to add common features to your Movies

Import & Export
· Enhanced image editing and compression settings. You can adjust brightness, contrast, hue and transparency and select compression and optimisation settings
· Vector shape optimization, similar to expensive third party flash optimisation tools. Allows vector shape optimization to be controlled from Movie level down to individual Objects
· Produce compressed SWF Movies, supported by the Flash 6 Player
· Sound files have enhanced controls and compression options
· Other transparent features have been added to reduce SWF file sizes, such as automatically removing Objects no longer visible or off-stage
· Frame Rate Synchronization can be used to accurately synchronize sounds and animation
· SWiSHmax supports importing more features of Movies produced in Macromedia Flash™ including commonly used Actions and clipping (mask) layers
· Export your SWF Movies as a Flash™ Projector executable

And much much more....


Getting Started

A bit of history
SWiSH will allow you to create Flash™ content to add images, animation, sounds, and interactivity to your web site. You can use this application to create introductions, commercials, banners, menus, and complete web sites. SWiSH revolutionized the Flash™ industry with its first release in April 2000. For the first time, complex-text effects could be created in minutes that had previously taken hours to create in Flash™. SWiSH is so intuitive and easy to use young children enjoy using it, and it is being used in schools throughout the world.

SWiSH v1.5 was the second release in July 2000, which had the added ability to include both sounds and images in the animations. SWiSH v2 took another giant step. Along with its new interface, the application added many features to allow users to create richer and more complex animations and web sites. SWiSHmax improves on v2 with even more simple to use, yet powerful, features. SWiSH developers are dedicated to keeping the application intuitive and easy enough for the non-professional to use, while adding those features most requested by professional users. If you haven't already read a list of these new features, they are listed and described in What's New in SWiSHmax.

How your Movies are played on the web
SWiSH will create four files: the .swi - the file format that the application reads and writes to; the .swf - the file the Flash player reads; the HTML page or code the browser uses to display the Movie; the .avi - a video format. You can also create a stand-alone projector .exe file via the Flash Player (see the FAQ on exporting). To display your Movie on the web, you need to upload the .swf to your server. Although a .swf can be played over the web without being placed within a web page, it is typically embedded within one, so unless you know how to do this, you will want to upload the HTML page as well.

Helpful hints when creating your Movies
Flash has quickly become the technology of choice for creating rich, interactive, multimedia content for the web. Three factors that have greatly contributed to the technology's popularity are:

1. the .swf format can compress both images and sounds
2. the format allows for the inclusion/use of vector formats, scaleable graphics with very small file sizes
3. the Flash player's streaming capabilities, which allow preloading images and sounds into the visitor's browser cache, and animation to stream while playing, rather than making the visitor wait for it to fully download.

Keep in mind that, at the time of this release, most visitors are using a dial-up service to access the internet. Therefore, although your Movies will be streamed, the speed is limited. To ensure your visitors view your Movies correctly and without pauses in the flow of the animation, you will need to ask them to wait while a portion of your Movie has a chance to preload. The larger your .swf file size, the longer they will have to wait. We include a tutorial on how to make a Preloader, which gives your viewer the status on the loading .swf.

There are a number of things you can do to keep your file sizes smaller, to minimize the time a visitor has to wait for the Movie to begin. Images, music, sound effects and animation effects all add to the file size of the .swf and can quickly increase the file size. For this reason, it is wise to consider each of the files you plan to add to your Movies. SWiSH will allow you to compress both images and sounds.

Run through the tutorials we have supplied. These examples will give you good grounding in the use of SWiSH and how to put together a SWiSH-based web site.

Don't forget that there is a lot of support available through the growing community of Support Forums for SWiSH.

Keep on SWiSH'n.

Conventions used in this manual
Throughout this manual we refer to Menu selection options in the following format - Edit | Copy (Ctrl+C). This means to select the main titlebar 'Edit' Menu and from within it, the 'Copy' option. An equivalent quick key sequence is performed by pressing the Control key (Ctrl) and the C key together.


Sample Movies

Sample SWiSH Movies

The following examples are included in the Samples folder to illustrate some of the potential of SWiSHmax.

These samples can be viewed using the Menu commands File | Samples.

Snakes.swi
This example was produced by Roger Onslow to illustrate the many Effect variations possible using the Snake Effect in SWiSHmax. A study of the settings used in each of these variations will assist you in understanding what they do. It also includes Scenes that demonstrate a Radarscope Effect and a Spotlight Effect produced with a masked Sprite and three Vector Objects.

Pseudo3D.swi
This example, produced by Dawn Barrie, also shows some variations on the Snake Effect, but uses the Gradient Fill properties of Vector Objects to show how a pseudo 3D Effect can be produced. It also demonstrates an Explode Effect applied to a 'sheet of glass' (a group of Vector Objects).

Ray of Light.swi
This example was also produced by Dawn Barrie to illustrate the use of Vector Objects and gradient fills to produce the Effect of light beaming out from, and sweeping across, the letters of a word.

Spritedemo.swi
This example was produced by David Petley to illustrate the use of masked Sprites. An inspection will show the use of Sprites within Sprites.

Actions.swi, Buttons.swi, First.swi
The Actions, Buttons and First samples are used in the tutorials.

Three other examples from SWiSH v1.5 are also included. They illustrate some basic techniques.

Promo.swi
The demonstrates how Text Effects, including Squeeze, Scale and Wave are simply and effectively applied.

Preloader.swi
This is a basic preloader. SWiSHmax provides more Preload Options, but this shows the basics.

Menu.swi
This example shows how easy it can be to apply Mouse Events to Text Objects and, although this only shows the Goto URL Action, there are many other Actions that can be applied.

Many more samples are available at www.swishzone.com/movies.php.


Credits

The SWiSHzone Team
Many hours of labor and love have gone into bringing you SWiSHmax. Thanks go to the following courageous souls: David Michie, Hung-Hsin Chang, Roger Onslow, Gus Nalwan, Jason Bennett, John Collingwood-Smith, Hugh Boyd, Caitlin McKelvey, Susannah Huntington, Nathalie Albouze, Andrew Glover, Lana Khoury, David Petley, Dawn Barrie, Jon Herron, Deborah McRitchie, Simon Collingwood-Smith, Cameron Browne and James MacGregor.

External Credits
SWiSHmax is a Macromedia Flash-enabled application. SWiSHmax incorporates the Flash Player which enables it to preview .swf animations without launching an external player or browser.
flashenabled

SWiSHmax incorporates the LAME MP3 Encoder. LAME is distributed under the GNU Library General Public License. The LAME source code can be downloaded here.
lamelogo
This Help File was made with EC Software Help & Manual.
The SWiSHmax installer was created using MindVision Installer VISE.
Thank you to Flash Kit for hosting the Swish Support Forum.

Ó Copyright SWiSHzone.com Pty Ltd 2003
Help Manual Release 3.2 (Tuesday, 2 September 2003)


Purchasing and Licensing

Most SWiSHzone.com products are protected from piracy by a software licensing system.

Depending on the product, a free trial period is normally allowed. The trial period (if enabled) will give you sufficient time to fully evaluate the terrific value of our products.

To activate your free trial, you will need to obtain a trial Site Key. See the Trial License section for more information.

You can purchase the product before or after the trial period has expired, but once the trial period has expired you will no longer be able to use this product on your computer on a trial basis.

To purchase the product, see the Registration section for more information.

SWiSHzone.com works hard to produce reasonably priced software. In addition to our reasonable prices, there are additional discount options for network-license versions and educational users. Look for details at www.swishzone.com or contact Sales and explain your requirements. There is sure to be a solution to suit your needs.

Please refer to the following sections for assistance:

· Register gives detailed instructions on how to access the Unlock web page. From that page it is possible to purchase and / or obtain Site Keys. An overview of the purchasing and licensing options is presented on our purchase pages.
· Licensing notice explains how to get information on your license and our licensing policy
· Network License can be used if you want to run SWiSH over a network

Finally, we have a list of the most frequently asked questions on licensing and the protection system.


Frequently Asked Questions

How do I install on a NT / Windows 2000 or XP system so that the program is available to all users?
See the section Multi User use on XP / Win2000 / NT.

How do I update my software?
If an update for the program is available for download or on CD, follow the instructions supplied.
In all cases, please run the installer. Do not copy SZP .exe's directly between machines as this may cause incomplete copies or other errors.

I used to work on two computers (home and office). Can I install my software on both computers?
You are entitled to a License for home and office. Follow the instructions in the Register section to generate a second Site Key for your software. This policy does not apply when a multi user network license has been purchased.

Can I just copy my SWiSHzone program to another computer?
No. The copy protection software will prevent the second copy from working. You can however register two copies according to our home and office policy described above. Run the installation program on the second computer then follow the instructions in the Register section of this document.

Can I run my single user license copy on a network drive?
Yes. However each machine that references the installed program will require a local installation (possibly to the same network drive) and a local license.

What happens to the protection software when my computer HDD crashes and is replaced by a new one?
Follow the instructions in the Register section.

Is a Site key required during the free trial period?
Yes, Follow the instructions in the Trial License section.

What is my Site Code?
See Site Code.

What is my Site Key?
See Site Key.

How can I obtain a Site Key?
Go to the unlock page. This page can be accessed via the "Get Free Trial Key" or "Register" buttons of the 'Unlock' window.

I received the Site Key, but I can not see the difference between the number 0 and the letter O.
Because of the length of the Site Key, we recommend that cut and paste be used to transfer the site key.

Why can't I use the same Site Key multiple times?
The Site Code generated during the installation of the software depends on the computer. A new Site Code is generated if you install the software on another computer. Consequently, you cannot use the same Site Key for another computer. It is the Site Key that permits starting and using the application after the trial period.

For some reason I need to re-install my software. What happens with the Site Key?
If needed, go to the unlock page. This page can be accessed via the "Try" or "Unlock" buttons of the 'Unlock' window.

I want to license a machine that is not connected to the internet?
Paste the Site Code displayed in the 'Unlock' window to a text file and transfer that file to a computer that is connected to the internet. Access the Unlock web page and use the Site Code from the text file. Paste the resulting Site Key back into the text file and transfer back to the original computer.

I still need help...
If your questions are not answered here, contact your dealer or connect to the internet and use the "Try" or "Unlock" button to access the unlock page. From this web page, follow the Help link.

Please include the following information if available.
· The email address that you registered SWiSH under.
· World pay reciept ID number.
· Operating system, 95 / 98 / ME / NT / Win2k / XP

Please also state:
· If you have previously un-installed SWiSH
· Anything unusual about your system, huge disks, dual processors etc.


Trial License

A trial License allows the user to evaluate the SWiSHzone.com product for a limited time. Typically, the evaluation period will be for 15 days or 45 invocations (which ever occurs first).

Note: Some SWiSHzone products do not come with a Free Trial Period. See here for more information.

If you are already using a trial license and would like to find out about obtaining an unlimited license, see Registration for more information.

When first installed, the product will be unlicensed. (See No License).

To obtain a trial license, connect to the internet and press the "Try" button. This will activate a web page to obtain a trial Site Key that is matched to your Site Code.

Please read the Notes section for important information about when the trial commences, activation time and issues relating to multi user use on NT / Windows2000 / XP machines.

Pasting a valid Site Key into the edit box will cause the Site Key OK dialog to be displayed. Pressing Continue will activate the product.

While using a trial license, a 'Unlock' window will be displayed during startup. This window allows displays the current trial license status and gives opportunity to purchase and register the product. See Registration for more information.

Note: See the section Multi User use on XP / Win2000 / NT if you are installing on one of those operating systems and require multiple users to have access to the program. Although the trial can only be used by the person who installed it, it should be installed by an administrator account if you require multi user access in the future.


Notes

· Some SWiSHzone.com products are not available for trial use. See here for more information.
· Only 1 Trial Key will be issued to each computer. Support will NOT issue replacement trial keys.
· The trial period commences when the Site Key is first activated (pasted into the Site Key edit box).
· The available invocations will only decrement if the SZP is used. Pressing the cancel (x) button of the Unlock Window will allow viewing of license status without running the SZP and subsequent decrement of the available invocations.
· The Trial Site Key should be activated within 2 days. There is a timeout period, after which the site key will become invalid.
· Ensure that the date on your computer system is set to the correct date when activating the site key. Dates set in the future or in the past will invalidate the site key.
· When installed on a NT / Windows2000 / XP system, only the user that installs the SZP will be licensed to trial it. Other users attempting to run the installed product on the same computer using a different login will receive a status number 1011 indicating that the product is unlicensed. This WILL INVALIDATE the Trial Key for ALL users. (This limitation only applies to trial licenses, not Unlimited Site Keys.)
· See the first note above. Trial Keys will not be re-issued because of failure to follow the above suggestions.


Products Without Free Trial

Some SWiSHzone.com products do not come with a free trial period.

The Product Splash Image will indicate if a free trial period is available for the product you are using. If a trial is not available, the "Try" button will not be visible.

The following SWiSHzone products do not have a free trial period:
· SWiSHsites


No License

After installing the product, one of the following windows will be displayed if no previous license was found.

This window above indicates that a trial license is allowed for the product.
To obtain your trial license you will need to:
· Connect to the internet.
· Activate the unlock web page via the "Try" button.
· Paste the Site Key that was obtained from the web page into the Site Key Edit Box.

The window above indicates that a trial license is not available for the product.
If you have already purchased the product, you can unlock the product by pressing the "Unlock" button.
Once you have recieved your Site Key, use copy and paste commands to Paste it into the Site Key Edit Box.
If you have not purchased the product, you can access our web based purchase pages by pressing the "Buy" button.


Paste Unlock Key

Once a Site Key has been copied to the clipboard, Button B1 will change to a "Paste Key" button.

The Site Key can be pasted by pressing the "Paste Key" button or using standard paste procedure so that the Site Key is pasted into the "Site Key Edit Box".


Site Key OK

If the Site Key is valid, the following window will be displayed:

Press OK to remove the Congratulations dialog. The appliation will then start.
On subsequent invociations, press the Continue button to use the application.


Trial has ended

After the trial has ended the Unlock Window will appear as shown below.
Note that the Get Free Trial / Continue button is missing (no longer entitled to free trial).

To continue using the SZP, use the "Buy" button to purchase then obtain an Unlimited Site Key using the "Unlock" button.


Licensing Notice

Unless registered, the Product will cease to function after the trial period indicated on the start-up splash screen. No data is lost or destroyed when the trial period expires. Licensed (Registered) users can unlock their software on a permanent basis anytime during or after the trial period. Detailed information on unlocking the product can be found in this manual.

The 'Unlock' window CANNOT be accessed while the Product is in use. The 'Unlock' window will be displayed each time the product starts if using a Trial License. The 'Unlock' window will also be displayed if the license has expired or been made invalid for some reason.

The CD-ROM or download installers DO NOT self-destruct after the application is installed. They can be used to install the Product on an infinite number of PCs. However each PC will require either a trial or unlimited license to run. We encourage potential customers to install the product on multiple PCs for evaluation purposes. Keep in mind, however, that you must purchase a license for each PC you wish to run the Product on a permanent basis.

Variations from the aforementioned policy will be at the sole discretion of SWiSHzone.com Pty. Ltd.


Registration

To remove the time or runs limitation of the trial license, or to re-activate the product once the trial period has expired, it is necessary to purchase an unlimited license and install an Unlimited Site Key.

When the product runs using a trial license, the dialog in the Start up with trial license section is displayed. This dialog allows the user to see the current license status.

You can access the purchase pages using the "Buy" button. Once you have purchased a license, that license will be associated with your email address. Using your email address, you can then generate an Unlimited Site Key which will permanently enable the product.

To purchase the product, use the "Buy" button to access our web based shopping pages.
To Unlock the product, use the "Unlock" button to obtain an Unlimited Site Key. This can also be used to re-license the product after some error.

See the Register section for more information.

Note: See the section Multi User use on XP / Win2000 / NT if you are installing on one of those operating systems and require multiple users to have access to the program.


Start up with trial license

While running with a trial key, the following dialog will be displayed each time the product starts. Press the Continue button to use the application.

The dialog also shows the time and runs remaining on the trial license.
To purchase an unlimited license, connect to the web and press the Register button.


Unlock

Press the "Unlock" button of the 'Unlock' window to open a browser window that attempts to connect to the Unlock web page. This will also re-enable the Site Key Edit Box allowing a new site key to be pasted.

If connection is successful, the page will request the Site Code and the registered email address.

If you accessed the unlock page via the "Unlock" button, your current site code should have been automatically entered into the unlock page. This can be ammended if necessary.

If the registered user owns a valid license, a site key will be created and emailed to the registered email address.


Notes

When using NT / Windows2000 / XP, installation of the SZP and subsequent activation of the Unlimited Site Key by an administrator account will allow all uses of the system to use the SZP on that computer.
Installation and activation of the SZP by non adminsitrator accounts is possible. However, the license will only be useable by that user.
Upgrading the operating system, changing hardware or reformatting disk drives may cause a previously licensed system to become unlicensed. Follow the procedure in Register to obtain a new key.


Problems

If you encounter problems during the licensing / unlock process, connect to the web and press the "Try" or "Unlock" buttons to access the unlock page. From this web page, follow the Help link.

This is the preferred method of accessing the help page as it will transfer important information about your Site code and error number to our support staff.

Alternatively, you can contact our support staff via http://support.swishzone.com/support.asp


Network License

SWiSHloc supports network licenses.
This type of licensing requires a network server which should be running NT, Windows2000 or XP.
Client machines can run 95, 98, NT, Windows2000 or XP.
The network must support TCP/IP.

This type of setup is normally very attractive for large office or teaching institutions as the site key used by each of the client machines is identical.

The cost of a network license is identical to the equivalent number of single user licenses. Volume discounts still apply.

Detailed installation instructions and various network tools are included with the network installation package.

Because of the general complexity in setting up network solutions, the network installation package is not available automatically from our web site. Please contact Support with your requirements.

After analysing your requirements, If a network solution sounds like a useful solution, we will send you the network installation package.

Network licenses will not be supplied for sites with less than 5 seats (licensed users).


Multi User use on XP / Win2000 / NT

SWiSHzone.com products can be installed on a NT/Win2000/XP so that they are available to all logins. Note that this only applies to full (non trial) unlock keys. A trial key is only available to the user who first unlocked the program.

To allow all users access to the program, the following steps must be followed:
1. The original installation and unlock must be done by an administrator account.

2. The install directory must be shared so that other users can read the files. (Write permission is not required). Individual users must not refer to their own installed area as this will cause problems when installing updates.


SWiSHloc

SWiSHloc is the copy protection system used to protect a number of SWiSHzone Products.


SWiSHzone Product

SWiSHzone.com produces a number of products.
For the purposes of this document, a SWiSHzone Product (sometimes referred to as SZP) is any product that uses the SWiSHloc method of copy protection.


Registered Email Address

The Registered Email Address is the email address that was used when a Registered User purchases the product.
The registered email address is used to track registered users on our database. The registered email address is also used to determine license ownership and consequently associated Site Key generation
permissions.


Registered User

A Registered User is a user that has a valid license for the SZP. Licenses can be obtained by purchasing the product.

A registered user with a valid license can visit the Unlock web page to obtain an Unlimited Site Key that will allow them to unlock their product on a permanent basis.


Site Code

A Site Code is used to identify a computer.

The Site Code is a 32 character string that is displayed in the 'Unlock' window.
An example site code is S18848NNK6189N93L22W86FTA8EJ4729

A corresponding Site Key available from our Unlock web page will unlock the application.


Site Key

A Site Key is an encrypted string that is created to match the Site Code.
The Site Key is often referred to as the "Unlock Key". It contains information about the particular type of license a user owns.
A Trial Site Key is a special key that allows timed use of the product.
Once license ownership has been verified, the program is unlocked according to the license constraints.

The Site Key is a long character string enclosed by {}.
An example Site key is

{SH44VGGR9R66TFK2WETCAWCSK7SBKZQTUS44UUWEYBNY7GK9MTMG6DJWHP
WCFF72BJMWBR3PZLMQ6C8KJ55UQN9B7A872WWS82WCMN4VJCBLBJNMTJ4X}

When pasting the Site key, include the opening and closing {}.


Site Key Activation

The process of pasting a valid Site Key into the Site Key Edit box that is displayed in the Unlock window.


Trial Site Key

A Trial Site Key is a key that is free issued to computers that are not shown as having previously been issued with a trial key.
The Trial Site Key limits program use according to both time period and invocations. (Typically 15 days / 45 invocations, which ever occurs first).
Otherwise, the program is fully functional.

See the notes section for other special requirements assocated with trial keys.


Try Button

This is button B1 of the Unlock Window. Note that this button is only visible after a fresh installation of the product.
Use this button to open the Unlock Web Page and obtain a Trial Site Key.

When this button is used to open the Unlock Web Page, your Site Code will be sent to the website eliminating the need to re-type the Site Code.

In some cases, the button may fail to function correctly because it is unable to determine the location of a default web browser.
The computer should be connected to the Web prior to pressing this button.

Note: Some SWiSHzone products do not come with a Free Trial Period. See here for more information.


Unlock Button

This is button B3 of the Unlock Window.
Use this button to open the Unlock Web Page and obtain a Unlimited Site Key.

When this button is used to open the Unlock Web Page, your Site Code will be sent to the website eliminating the need to re-type the Site Code.

In some cases, the button may fail to function correctly because it is unable to determine the location of a default web browser.
The computer should be connected to the Web prior to pressing this button.


Unlimited Site Key

An Unlimited Site Key is a Site Key that indicates that the user owns an unlimited license for the product. When this Key is entered, the trial key time / invocations limitations are removed.

Once an unlimited Site Key has been entered, the Unlock dialog will no longer appear unless some error or machine re-configuration invalidates the license.


Unlock web page

The web page http://support.swishzone.com/unlock.asp can be used to obtain Trial and Unlimited Site Keys.

This page can be accessed from the Unlock Window via the "Try" or "Unlock" buttons.

If possible, access the page using the "Try" or "Unlock" buttons as this will automatically transfer your site code to the web page.

Note that Unlimited Site Keys are only available to Registered Users and the Unlock web page will require your Registered Email Address to produce one of those Keys.


Unlock Window

This is the main SWiSHloc dialog window.

This window provides allows you to:
Unlock your SZP by pasting an appropriate Site Key into the Site Key Edit Box.
· View the current license status (If license is valid, press "Continue", button (B1) to start the SZP.)
· Obtain a Trial Site Key via the "Try" button, (B1).
· Purhcase the application via the "Buy" button, (B2).
· Obtain an Unlimited Site Key via the "Unlock" button, (B3).

If the product is using a trial license or is currently unlicensed, the Unlock window will appear each time the SZP is started.

Product Splash Image
This image identifies the product. The text indicates if a trial period is normally available for the product.

Site Key Edit Box
This Edit Box allows the pasting of Site Keys. After a valid site key has been entered, the edit box will become disabled.

Site Code
The site code for the product and your computer is displayed here.

Computers that are not connected to the internet can be licensed by transferring the Site Code (use cut and paste) to a text file which is then transferred to another computer that has internet access. From the internet connected computer, access the Unlock web page and obtain a Site Key using the Site Code from the text file. Paste that Site key to a text file and transfer back to the original comupter.

Status Description
The current license status:
Unlicensed, Trial License, Unlimited etc.

Status #
A code indicating the current license status. Support staff will find this number useful.

Status bar
A graphical bar that indicates the % of time / runs available with a trial license.

B1 (Try / Paste / Continue)
If the product is unlicensed and this is the first installation, the button will have the caption "Try". Press this button to access the Unlock web page to obtain your free trial key.

Note: Some SWiSHzone products do not come with a Free Trial Period. See here for more information. In this case the "Try" Button will not be visible.

If a Unlock Key has been pasted to the clipboard, the button will change to a "Paste" button, allowing the pasting of the Unlock key.

If the product is licensed, the button will have the caption "Continue". Pressing this button will start the SZP.

B2 (Buy)
Use this button to contact access our electronic store. The user should be connected to the Web before using this button.

B3 (Unlock)
Press this button to obtain an Unlimited Site Key.
Pressing this button will re-enable the Site Key Edit Box allowing a new key to be pasted.

B4 (x)
This button will allow exit without starting the SZP. If you are using a trial license, your invocation count will not be affected. Note that the time period limitation commences once you have obtained your trial site key.


Unlock Key

This is another name for Site Key.


Fundamentals

This section describes the basic elements of SWiSH animation.

The animation created is called a Movie. Within each Movie is a collection of Scenes. Each Scene has a Timeline consisting of multiple Frames.

During the Timeline of each Scene, you place Objects (e.g. text, images, etc.) to which you apply Effects. These Effects will start and stop at particular Frames and can be controlled by inserting Actions and Events.

In Scenes, Events occur when the Movie reaches a certain Frame. For objects, Events occur when you interact with an object using the mouse, such as rolling the mouse cursor over the Object or clicking on it. An Event can trigger more than one Action. For example, when the mouse rolls over an Object, the Movie can be stopped (with a Stop Action) and the browser can be told to load an URL into another Frame (with the Goto URL Action).

Actions are operations that are triggered by Events. Actions can alter the playing of the Movie, start or stop sounds, load other Movies or web pages, or communicate with the host browser or player.


Movies

A Movie is a sequence of Scenes. A Movie contains all the Scenes, Objects, Effects, Events, and Actions that comprise the final animation.

Properties of a Movie (including size, Frame Rate and background color) can be edited in the Movie Panel.

A new Movie can be created by pressing the 'New' button on the Standard Toolbar, or by selecting New from the File Menu. Scenes can be added to a Movie by pressing the 'Insert Scene' button on the Insert Toolbar, or by selecting Scene from the Insert Menu.

Movies can be saved to disk (as a .swi file) by pressing the 'Save' button on the Standard Toolbar, or by selecting Save from the File Menu. Existing Movies can be read from disk by pressing the 'Open' button on the Standard Toolbar, or by selecting Open from the File Menu.

Movies can be exported to the Shockwave Flash format (.swf) or Video format (.avi) by pressing the 'Export to SWF' or 'Export to AVI' buttons on the Export Toolbar, or by selecting Export from the File Menu. You can also export to projector (.exe) by selecting 'In Player' from the Test sub-menu of the File Menu, then using File | Create Projector in the Flash Player.

Note: SWiSHmax cannot read or write .fla files because .fla is a proprietary format owned by Macromedia


Templates

Templates are SWiSHmax Movies that can be used as a starting point to create new Movies.

Any SWiSHmax Movie can be used as a Template. New templates are created by selecting 'File Menu | Save Template'.

When you open SWiSHmax you are presented with a Start Up Menu. One of the options in this Menu is to Start a new Movie from a Template.

You can also open a Template by selecting File Menu | New From Template

Using Templates allows you to add common features to your Movies or work from Templates built by others.

There are a number of Templates supplied with SWiSHmax for you to use.


Scenes

A Scene is a collection of Objects that are animated over a number of Frames. When a Scene is complete, all the Objects are removed from the display and the Movie automatically moves to the next Scene.

A new Scene can be created by pressing the 'Insert Scene' button on the Insert Toolbar, or by selecting Scene from the Insert Menu. Objects can be added to the Scene by pressing one of the buttons on the Insert Toolbar, by selecting options from the Insert Menu, or by using one of the drawing tools in the Toolbox on the Layout Panel.

If no Object in the Scene is selected, the Object Panel displays the Scene Panel. You can use the 'Scene' Panel to set the Scene's name, background color, as well as an URL to link to when the Scene is clicked.

Each Scene has its own Timeline which can be edited using the Timeline Panel. You can also use the Timeline to co-ordinate and combine animations of different Objects.


Timeline and Frames

Each Scene is made up of a series of Frames, in the same way that a motion picture is made up of Frames. The Timeline Panel shows a visual representation of the Frames, with the first Frame at the left and last Frame at the right.

The top row shows the Frame Actions for the Scene. These Actions are executed when the Movie reaches the Frame where the Action is located. Frame Actions always have a duration of one Frame, but you can execute more than one Action in a single Frame.

The rows below the Scene row represent the Objects in the Scene. The rows are displayed in stacking order, with the Object that is in front of all other Objects displayed at the top (just below the Scene row), and the Object that is behind all other Objects displayed at the bottom.

Each Object row shows the Effects that are applied to that Object. Effects may have a duration of one or more Frames, but only one Effect can be applied to an Object at any given Frame.

The amount of time a single Frame is displayed is controlled by the 'Frame Rate' field on the Movie Panel. The Frame Rate is measured in Frames-per-second. A high Frame Rate value (e.g. 20) will produce a fast-running Movie. A low Frame Rate value (e.g. 1) will produce a slow-running Movie. The Frame Rate can be set to variable or constant. A variable Frame Rate means that the value entered is a maximum rate only. The speed of the Movie is limited by the power of the CPU playing the Movie and may vary from Frame to Frame depending on the complexity of the animation. A constant Frame Rate means that the Movie will maintain the value entered constantly throughout the Movie. To keep a constant Frame Rate your Movie may need to skip Frames. A constant Frame Rate is useful when you need to keep your Movie running in synchrony with a sound file.

Note: A Scene contains one Frame until you add an Effect or Action


Objects

SWiSHmax supports two types of Objects within a Scene:

· Simple Objects
· Complex Objects

The Object type defines how the Object behaves when various Effects are applied to it.

A Simple Object is a single indivisible entity. The following Objects are Simple Objects:

· Shape Objects
· Button Objects
· Sprite Objects
· Instance Objects
· Text Objects (input)
· Text Objects (dynamic)
· Text Objects (static with 'Target' checkbox ticked)
· Group Objects (named with 'Target' checkbox ticked).

A Complex Object is made up of many shapes. The following Objects are Complex Objects:
· Text Objects (static without 'Target' checkbox ticked).
· Group Objects (unnamed or do not have the 'Target' checkbox ticked).


Simple Objects

A Simple Object is a single indivisible shape, unlike a Complex Object, which is made up of many component Objects.

Some Effects behave differently depending on the type of Object (Simple vs Complex).

The following Objects are Simple Objects:

· Shape Objects
· Button Objects
· Sprite Objects
· Instance Objects
· Text Objects (input)
· Text Objects (dynamic)
· Text Objects (static with target checkbox ticked)
· Group Objects (named wih target checkbox ticked).


Shape Objects

A Shape Object is a Simple Object defined by a list of curved or straight edges. It can contain multiple closed or open figures. The figures can have lines around their edges and can be filled with solid colors, gradients or images.

You can create Shape Objects using the following drawing tools:

linei Line
pencili Pencil
bezieri Bezier
recti Rectangle
ellipsei Ellipse
autoi AutoShapes.

You can also produce shapes by using gshape Group as Shape or cshape Convert to Shapes, or by importing them from a vector or raster image.

You can use reshapei Reshape and ftransi Fill Transform to modify a shape. You can edit the settings for a Shape Object, including line style and fill style, using the Shape Panel.

Note:
· The Image Object in SWiSH v1.5x is now represented by a rectangular-shaped Object filled with the image in SWiSHmax
· AutoShapes have an additional set of handles for editing. These additional handles allow you to modify properties specific to the individual AutoShape (e.g. the number of vertices in a polygon shape). AutoShapes can be converted into Shapes by using cshape Convert to Shapes . Once converted into Shapes, the AutoShape looses its additional editing handles


Button Objects

button A Button Object is a Simple Object that is made up of four states: Up, Over, Down and Hit, as shown in the illustration below.

buttonstates

Unless the Has Separate Over State, Has Separate Down State or Has Separate Hit State option is selected in the Button Panel, only the button's Up State will be displayed in the Outline Panel. A button will always have the four states but they will be identical unless modified.

You can also select the Has Separate Over State, Has Separate Down State or Has Separate Hit State options by right-clicking the button and selecting the appropriate option.

· The Up State is the default appearance of the button. It is displayed when the Movie starts playing, and whenever the mouse is outside the button
· The Over State is displayed when the mouse is moved inside the button. You can use it to create 'Rollover' and 'Hover' buttons in a Movie
· The Down State is the 'clicked' appearance of the button. It is displayed when the mouse is clicked inside the button
· The Hit State defines the active area of the button that reacts to mouse clicks. It is an invisible state and is never displayed

The behavior of the button as you drag the mouse away from the hit area depends on the Tracking Setting for the button.

The four button states act like Group Objects. You can insert any kind of Object, except another button, into the Up, Over and Down states, but only Shape Objects and Text Objects are allowed to define the hit area.

You can create an empty Button Object using newbutton Insert Button or create a button with the states already set up by using cbutton Convert to Button.

You can edit the settings for a Button Object using the Button Panel.

For further information, refer to the Tutorial section on how to create animated buttons.


Sprite Objects

sprite A Sprite Object is a Simple Object that has its own Timeline and is a collection of Objects with Effects. They are the equivalent of 'Movie Clips' in Flash. By default, a Sprite is also a Scripting Object.

Since a Sprite's Timeline is played independently from that of the main Movie, you can think of it as a piece of reusable animation inside the main Movie.

A Sprite Object can contain any type of Object, including other Sprite Objects.

You can also create an animated button by using a Sprite Object in the Up, Over and Down button states. See the Tutorial section to see how to create animated buttons.

You can create an empty Sprite using newsprite Insert Sprite, or convert an Object into a Sprite using csprite Convert to Sprite or gsprite Group as Sprite. You can also produce Sprites by importing an animated .gif or a .swf Movie.

You can change the content of a Sprite when the Movie is playing using the Load Movie Action.

You can edit the settings for a Sprite Object using the Sprite Panel.

A Sprite is a Scripting Object and can consequently be referenced by other Scripting Objects. However, Sprites that have Mouse Events or are inside a Button State cannot act as targets, even if they have a name. Also Sprites that are within an unnamed Sprite or a Group can only be referred to from within the Sprite itself (i.e. from one of the Objects inside the Sprite).


Instance Objects

instance An Instance Object is a clone of a Sprite Object. The contents of the Instance and its reference Sprite are always the same. Making changes to the Instance will change the reference Sprite and vice versa. This feature can be used to simplify the process of making global changes to commonly used Objects within a Movie.

You can create an Instance Object using newinstance Insert Instance or makeinstance Make Instance, or by editing the settings of an existing Sprite and selecting a reference Sprite.

You can edit the setting of an Instance Object using the Sprite Panel.


Complex Objects

A Complex Object is made up of many component Objects, unlike a Simple Object which is treated as an indivisible Object.

Some of the Authored Effects when applied, will apply to each of the component Objects individually. For example, if the Explode Effect is applied to a Complex Object, each of the component Objects will follow a different trajectory. If the same Effect is applied to a Simple Object, the Object will follow a single path.

The following Objects are Complex Objects:

· Text Objects (static text with 'Target' checkbox unchecked)
· Group Objects ('Target' checkbox unchecked).


Text Objects

text A Text Object can be Static, Dynamic or Input. In addition, it can have Scripting Object properties applied if the 'Target' checkbox is checked.

Static Text is used to display Static Text in a Movie. If the Static Text has its 'Target' checkbox checked, then it is considered to be a Scripting Object (this causes the text to lose its Complex Object characteristics). A Static Text Object without its 'Target' checkbox checked, is a Complex Object that is made up of a collection of letters. Each letter is called a component of the Text Object.

Dynamic Text is an Object that allows the text content to be altered by a script while a Movie is running. Dynamic Text Objects have Simple Object characteristics.

Input Text is an Object that allows the person viewing the Movie to enter text. This is typically used for user-input forms. Input Text Objects have Simple Object characteristics.

Text Objects are created by importing a text file or pressing inserttext Insert Text.

You can modify the settings for the text using the Text Panel.

Input, Dynamic and Scripting Text Objects are treated as a Simple Object when an Effect is applied.


Group Objects

A Group Object that does not have its 'Target' checkbox ticked, is a Complex Object that is made up of a collection of Objects. The Objects that make up a group are called its components.

The components may be Simple or Complex Objects, but cannot have their own Effects. This means that any object with Effects is converted to a Sprite before it is grouped.

Unlike a Sprite Object, a Group Object does not have its own Timeline.

Group Objects can be created by pressing group Group, cshape Convert to Shapes or cletter Convert to Letters on the Grouping Toolbar or the Modify Menu.

You can modify the settings for a group using the Group Panel.


Effects

Effects are animations that change the appearance of an Object over time. You can add, modify and co-ordinate Effects using the Timeline Panel.

Simple Effects vs Complex Effects
All Effects can be categorized as either Simple Effects or Complex Effects. A Simple Effect animates the entire Object in unison. A Complex Effect animates the components that make up the Object independently.

Effects Menu
The Effects Menu is divided up into the following four Effects groups:

· Place Effects - simple Effects used to add, remove and move Objects in your Movie
· Basic Effects - commonly used Basic Effects
· Authored Effects - Effects pre-installed with SWiSHmax and any Effects you create and save in your Effects Library
· Core Effects - create new Effects based on one of the Core Effect types that you can use or save in your Effect Library.

Effects Settings
The properties of an Effect are edited using the Effect Settings Dialog Box, and many Effects also have Common Settings, such as Motion, Easing and Camera.

Effects Authoring
SWiSHmax gives you the ability to author and distribute your own Effects. Read our Effects Authoring guide to find out more.

Note: If multiple Objects are selected when an Effect is added, the Effect will be applied to each of the selected Objects


Place Effects

Place Effects are simple Effects used to add, remove and move objects in your Movie.

The following Place Effects are provided:

· Place
· Remove
· Move


Place

The Place Effect displays an Object. This Effect is one Frame long and is indicated by a place Frame in the Timeline.

You can use the Place Effect to move Objects that are already displayed by altering the Object's properties in the 'Place Settings' dialog box. To do this, double-click the Place Effect in the Timeline, or right-click the Place Effect and select 'Properties' from the context Menu. The 'Place Settings' dialog box enables you to set the position, scale, rotation, alpha and color of the Object as it is revealed.

Refer to the Start At tab Effect Setting for more information.


Remove

The Remove Effect hides a visible Object. This Effect is one Frame long and is indicated by a remove Frame in the Timeline.


Move

The Move Effect changes an Object's position, scale, rotation, alpha, color or any combination of these variables over time.

The 'Move Settings' dialog box can be displayed by double-clicking the Move Effect in the Timeline, or right-clicking the Move Effect and choosing 'Properties' from the context Menu. In the 'Move Settings' dialog box you can set the position, scale, rotation, alpha and color of the Object you want at the end of the Effect. SWiSHmax will automatically generate the Frames in between.

See the Motion tab Effect Setting for more information.


Basic Effects

Basic Effects comprise commonly used Effects.

The following Basic Effects are provided:

· Fade In
· Fade Out
· Zoom In
· Zoom Out
· Slide In
· Slide Out
· Blur
· Repeat Frames.


Fade In

The Fade In Effect fades in by increasing the opacity (or alpha) of the Object from completely transparent (0% alpha) until it is completely opaque (100% alpha).

The 'Fade Effect' dialog box is represented below. It can be displayed by double-clicking the Fade Effect in the Timeline, or right-clicking the Fade Effect and choosing Properties from the context Menu.

fadeintab

Direction
Allows you to change the Fade In Effect to a Fade Out Effect.


Fade Out

The Fade Out Effect fades out by decreasing the opacity (or alpha) of the object from completely opaque (100% alpha) until it is completely transparent (0% alpha).

The 'Fade Effect' dialog box is represented below. It can be displayed by double-clicking the Fade Effect in the Timeline, or right-clicking the Fade Effect and choosing Properties from the context Menu.

fadeouttab

Direction
Allows you to change the Fade Out Effect to a Fade In Effect.


Zoom In

The Zoom In Effect zooms in by increasing the scale of an Object.

The 'Zoom Effect' dialog box is represented below. It can be displayed by double-clicking the Zoom Effect in the Timeline, or right-clicking the Zoom Effect and choosing Properties from the context Menu.

zoomintab

Direction
Allows you to change the Zoom In Effect to a Zoom Out Effect.


Zoom Out

The Zoom Out Effect zooms out by decreasing the scale of an Object.

The 'Zoom Effect' dialog box is represented below. It can be displayed by double-clicking the Zoom Effect in the Timeline, or right-clicking the Zoom Effect and choosing Properties from the context Menu.

zoomouttab

Direction
Allows you to change the Zoom Out Effect to a Zoom In Effect.


Slide In

The Slide In Effect moves an Object from outside the Movie (any corner or side) to its reference position.

The 'Slide Effect' dialog box is represented below. It can be displayed by double-clicking the Slide Effect in the Timeline, or right-clicking the Slide Effect and choosing Properties from the context Menu.

In the illustration below, the object will slide in from the left.

slideeffect

Direction
Allows you to change the Slide In Effect to a Slide Out Effect.

Slide In From
Specifies which way the Effect will Slide In from.


Slide Out

The Slide Out Effect moves an Object from its reference position to outside the Movie (any corner or side).

The 'Slide Effect' dialog box is represented below. It can be displayed by double-clicking the Slide Effect in the Timeline, or right-clicking the Slide Effect and choosing Properties from the context Menu.

In the example below, the object will slide out to the left.

slideout

Direction
Allows you to change the Slide Out Effect to a Slide In Effect.

Slide Out To
Specifies which way the effect will Slide Out to.


Blur

The Blur Effect creates many copies of an Object, with each copy having either a progressively increasing or decreasing alpha value. By changing the position, scale or alpha value of each copy over time, it can create a motion-blur Effect.

Below is an illustration of the Blur tab in the 'Blur Settings' dialog box. It can also displayed by double-clicking on a Blur Effect in the Timeline, or right-clicking on a Blur Effect and choosing Properties from the context Menu.

blureffect

Blur Mode
Determines the style of the Blur Effect. The styles available are:

· Zoom Blur: duplicates of the Object are displayed at progressively larger scales, with smaller alpha values. When the Object is blurred in, the duplicates are faded in and squeezed into the size of the original Object. When the Object is blurred out, the duplicates are faded out and stretched outward
· Mirror Blur: when the Object is blurred, two sets of duplicates move away from its reference position in opposite directions. When the Object is brought into focus, two sets of duplicates move towards the reference position from opposite directions. The further away the duplicates are, the smaller the alpha value
· Slide Blur: duplicates of the Object move from the off-screen position defined by the 'Direction' option (and the Effect Transform) to the Object's reference position. Selection of either the 'Invisible' or 'Visible' radio button determines whether the Effect travels to or from the Object's reference position on-screen to the off-screen point. Each duplicate is displayed with progressively smaller alpha values. As the Object approaches its reference position, the duplicates catch-up with the Object so they all finish at the same place.

Blur Amount
Determines how many copies of the Object are duplicated to carry out the Blur Effect.

Direction
Controls the direction of squeeze/stretch, moving in/away or slide in/out.

Blur Scale Factor
Specifies the maximum scaling change or offset between two duplicates.

Begin with
Controls the initial state of an Object and whether the alpha values are increasing or decreasing in the Effect (i.e. fading in or fading out). If the Blurred option is selected, the Object emerges blurred and focusses to a sharp, solid object by the end of the Effect. If the Clear option is selected, the Object is sharp and solid at the beginning, blurring and fading to invisible by the end of the Effect.

Acceleration
Controls the blur speed at the start and at the end of the Effect.

· At Start: accelerates the blur at the start of the Effect
· At End: decelerates the blur at end of the Effect
· Amount: controls the blur speed at the start and at the end of the Effect. A value of zero means no acceleration. A positive value accelerates at the start or decelerates at the end. A negative value decelerates at the start or accelerates at the end


Repeat Frames

The Repeat Frames Effect replays the stipulated Frames the specified number of times. Nominate a starting Frame, duration and a number of repeats and the Effect will repeat those Frames. It will apply its own Transforms.

The Repeat Frames tab of the 'Repeat Frames Settings' dialog box is represented below. It can be displayed by double-clicking on a Repeat Frames Effect in the Timeline, or right-clicking on a Repeat Frames Effect and choosing Properties from the context Menu.

repeat

Start Frame
Specifies the starting Frame. It can be either an absolute Frame number, or a relative number (if negative).

Number of Frames
Specifies the number of Frames to be repeated from the starting Frame.

Repeat
Specifies how many times to repeat.

The Repeat Frame Effect will not permit the repetition of only part of an Effect. Settings are always adjusted such that Effects are either entirely included or excluded from the range of Frames.


Authored Effects

Effects other than Place and Basic Effects are referred to as Authored Effects. These Effects are stored on your hard disk as a ".sfx" file.

SWiSH comes with over 450 pre-defined Authored Effects. As these Effects are stored on disk in your Effect Library, you can tailor existing Effects to your needs or create your own new Effects by altering the settings of existing Effects and then saving the ".sfx" file under a new name. Effects Authoring provides you with the ability to present the user with a subset of parameters that are are available for alteration.

See Creating Effects and Effects Authoring for more information on creating custom and Authored Effects.

The Authored Effects provided are divided into the following categories:

· Appear into position: these Effects animate your text or Objects to bring them into the current position
· Disappear from position: these Effects animate your text or Objects away from where they are currently placed. They will have disappeared by the end of the Effect
· Loop continuously: these Effects animate your text or Objects in a repeating pattern. You can loop the Frames containing these Effects or string multiples of them together to make a longer animation
· One off: these Effects animate your text or Objects, but don't have any particular start or end point
· Return to start: these are similar to the Loop continuously Effects, but will always start and finish with the current placement.


Core Effects

Create new Effects, based on one of the Core Effect types, that you can use or save in your Effect Library.

The Core Effects you can create new Effects from are:

· Transform (a Basic Effect)
· Squeeze (a Basic Effect)
· Alternate (a Basic Effect)
· Snake (a Basic Effect)
· Explode (a 3D Effect)
· 3D Spin (a 3D Effect)
· 3D Wave (a 3D Effect)
· Vortex (a 3D Effect)
· Wave (a Special Effect)
· Typewriter (a Special Effect)

The category of Effect determines which additional configuration tabs are associated with it.

Basic Effects
The additional configuration tabs associated with Basic Effects are Transform, Cascade, Motion, Easing, StartAt.

3D Effects
The additional configuration tabs associated with 3D Effects are Camera, Cascade, Motion, Easing, StartAt.

Special Effects
The additional configuration tabs associated with Special Effects are Motion, Easing, StartAt.


Transform

The Transform Effect applies a sequence of transforming animations to each component of a Complex Object.

The Transform Effect can be applied to a Complex Object to introduce each component with the same animation. By using the settings in the Cascade tab, the component animations can follow one after another or overlap. The Transform Effect can be applied forwards or backwards, and can be used to add or remove components.

See the Transforms tab and Cascade tab for more information.


Squeeze

The Squeeze Effect squeezes or stretches the components of a Complex Object over time.

The Squeeze Effect can be applied to a Text Object to change the kerning over time. Words can be made to squeeze inward or stretch outward.

The 'Squeeze' setting tab of the 'Effect Settings' dialog box is represented below. It can be displayed by double-clicking the Squeeze Effect in the Timeline, or right-clicking the Squeeze Effect and choosing Properties from the context Menu.

squeezeeffect

Direction
Controls the direction of squeezing or stretching:

· --><--: Squeezes/stretches to/from center
· <-<--<: Squeezes/stretches to/from left
· >-->->: Squeezes/stretches to/from right.

Note:
· The component (X) and line (Y) spacing factors at Start/Middle/End of the Effect are specified in the Transforms tab. Using the Y spacing factor, you can squeeze/stretch a multiple-line Complex Object vertically
· Setting the Direction to center makes the Squeeze Effect equivalent to the Transform Effect


Alternate

The Alternate Effect applies alternating proportions and directions of animation to components of a Complex Object.

The 'Alternate' setting tab of the 'Effect Settings' dialog box is represented below. It can be displayed by double-clicking the Alternate Effect in the Timeline, or right-clicking the Alternate Effect and choosing Properties from the context Menu.

alternateeffect

To see how this Effect works, imagine a zig-zag line that goes between +100% and -100%, for example, with a cycle that repeats every four components starting at component position 0. You would get a figure like that shown below.
complexeffects-alternate-graph
The red line represents the amount and direction of Transform applied for each component position. You can see that component position 0 gets a full 100% of the Transform, component position 1 gets zero, component position 2 gets -100%, and so on. If the Transform for the Alternate Effect is one that adds 50 pixels to the Y value, then the first Frame of the Effect would look like this:

complexeffects-alternate-firstframe

You can see that the first component was moved up by the full 50 pixels, the second component was unchanged, the third moved down by 50 pixels, and so on.

Repeat every 'n' components
The Alternate Effect goes through a complete cycle every 'n' components. The default is a four-component cycle. In that case, every fourth component will have the same amount of Alternate Effect as shown in the example above, that is:

· maximum positive direction (100%)
· zero (no transform)
· maximum negative direction (-100%)
· zero (no transform).

Setting the repeat every 'n' components figure to two, for example, would specify a repeating cycle like this:

· maximum (100%) positive direction
· maximum (100%) negative direction.

Start at component
The maximum proportion in the positive direction occurs at this component position in the sequence. The default is the 0 position (first component), so the first component always get the full amount of the Transform.

Position/Spacing/Scale/Angle/Alpha/Color
These Transforms can be set in the Transforms tab.

X=Y checkboxes
This option forces the Y value to equal the X value.

For each Transform setting (position, spacing, scale, angle, alpha and color), there are three options:

· All: applies the full amount of the Transform to all components. There is no alternation for this setting
· Opposite: applies the proportion and direction of the Transform depending on the component position
· Same: applies the proportion of the Transform depending on the component position, but always in the positive direction.


Snake

The Snake Effect applies wave forms to vary the Transforms for components of a Complex Object over time.

The 'Snake' setting tab of the 'Effect Settings' dialog box is represented below. It can be displayed by double-clicking the Snake Effect in the Timeline, or right-clicking the Snake Effect and choosing Properties from the context Menu.

snakeeffect

By component
When the 'By component' option box is checked, the Snake Effect applies to each component in turn, based on its position within the Object. When the option is turned off, the Snake applies to all the components at the same time.

For example, the following images show a time-lapse view of some text moving in a circle. The first image shows the Effect with the By component option turned on.
snakeeffect-bycharacter-ticked
The second image shows the Effect with the By component option turned off.
snakeeffect-bycharacter-cleared

Follow path
When the Follow path option is turned on, the components automatically rotate to follow the path. When it is turned off, the components maintain their original orientation. Any angle Transform is added on to this calculated angle.

For example, the following images show a time-lapse view of some text moving in a circle. The first image shows the Effect with the Follow path option turned on.
snakeeffect-followpath-ticked
The second image shows the effect with the Follow path option turned off.
snakeeffect-followpath-cleared

Forward
The Forward option moves the components in order. When the option is turned off, the components move in reverse order, as shown below.

Note: This Effect only works when the By component option is checked.

For example, the following images show a time-lapse view of some text moving in a circle. The first image shows the Effect with the Forward option checked.
snakeeffect-followpath-cleared
The second image shows the Effect with the Forward option turned off.
snakeeffect-forward-cleared

Start straight
When the Start straight option is turned on, components start from their initial positions and gradually move into the Snake Effect. When unchecked, the Snake Effect starts immediately.

Note: This only has an Effect when By component is ticked.

For example, the following images show a 'time-lapse' view of some text moving in a circle. The first image shows the Effect with the Start straight option turned on.
snakeeffect-startstraight-ticked
The second image shows the Effect with the Start straight option turned off.
snakeeffect-startstraight-cleared

Wave
This set of columns has the Wave settings for each Transform. The Wave settings are the waveform itself, the Period is number of Frames over which the wave repeats its 360 degree cycle, and the Phase is where the wave starts within its 360 degree cycle.

Waveform
There are nine separate waveforms, plus a Fixed value indicating that no waveform applies.
snakeeffect-waveform

The following illustrations show the effect of each waveform on the y value of a rectangle.
Sine: snakeeffect-waveform-sine moves smoothly between the start and end values
Triangle: snakeeffect-waveform-triangle moves linearly between the start and end values
Square: snakeeffect-waveform-square jumps between the start and end values
Saw Up: snakeeffect-waveform-sawup moves linearly from start to end, then jumps back to start
Saw Down: snakeeffect-waveform-sawdown moves linearly from end to start, then jumps back to end
Sqr+Tri: snakeeffect-waveform-sqrtri moves linearly to end values, stays, move linearly to start value, stay
Bounce: snakeeffect-waveform-bounce moves in a parabola from start to end values and back
Gravity: snakeeffect-waveform-bounce same as bounce, except, rather than repeating, the curve continues past the start point
Pulse: snakeeffect-waveform-pulse jumps to end value and back at the start of the cycle

Cycles/Period
Controls the number of Frames it takes for the wave to complete a cycle, or the number of cycles for the Effect duration.

If the Period setting is selected, the values refer to the number of Frames per cycle. The larger the period, the less cycles during the Effect and the slower the wave moves. Changing the Effect duration does not change the speed of the Effect, only how long it plays.

If the Cycles setting is selected, the values refer to number of cycles during the Effect. The larger the number of cycles, the longer the period and the faster the wave moves. Changing the Effect duration changes the speed of the Effect, not only how long it plays.

Note: When the Cycles setting is selected, the speed of animation can be controlled by adjusting the overall Effect duration. The shorter the duration, the faster the animation

Phase
This determines where the wave starts in it cycle. A vaue of 0 degrees starts at the start of the cycle, a value of 180 degrees starts halfway through, and so on.

Decay
The parameters in these columns determines how the waveform changes over time.

A (amplitude)
When checked, the amplitude (or strength or range) can decrease toward zero or increase toward the full value (depending on the direction). When this option is turned off, the amplitude stays the same for the duration of the Effect.

P (period)
When checked, the period (or wavelength) can decrease toward zero or increase toward the full value (depending on the direction). When this option is turned off, the period stays the same for the duration of the Effect.

Halflife
This is the number of Frames it takes for the amplitude or period to halve (or double) its value. The larger the half-life, the slower the rate of decay.

Direction
This is the direction and (for amplitutde) the final value that the decay takes. The amplitutde can decay toward (or from) the minimum value, maximum value or halfway between.

X=Y
This option forces the Y value to equal the X value.

Position X/Y
Controls the maximum distance each component moves from its original position. A negative X is left, and a positive X is right. A negative Y is up and a positive Y is down. A value of 0 means no change in position.

Spacing X/Y
Controls the component(X) / line(Y) spacing factors for the components when the wave is farthest from its original position. A value of 100% means no change in spacing.

Scale X/Y
The amount by which each component is scaled horizontally/vertically as the wave passes through. Maximum change in scale will occur when the wave is farthest from its original position. A scale of 100% means the scale will not be varied. A negative value will shrink the component horizontally/vertically as wave passes through.

Angle X/Y
The amount by which each component's X/Y axis is rotated as the wave passes through. Maximum change in angle will occur when the wave is farthest from its original position. An angle of zero means the axis will not be rotated.

Alpha
The amount by which each component is faded out as the wave passed through. Maximum fade out will occur when the wave is farthest from its original position. An alpha of 100% means the alpha will not change. A value of 0% means the component will completely fade out as the wave passes through.

Color
This controls the color Transform for the component when the wave is farthest from its original position. The component color is calculated by taking the percentage of the selected color and adding the complementary percentage of the original color. For example, if the given percentage is 30%, the result will be 30% of the selected color mixed with 70% of the original color. A value of 0% means no change in color.


Explode

The Explode Effect explodes or implodes the components of a Complex Object.

The Explode Effect can be applied to a Text Object to blow apart the letters of the words. Letters can be made to spin, change size, fade out and fall to the ground. The strength and speed of the explosion can be altered, as can the position of the 'bomb'.

The 'Explode' setting tab of the 'Effect Settings' dialog box is represented below. It can be displayed by double-clicking the Explode Effect in the Timeline, or right-clicking the Explode Effect and choosing Properties from the context Menu.

explodeeffect

Direction
Specifies an explosion or an implosion.

Bomb
Controls the strength and the position of the explosion.

· Strength of bomb: a value of 1 will produce a slow, weak explosion that is quickly overwhelmed by gravity. A value of 20 will produce a fast, powerful explosion that blows the fragments off the Movie in a few Frames. A value of 5-10 is a good approximation for a 'real' explosion
· Position: this is the center point of the explosion relative to the center of the object along the X, Y and Z axis. The default is 30 pixels below the center of the object, so the object appears to explode upwards. Modifing the Z position will make the explosion appear to expolde in a forward and backward direction
· Rnd Seed: this number is used as a seed for the random number generator. Changing this number will produce slightly different results. You can keep changing this value until it produces an explosion that is esthetically pleasing
· Random: offsets the bomb by a random amount as a percentage of the distance to the bomb
· Mutliple Bombs: mutiple bombs position relative to each component, or a single bomb positioned relative to the whole object

Gravity
Controls the strength and the direction of gravity.

· Strength: this is the strength of the force pulling the fragments downward. A value of 5 will quickly overwhelm a moderate-strength explosion. A value of 0.5 will have little effect on a moderate-strength explosion. A value of 1 is a good approximation for 'real' gravity
· Direction: controls the direction of gravity. Gravity may pull the fragments up, down, left, right, or any in any direction

Transforms
Controls the Transforms applied to components as they move away from the bomb.

· Scale: this controls the scaling applied to components at the Start/End of the Effect. Fragments that began nearer the bomb will grow faster. A scale value of 100% means the fragments do not change size
· Alpha: this controls the fading applied to components at the Start/End of the Effect. A value of 100% means the alpha value of the fragments remains unchanged. A value of 0% means the fragments will fade out completely
· Color: this specifies the color Transform for the components at the Start/End of the Effect. The component color is calculated by taking the percentage of the selected color and adding the complementary percentage of the original color. For example, if the given percentage is 30%, the result will be 30% of the selected color mixed with 70% of the original color. A value of 0% means no change in color
· Rotation: this controls the amount of rotation applied to components as they move away from the bomb. The X and Y axis of the fragments are rotated independently (resulting in skewing) unless Uniform is checked. A rotation value of zero means the fragments will not be rotated

Note: For Text Objects, components correspond to letters


3D Spin

The 3D Spin Effect spins the components of a Complex Object on the vertical or horizontal axis in 3D space over time.

The 3D Spin Effect can be applied to a Text Object to change the orientations of the components over time. Components can be made to face left, top or front at the beginning and turn a specific number of degrees around the vertical or horizontal axis for the duration of the Effect. The component animations can follow one after another, or they can overlap. The 3D-Spin Effect can be applied forwards or backwards, and components can also be scaled and faded.

The '3D Spin' setting tab of the 'Effect Settings' dialog box is rperesented below. It can be displayed by double-clicking the 3D Spin Effect in the Timeline, or right-clicking the 3D Spin Effect and choosing Properties from the context Menu.

3dspineffect

Spin Direction
Controls the initial orientations of components.

· Spin forwards: the components are animated forwards from Start Transform to End Transform
· Spin backward: the components are animated backwards from End Transform to Start Transform
· Common axis: the components will spin relative to the object's center point instead of their own center points
· Rotation order: the order is which rotations are applied

Spin Axis
Specifies the direction of the Spin Axis. The amount of rotation around the nominated axis is determined by the difference in Angle settings.

Transforms
Controls the Transforms applied to components as they spin.

· X Spin: specifies the angle the component is rotated around the X axis at the start, middle and end of the Effect
· Y Spin: specifies the angle the component is rotated around the Y axis at the start, middle and end of the Effect
· Z Spin: specifies the angle the component is rotated around the Z axis at the start, middle and end of the Effect
· Scale: specifies how much the component is scaled at the start, middle and end of the Effect. A value of 100% means no change in scale
· Alpha: specifies how much the component is faded at the start, middle and endof the Effect. A value of 100% means the alpha of the component is unaffected. A value of 0% means the component is completely faded out
· Color: this specifies the color Transform for the component at start, middle and end of the Effect. The component color is calculated by taking the percentage of the selected color and adding the complementary percentage of the original color. For example, if the given percentage is 30%, the result will be 30% of the selected color mixed with 70% of the original color. A value of 0% means no change in color


3D Wave

The 3D Wave Effect applies a rolling wave through the components of a Complex Object in three dimensions.

The 3D Wave Effect can be applied to a Text Object to produce waving banners. The 3D Wave Effect can move letters and shapes up and down or side-to-side, rotating and scaling them as required to give the impression of 3D undulations. The colour and alpha of each letter or shape can be varied as a function of wave height. The wave can be clamped to edges of the stage for special effects such as flag waving. Cyclic image warping can be achieved by breaking an image into pieces and passing a 3D wave through the resulting shape.

The 3D Wave setting tab of the 'Effect Settings' dialog box is represented below. It can be displayed by double-clicking the 3D Wave Effect in the Timeline, or right-clicking the 3D Wave Effect and choosing 'Properties' from the context Menu.

3dwaveeffect

X/Y
If these options are turned on, then the effect is applied to the horizontal/vertical value of each component.

Z
If this option is turned on, then the effect is applied to the Z value of each component, which is the wave height or distance out from screen. Ensure that "Use projective projection" is selected in the Camera settings for best effect when using Z values.

Color
If this option is turned on, then the Color of each component is modified according to wave height. Different colors can be specified at the peaks, zero crossings and troughs of waves as follows:
· -ve extreme color,
· Base value color (optional), and
· +ve extreme color.
The percentages associated with each of these colours determine the amount of color to be blended based on the current wave height.

Alpha
If this option is turned on, then the Alpha value of each component is modified according to wave height. Different Alpha values can be specified at the peaks, zero crossings and troughs of waves as follows:
· -ve extreme Alpha,
· Base value Alpha (optional),
· +ve extreme Alpha.
The percentages associated with each of these values determine the amount of Alpha to be multiplied based on the current wave height.

Amplitude
Specifies the size of the wave in each dimension as a percentage of the object's overall size.

Freq (Horz)
The number of cycles to be applied based on each component's horizontal position.

Freq (Vert)
The number of cycles to be applied based on each component's vertical position.

Freq (Time)
The number of cycles to be applied over the duration of the animation. This must be a whole number if a cyclic animation in which all components return to their starting position is required.

Freq (Radius)
The number of cycles radiating outwards from the object's midpoint. Use this value to create waves that spread out in concentric rings like ripples in water.

Notes on Frequency
The behaviour of the 3D wave is defined by a combination of all four frequency values, however the overall frequency can be adjusted conveniently using the master frequency value Freq (Time).
Freq (Horz) and Freq (Vert) values can be combined for interesting effects. Adjusting values in opposed pairs (Horz Y with Vert X) creates regular sway, in coincident pairs (Horz X with Vert Y) creates pulses aligned to the axes, and in mixedc combinations creates billowing undulations.

The direction of wave travel can be reversed by using negative frequencies. Setting the
Time frequency to 0 results in a stationary wave. This is useful for effects such as
fixing blended colours in place across the components of an object.

Phase
Phase offset that defines the starting point of the wave in degrees. The wave height can be set to start anywhere between -1 and +1 using the appropriate phase offset.

Fix
Constraint that dampens the wave as it approaches edges of the stage. Check the left, top, right and/or bottom boxes to specify which edges to dampen. This setting is useful for creating waving flags or undulations within the centre of an object that do not disturb its edges.

Mirror vert/horz
If these items are checked then the wave is reflected verticalyy and/or horizontally about the object's midpoint. Use this option to create waves that bulge outwards to the left and right, or up and down.

Delay in/Decay out
If these items are checked then the wave height is dampened to zero at the start/end of the animation. The delay/decay takes effect once the specified percentage of duration is reached.
Delay in and Decay out should be used sparingly. Due to the nature of the transformations being applied to components, the transitions between cycles may appear slightly discontinuous if excessive delay and decay is used.


Vortex

The Vortex Effect spins the components of a Complex Object in a 3D space and pulls them down into a gravitation point (or blows them out from a gravitation point) over time.

The Vortex Effect can be applied to a Text Object to attract the components of text into a gravitation point (or blows them out from a gravitation point). Components can be made to spin, change size and fade out. The location of the gravitation point and the midpoint of motion track can be altered. The component animations can follow one after another, or they can overlap. The Vortex Effect can be applied forwards or backwards.

The 'Vortex' setting tab of the 'Effect Settings' dialog box is represented below. It can be displayed by double-clicking the Vortex Effect in the Timeline, or right-clicking the Vortex Effect and choosing Properties from the context Menu.

vortexeffect

Direction
Controls the direction of swirling.

· Swirl Outwards: the components of a Complex Object are blown out from a gravitation point over time
· Swirl Inwards: the components of a Complex Object are attracted into a gravitation point over time
· Common Axis: the components will spin relative to the object's center point instead of their own center points

Gravitation Point
Specifies the location of the Gravitation point.

· Custom: Gravitation point = (X, Y, Z), where the X axis points left, the Y axis points down, the Z axis points to the front, 1 unit is equal to 1 pixel and the origin is at the center of the Text Object
· Left: Gravitation point = (left of text - component width/2 + X, Y, Z)
· Right: Gravitation point = (right of text + component width/2 + X, Y, Z)
· Top-Left: Gravitation point = (left of text - component width/2 + X, top of text - component height/2 + Y, Z)
· Top: Gravitation point = (X, top of text - component height/2 + Y, Z)
· Top-Right: Gravitation point = (right of text + component width/2 + X, top of text - component height/2 + Y, Z)
· Bottom-Left: Gravitation point = (left of text - component width/2 + X, bottom of text + component height/2 + Y, Z)
· Bottom: Gravitation point = (X, bottom of text + component height/2 + Y, Z)
· Bottom-Right: Gravitation point = (right of text + component width/2 + X, bottom of text + component height/2 + Y, Z)
· Current X-Y: Gravitation point = (component's x + X, component's y + Y, Z)
· Current X: Gravitation point = (component's x + X, Y, Z)
· Current Y: Gravitation point = (X, component's y + Y, Z)

Midpoint
Specifies the Midpoint of the motion track.

· Custom: Midpoint = (X, Y, Z)
· Left: Midpoint = (left of text - component width/2 + X, Y, Z)
· Right: Midpoint = (right of text + component width/2 + X, Y, Z)
· Top-Left: Midpoint = (left of text - component width/2 + X, top of text - component height/2 + Y, Z)
· Top: Midpoint = (X, top of text - component height/2 + Y, Z)
· Top-Right: Midpoint = (right of text + component width/2 + X, top of text - component height/2 + Y, Z)
· Bottom-Left: Midpoint = (left of text - component width/2 + X, bottom of text + component height/2 + Y, Z)
· Bottom: Midpoint = (X, bottom of text + component height/2 + Y, Z)
· Bottom-Right: Midpoint = (right of text + component width/2 + X, bottom of text + component height/2 + Y, Z)
· Current X-Y: Midpoint = (component's x + X, component's y + Y, Z)
· Current X: Midpoint = (component's x + X, Y, Z)
· Current Y: Midpoint = (X, component's y + Y, Z)
· Cur. X-Y only: Midpoint = (component's x + X, component's y + Y, none)
· Cur. X only: Midpoint = (component's x + X, none, none)
· Cur. Y only: Midpoint = (none, component's y + Y, none)
· Custom X-Y: Midpoint = (X, Y, none)
· Custom X-Z: Midpoint = (X, none, Z)
· Custom Y-Z: Midpoint = (none, Y, Z)
· Custom X: Midpoint = (X, none, none)
· Custom Y: Midpoint = (none, Y, none)
· Custom Z: Midpoint = (none, none, Z)
· None: no Midpoint (the motion track is a straight line)

Rotation order/Angles
Specifies the order and the Angles to rotate around the Spin Axes during the Effect. For example, if the order was set to Y-X-Z, the component would first rotate Y degrees around Y axis, then rotate X degrees around X axis and finally rotate Z degrees around Z axis.

Transforms
Controls the Transforms applied to components as they spin.

· Scale: specifies how much the component is scaled at the start/end of the Effect. A value of 100% means no change in scale
· Alpha: specifies how much the component is faded at the start/end of the Effect. A value of 100% means the alpha of the component is unaffected. A value of 0% means the component will completely faded out
· Color: this specifies the color Transform for the component at start/end of the Effect. The component color is calculated by taking the percentage of the selected color and adding the complementary percentage of the original color. For example, if the given percentage is 30%, the result will be 30% of the selected color mixed with 70% of the original color. A value of 0% means no change in color


Wave

The Wave Effect applies a rolling wave through thec

The Wave Effect can be applied to a Text Object to produce waving banners. The Wave Effect can move letters up and down or side-to-side. Letters can be rotated to follow the wave, and the scale and alpha of each letter can be varied as the wave passes through.

The 'Wave' setting tab of the 'Effect Settings' dialog box is represented below. It can be displayed by double-clicking the Wave Effect in the Timeline, or right-clicking the Wave Effect and choosing Properties from the context Menu.

waveeffect

Whole Object
If this option is turned on, the Effect applies to the object as a whole, and not to the individual components.

Rotate to follow wave
If this option is turned on, the components will rotate to follow the direction of the wave. If you have also specified an Angle in the Transform tab, then this is added on to the calculated angle.

Decay amplitude of wave
If this option is turned on, the amplitude of the wave gradually decreases to zero over the duration of the Effect.

Start straight
All components will start in a straight position for the Wave Effect. Otherwise components will appear to be waving at the start of the Effect.

End straight
All components will end in a straight position for the Wave Effect. Otherwise components will appear to be waving at the end of the Effect.

Period
The number of Frames it takes for one complete wave to pass through a particular component. For example, say a Text Object contained the letter T. The Period is the number of Frames it takes for the letter T to move through one complete cycle and return to its original position.

Length
The distance in pixels from the start to the end of the wave. For example, say a Text Object contained the letter T. If the letter T is in its original position, then a component at the given length to the right will also be at rest.

Direction
Controls the direction of the rolling wave.
· cascade-forwardbutton: the wave begins from the left side
· cascade-backwardbutton: the wave begins from the right side
· cascade-2s2cbutton: the wave begins from the two sides
· cascade-c22sbutton: the wave begins from the center

+90°
Shifts the phase of the wave by 90°.

No Shift:
nophaseshift

Shift by 90°:
90phaseshift

X=Y
This option forces the Y value to equal the X value.

Position X/Y
Controls the maximum distance each component moves from its original position. A negative X is left, and a positive X is right. A negative Y is up and a positive Y is down. A value of 0 means no change in position.

Spacing X/Y
Controls the component(X) / line(Y) spacing factors for the component when the wave is farthest from its original position. A value of 100% means no change in spacing.

Scale X/Y
The amount by which each component is scaled horizontally/ vertically as the wave passes through. Maximum change in scale will occur when the wave is farthest from its original position. A scale of 100% means the scale will not be varied. A negative value will shrink the component horizontally/vertically as the wave passes through.

Angle X/Y
The amount by which each component's X/Y axis is rotated as the wave passes through. Maximum change in angle will occur when the wave is farthest from its original position. An angle of zero means the axis will not be rotated.

Alpha
The amount by which each component is faded out as the wave passed through. Maximum fade out will occur when the wave is farthest from its original position. An alpha of 100% means the alpha will not varied. A value of 0% means the component is completely faded out as the wave passes through.

Color
This controls the color Transform for the component when the wave is farthest from its original position. The component color is calculated by taking the percentage of the selected color and adding the complementary percentage of the original color. For example, if the given percentage is 30%, the result will be 30% of the selected color mixed with 70% of the original color. A value of 0% means no change in color.


Typewriter

The Typewriter Effect shows the components of a Complex Object one after another, like someone typing text onto the screen, with an optional cursor character. The cursor will only appear when you apply the Typewriter Effect to a Text Object.

The 'Typewriter' setting tab of the 'Effect Settings' dialog box is represented below. It can be displayed by double-clicking the Typewriter Effect in the Timeline, or right-clicking the Typewriter Effect and choosing Properties from the context Menu.

typewritereffect

Show character every 'n' frames
Controls the speed at which characters are displayed. A value of 1 will produce the fastest 'typing' possible. Fractions can be used in this field.

Show cursor while typing
Controls whether the cursor is shown during the Effect. Not showing the cursor produces smaller .swf files.

Flash cursor every 'n' frames
Controls the speed at which the cursor flashes. A value of 1 will produce the fastest flashing possible. Fractions can be used in this field.

At start of line flash cursor 'n' times
This feature determines the number of times the cursor flashes at the start of a line. A value of zero means the cursor will not flash at the start of a line.

At end of line flash cursor 'n' times
This feature determines the number of times the cursor flashes at the end of a line. A value of zero means the cursor will not flash at the end of a line.

Cursor Character
Lets you choose the cursor character for the Typewriter Effect. Choosing a space will result in no cursor being displayed. If the Typewriter Effect is being applied to a Text Object, the cursor font will be the same as the Text Object font.


Common Effect Settings

Many Effects share common settings that are displayed as tabs in the Effect Settings dialog box.

These settings include:

· Motion
· Easing
· Start At
· Cascade
· Camera
· Transforms.

Some of these tabs are not visable when first opening the Effect Settings dialog box. To display all Effects you need to press the 'More Tabs' button.


Transforms

The 'Transforms' tab enables you to assign a sequence of transforming animations to each component of a Complex Object. This tab is common to all the Basic Complex Effects.

transchars

Start/Middle/End check boxes
Enables or disables the settings for the component at the start/middle/end of the Effect. When the checkbox for Start or End is cleared, then the Effect starts or ends with the initial positions. When the checkbox for Middle is cleared, then the middle value is always halfway between the start and end values and the Transform is linear.

Position X/Y
Specifies the X/Y position for the component at the start/middle/end of the Effect. The X/Y value is relative to the original position of the component. A negative X/Y means the new position is on the left/top of the original position;a positive X/Y means the new position is on the right/bottom of the original position; a value of zero means there is no change in Scale Factor.

Spacing X/Y
Specifies the component (X) and line (Y) spacing factors for the component at the start/middle/end of the Effect. A value of 100% means there is no change in Scale Factor.

Scale X/Y
Specifies the width (X)/height (Y) Scale Factor for the component at the start/middle/end of the Effect. A value of 100% means there is no change in Scale Factor.

Angle X/Y
Specifies the rotation angle for the component's X/Y axis at the start/middle/end of the Effect. A value of zero means there is no change in angle or rotation.

X=Y check boxes
Forces the Y value equal to the X value for Spacing, Scale or Angle.

Alpha
Specifies the change to the alpha value of the component at the start/middle/end of the Effect. A value of 100% means there is no change in Scale Factor.

Color percentage and button
Specifies the color Transform for the component at the start/middle/end of the Effect. The new component color is calculated by taking the percentage of the selected color and adding the complementary percentage of the original color. For example, if the given percentage is 30%, the result will be 30% of the selected color mixed with 70% of the original color. A value of 0% means there is no change in color.


Camera

The 'Camera' tab enables you to adjust the 3D viewing settings for the 3D Effects. By adjusting the parameters for the camera, the user is able to observe the Object in a 3D world from different angles or positions over time.

camera

Use Perspective Projection
Determines whether 3D points are projected onto the Layout Panel using perspective rendering. When ticked, you can also specify a starting and ending Zoom Factor. Zoom Factors make no difference, and hence are not enabled, when the Perspective Projection option is turned off.

Each of the following Camera options can be assigned a value for the Start, Middle and End of the Effect.

Rotation
Specifies the angle the camera is rotated around the view vector.

Zoom
Specifies the Zoom Factor of the camera. This is only valid for Perspective Projections.

Camera Position
Specifies the position of the camera, where the X axis points left, the Y axis points down, Z axis points to the front, 1 unit is equal to 1 pixel and the origin is at the center of the Object.

X: the x co-ordinate of the camera's position
Y: the y co-ordinate of the camera's position
Z: the z co-ordinate of the camera's position

Target Focus
Specifies the point at which the camera is aimed.

X: the x co-ordinate of the camera's target focus
Y: the y co-ordinate of the camera's target focus
Z: the z co-ordinate of the camera's target focus


Cascade

The 'Cascade' tab enables you to control the order components of a Complex Object are animated. Cascading animates components one after another instead of all together.

cascading

Whole Object
If ticked, then the Effect applies to the Object as a whole and not to the individual components. The other controls on the tab do not apply and so are hidden.

Enable Cascade
If ticked, then the Cascade function is turned on and the relevant settings for this function revealed on the tab.

Direction
Instructs the Effect to animate the components of a Complex Object sequentially following the specified order.
· cascade-forwardbutton: forwards
· cascade-backwardbutton: backwards
· cascade-2s2cbutton: from two sides to center
· cascade-c22sbutton: from center to two sides
· cascade-interleavedbutton: follows the specified direction but alternates between the direction specified and the opposite direction so the animations are interleaved
· cascade-reversedbutton: play Effect forward and then backward again

At Start
Specifies the start state of the components.

· Add: the component is not visible until it is animated
· Freeze: all components are visible at the start of the Effect, but do not animate until it is their turn in the cascade order
· Continuous: all components are visible and animated in specified phases at the start of the Effect
· Repeating: repeats or loops cascading Effects

At End
Specifies the end state of the components.

· Remove: the component is removed when the component animation ends
· Freeze: the component is left as it is when the component animation ends
· Continuous: the component animation is continued until the effect ends
· Repeating: repeats or loops cascading Effects

Include and Order
Applies the Effect to the components of a Complex Object sequentially following the specified order.

· Visible only: animates the visible components only. For text, this means that spaces and line breaks do not take part in the Cascade sequence
· All chars: animates all components including space and line break characters
· By X position: animates the components in the order of their X position. All components with the same X position are animated at the same time
· By Y position: animates the components in the order of their Y position. All components with the same Y position are animated at the same time

Delay/Overlap/Duration
Determines when the animation begins and ends for the components of a Complex Object. You can only specify one of the three values, the other two are calculated and depend on the overall duration of the Effect and, more importantly, the number of components in the Object.

· Delay: specifies the delay between each component animation as a percentage of the whole Effect's duration
· Overlap: specifies the overlap between each component animation as a percentage of the whole Effect's duration
· Duration: specifies the duration of a component animation as a percentage of the whole Effect's duration


Motion

The 'Motion' tab enables you to set the position, scale, rotation, alpha (transparency) and color of the Object at the end of the Effect.

motiontab

X/Y Position
X/Y Position is the co-ordinate of the selected Object's center. There are four selections for X/Y Position control:

· Unchanged: the X/Y position for the selected Object is unchanged
· Jump to X/Y: moves the selected Object to the specified X/Y co-ordinate
· Jump Right/Down by: moves the selected Object from the original position to the right and down by the specified distance
· Jump Left/Up by: moves the selected Object from the original position to the left and up side by the specified distance.

Path at Key
Path at Key controls the shape of the Motion Path at the current Keyframe. There are two selections for Path at Key control:

· Smooth: the motion path is smooth at the current Keyframe
· Sharp: the motion path is cornered at the current key frame.

X/Y Scale
X/Y Scale is the scale factor of the selected Object's width/height. With the 'X=Y' checkbox ticked, you can scale the Object uniformly. When the function is turned off, you can independently stretch or shrink the Object in the X or Y directions. When scaling a Shape Object, the width of the line around the border of the shape is scaled by the maximum value of the X and Y factors. There are five selections for X/Y Scale control:

· Unchanged: the X/Y scale for the selected Object is unchanged
· Resize to 100%: changes the X/Y scale factor to 100%
· Resize to scale: changes the X/Y scale factor to the specified value
· Increase by: increases the X/Y scale factor by the specified percentage
· Decrease by: decreases the X/Y scale factor by the specified percentage.

X/Y Angle
X/Y Angle is the clockwise rotation angle of the selected Object's X/Y axis. With the X=Y checkbox ticked, you can rotate the Object, when the checkbox is cleared, you can skew the Object. There are five selections for X/Y Angle control:

· Unchanged: the rotation angle of the selected Object's X/Y axis is unchanged
· Rotate to Zero: changes the rotation angle of the selected Object's X/Y axis to zero degree
· Rotate to Angle: changes the rotation angle of the selected Object's X/Y axis to that specified
· Rotate CW by: rotates the selected Object's X/Y axis clockwise by the specified degrees
· Rotate CCW by: rotates the selected Object's X/Y axis counter-clockwise by the specified degrees.

X=Y
These two check boxes force the Y value to be equal to the X value for Scale or Angle.

Orient to path
If this setting is not checked, the in-between orientation of the selected Object is decided by the X/Y Angle settings.
nop
If this setting is checked, the orientation of the selected object will follow the tangent of the Motion Path while the Object is moving.

Override angle settings
If this setting is not checked, the in-between orientation is a blend of the original orientation, the tangent of the Motion Path and the settings of X/Y Angle. At the end of the Effect, the orientation of the object is always the same as the X/Y Angle settings.
op1
If this setting is checked, when the selected Object is moving, the orientation always follows the tangent of the Motion Path and the X/Y Angle settings are ignored.
op2

Alpha
Alpha controls the transparency of the selected object. There are six selections for Alpha control:

· Unchanged: the alpha (transparency) for the selected Object is unchanged
· To Transparent: changes the alpha value to 0%, making the Object completely transparent
· To Opaque: changes the alpha value to 100%, making the Object completely opaque, with no transparent or semi-transparent areas
· Fade to Alpha: changes the alpha value to the specified value
· Increase by: increases the alpha value by the specified value
· Decrease by: decreases the alpha value by the specified value.

Color
This setting allow you to apply the color Transform to the selected Object. There are five selections for Color control:

· Unchanged: the color of the selected Object is unchanged
· Black: the Object is changed to black (even if the Object had multiple colors before)
· White: the Object is changed to white (even if the Object had multiple colors before)
· Color: the Object is changed to the specified color. The Object's color is determined by taking the percentage of the selected color and adding the complementary percentage of the original color. For example, if the given percentage is 30%, the result will be 30% of the selected color mixed with 70% of the original color.

Advanced
This setting allows you to specify the new Alpha/Red/Green/Blue value by taking a percentage of the current Alpha/Red/Green/Blue value and adding a value to the result. This checkbox is only visible if the color transform is used.


Easing

The 'Easing' tab enables you to control the position/scale/angle/alpha/color Transform speed at the start and at the end of the Effect.

easingtab

Start
Accelerates the change at the start of the Effect.

At End
Decelerates the change at the end of the Effect.

Acceleration
Controls the amount of acceleration or deceleration. A value of zero mean no acceleration. A positive value accelerates at the start or decelerates at the end. A negative value decelerates at the start of accelerates at the end.


Start At

The 'Start At' tab enables you to set the position, scale, rotation, alpha (transparency), and color of the Object before the start of the Effect. The Start At tab is displayed only if the 'Continue from previous effect' checkbox on the Effect Settings dialog box is unchecked.

placetab

X/Y Position
X/Y Position is the co-ordinate of the selected Object's center. There are four selections for X/Y Position control:

· Unchanged: the X/Y position for the selected Object is unchanged
· Jump to X/Y: places the selected Object to the specific X/Y co-ordinate
· Jump Right/Down by: moves the selected Object from the original position to the right and down by the specified distance
· Jump Left/Up by: moves the selected oObject from the original position to the left and up by the specified distance.

Reset components to original Transforms
If the previous Effect was a Complex Effect that transformed the component positions, then ticking this checkbox will reset the components back to their original positions before the next Effect starts. Otherwise, the components are left in whatever state they were in at the end of the previous Effect.

For example, if a Typewriter Effect follows an Explode Effect, the Reset components to original transforms option will reset the positions of the letters before the Typewriter Effect begins.

X/Y Scale
X/Y Scale is the scale factor of the selected Object's width/height. There are three selections for X/Y Scale control:

· Unchanged: the X/Y Scale for the selected Object is unchanged
· Unscaled (100%): sets the X/Y Scale Factor to 100%
· Scale Factor: sets the X/Y Scale Factor to the specified value.

X/Y Angle
X/Y Angle is the clockwise rotation angle of the selected Object's X/Y axis. There are three selections for X/Y Angle control:

· Unchanged: the rotation angle of the selected Object's X/Y axis is unchanged
· Zero angle: sets the rotation angle of the selected Object's X/Y axis to zero degree
· Angle of: sets the rotation angle of the selected Object's X/Y axis to the specified degrees.

X=Y
These two check boxes force the Y value to be equal to the X value for Scale or Angle.

Alpha
Alpha controls the transparency of the selected Object. There are four selections for Alpha control:

· Unchanged: the alpha (transparency) for the selected Object is unchanged
· 100% Transparent: sets the alpha value to 0, making the Object completely transparent
· 100% Opaque: sets the alpha value to 100%, making the Object completely opaque, with no transparent or semi-transparent areas
· Alpha Value of: sets the alpha value to the specified value.

Color
This setting allows you to apply a color Transform to the selected Object. There are five selections for Color control:

· Unchanged: the color of the selected Object is unchanged
· Black: the object appears black (even if the Object had multiple colors before)
· White: the object appears white (even if the Object had multiple colors before)
· Color: allows you to specify the color of the Object. The Object's color is determined by taking the percentage of the selected color and adding the complementary percentage of the original color. For example, if the given percentage is 30%, the result will be 30% of the selected color mixed with 70% of the original color.

Advanced
This setting allows you to specify the new Alpha/Red/Green/Blue value by taking a percentage of the current Alpha/Red/Green/Blue value and adding a value to the result.


Effects Authoring

Effects Authoring allows you to build your own SWiSHmax Effects.

To author an Effect select the 'Author' tab in the Effect Settings Dialog Box as shown below: ((shows cascade selected?? and revert settings??))

effectsauthoring

The Author option is only available in the Effect Settings Dialog Box if the 'Allow effect authoring' checkbox is checked in the 'Tools | Preferences' dialog box as shown below:

effectsauthoring-preferences

Once in author mode, two additional tabs, 'Author' and 'Custom', become available in the Effect Settings Dialog Box. These tabs allow you to add additional forumulas and settings to your Effects.

Author
The 'Author' tab is the place to add variables to be used in your Effect.

effectsauthoring-authortab

· Prompt: the display name for the Effect variable
· Variable: the Effect variables name, four use in your forumlas
· Type: the Effect variable can either be an edit box, check box, slider or color selector
· Min/Max: the minimum and maximum values of the variable, used for slider variables only
· Only show the "Custom" page: stops the 'Author' tab from being shown when the Effect is opened

Custom
The 'Custom' tab allows you to enter default values for your Effect's variables as shown below:

effectsauthoring-customtab

Once in author mode, you can set the value of any field for your Effect to be one of your Effect variables or a forumla containing a number of Effect variables. Effects variables and forumlas are entered in a field by right-clicking the field.


Scripting

SWiSHmax comes with a powerful scripting language called SWiSHscript.
SWiSHscript commands are defined in the Scripting Reference.

SWiSHscript is loosely based on Flash Action Script, but has SWiSHmax-specific extensions and differences.
The script can be compiled, depending on selected options, to produce script that is compatible with Flash Players 4, 5 or 6.


Introduction

This section is designed for those not familiar with programming or Scripting languages.

It is hoped that the following description and tutorials will help you become proficient in SWiSHscript.


What is Scripting

SWiSHscript is the language used by SWiSHmax that allows the user program a Movie and items within a Movie.

SWiSHscript can be used to define Actions that will occur at a specific Frame, when two Objects collide, or when some other external input is applied to the Movie.

SWiSHscript can also be used to control the playing of sounds, the loading of other sections of the Movie as well as control the Movie playing within a Sprite.

SWiSHscript replaces the 'Actions' Panel of SWiSH v2.


What is Possible with Scripting

The following things can be achieved with Scripting:

· user input (forms)
· games
· web-based calculators
· dynamic presentations
· sending data to web pages
· receving data from web pages
· run JavaScript.

SWiSHscript cannot:

· directly interface with a database. This, however, can be achieved through .php or .asp web pages
· access the same Objects that are available to JavaScript.


Variables

All programming languages, including SWiSHscript, make use of a concept called a 'variable'. A variable is analogous to the memory button of a calculator. It can be used to store the result of intermediate calculations and data. Unlike most calculators which only have 1 memory area, SWiSHscript can support multiple variables. The limit is defined by the size and power of your computer system. To allow access to a specific variable, each variable is given a name. The name can include the characters, a...z, A...Z, 0...9, . (dot), _ (underscore), and [ ] (square brackets). The . (dot) and [ ] characters have special meaning, described elsewhere.

Consider the following statement,

x = 3 + 1;

the result of the calculation (3 + 1) is assigned to the variable 'x'.

That variable can be used in subsequent calculations, such as:

y = x * x; // y = 16
x = x + 1; // x = 5, (previous value of x + 1).

Note that // is used to define a comment area. Comments are useful reminders to help you remember exactly what your script does.

Variables can also be used to hold a text message (also called a 'string'), e.g. in this example below. 'message' is a string

message = "Warning do not press that button"


Flow Control

All Scripting and programming languages execute commands in a defined order. This execution order is generally 'top to bottom'. SWiSHscript also performs commands in a top-to-bottom manner. This general order of execution can be altered through the use of Flow Control commands.

Flow Control commands can be categorised into Looping, Conditional and Function call commands.

Looping commands repeat a section of code until a certain condition becomes false. Available looping commands are:

· do..while
· for
· while.

Conditional commands allow specific sections of script to be executed if a certain condition is true or false. Available conditional commands are:

· if
· else
· else if.

Function call commands cause the execution flow to move to the named function, execute code within that function and return to original location after a return command is encountered in the named function. Available commands are:

· function
· return.


Objects

SWiSHscript is an Object-Oriented Scripting language.

The term 'Object-Oriented' is primarily a programming concept that broadly means that an Object is any item that contains data and behaves in a defined way. An Object-Oriented language sorts similar Objects into a 'classes'.

The class to which the Object belongs defines:

· the type and meaning of the data that the Object contains (properties)
· the way in which the Object and data can be manipulated (methods)
· the way in which the Object behaves during certain conditions (events).

For example, consider a class that defines animals. That class could contain the animal's name, type, number of legs, noise and so on. These attributes would be properties. Your pet cat Fleebag and your pet dog Growler could both be considered Objects belonging to the class animal.

The class animal could be (partially) defined as follows:

Properties
· Name
· Type
· Noise
· Angry

Methods
· MakeNoise()
· MakeAngry()
· Walk()
· Run()

Events
· IsAngry()
· IsHungry()
· IsTired()

When referring to properties and methods within an Object, the dot '.' character is used to delineate the object name and the contained property / method or event.

pet1.Name = "Fleebag"; // assign the name "Fleebag" to pet1.
pet1.MakeAngry(); // tease the cat.

The function pet1.IsAngry() will be executed once pet1 becomes angry.

Movies, Sprites, Buttons and Text Objects can all be considered to be Scripting Objects.
These Objects have pre-defined properties, methods and events associated with them.


Naming Conventions

As stated previously, the . (dot) character is used to delineate the Object name and the contained property/ method or event. An Object can also contain 'child' objects. Again, the . (dot) character is used to delineate between the Object and its child Object.

Assume an Object named obj1 has a property x. That property can be accessed as obj1.x
If obj1 is a child object of obj2, then the reference to obj1.x is only valid from within obj2.
To access the same property from outside of obj2, the full name is required. This name would be obj2.obj1.x

Because of the hierarchical nature of Object names, the following synonyms _root, _parent and this are implemented to represent (in order) the top-most object (always the main Movie), the immediate parent and the current Object. These synonyms are described in further detail in the Scripting Reference Manual.


Properties

A property is an item that defines something about the Object. Some properties are read only, whereas others are read/ write. The properties that an Object contains are defined according to the class it belongs to. This means that different types of Objects may have different properties.

For example, a Sprite and standard drawing Objects contain a number of properties that define the Object's size and position within the Movie.

Properties include:

· screen Position, _x, _y
· size, _width, _height
· scale, _xscale, _yscale
· rotation angle, _rotation
· opacity, _alpha.

A text field Object contains all of the Sprite or Scripting Object properties, but also has its own additional properties:

· maxscroll
· scroll
· text.

The properties that are available for each supported Object are defined in the Script Reference Dictionary.


Methods

A method is used to define ways in which an Object can be manipulated. The methods that an Object contains are defined according to the class it belongs to. This means that different types of Objects may have different methods.

For example, a Sprite Object contains a number of methods that can be used to control or manipulate the Sprite.

Sprite Methods include:

· play()
· stop()
· duplicateSprite()
· gotoAndPlay().

A String Object contains various methods that allow various string manipulations to be performed.

The methods that are available for each supported Object are defined in the Script Reference Dictionary.


Events

An event is a defined occurance that can apply to an Object. The events that are associated with an Object are defined according to the class the Object belongs to. This means that different types of Objects may have different events.

For example, a Sprite Object supports a number of different events.

These events include:

· onEnterFrame()
· onFrame()
· onLoad()
· onSelfEvent(mouseEvent).

An Event Handler routine can exist within the Object for each of the above events. When the defined event occurs, Script within the Event Handler function is executed.

The events that are available for each supported Object are defined in the Script Reference Dictionary.


Functions

Scripting Objects can also contain functions. Functions are a way of creating re-useable sections of script. This can increase the modularity and readability of your Script.

Functions are an ideal way of expanding the methods that can be applied to a particular Object. Functions that are defined within an Object are local to that Object.

If you wish to create functions that are available to all Objects, either create them in the main Movie (they will then be available as _root.function()), or create a Sprite specifically to hold these functions (they will then be available as _root.spritename.function()).

For example, a function MoveToZero() can be defined to move the Object 'ball' to position 0.

ball.MoveToZero() {
_x = 0;
_y = 0;
}

The script command
ball.MoveToZero(); will cause the ball object to move to 0,0

In this case MoveToZero() is effectively a local method of the ball Object.


Included Objects

SWiSHmax comes with the following pre-defined Objects:

Object Name | Description
Text | Used for the dynamic input and display of text
Button | A Button. This supports the additional Event Handling function on()
Math | Used to provide mathematical functions
Scripting Object | Any shape with the target checkbox ticked
Sprites | A Sprite


Tools

The main tool for adding script to your Movie is the Script Panel. This Panel allows you to enter script commands via pull-down Menus (Normal Mode) or via direct text entry (Expert Mode).

Normal mode is the preferred option for those not familiar with the available script commands or the properties associated with the different Scripting Objects. The Normal mode allows selection of the available commands, properties and methods via a pull-down menu system.

In order to see what your script is doing (or not doing), you can use the Debug Panel and Trace command. When your script is played by the internal player, a trace command will cause the associated text or variable to be displayed in the debug panel.

You can add comments to your program using the // and /* */ comment delimiters. The use of comments can greatly increase the readability of your code, making debugging and future modification significantly easier.

Comments are not exported and are only saved in the .swi file, so there is no speed penalty associated with their use.


Scripting Tutorials

Tutorials demonstrating major aspects of SWiSHscript can be found here.

Please work through the tutorials to gain a better understanding of Scripting.


Events

Scripting is used to support Events and Actions. Script can be viewed and modified via the Script Panel.

All Actions are triggered in response to an Event. Any Scripting Object can have Events associated with it. When an Event occurs, the Event Handling Routine executes any Actions that are defined for that Event.

Events can occur in response to reaching a certain Frame, or in response to mouse or keyboard Actions.

An Event can trigger more than one Action. For example, when the mouse rolls over an Object, the Movie can be stopped (with a Stop Action) and the browser can be told to load an URL into another Frame (with the Goto URL Action).

There are three types of Events:

· Frame
· Button
· Self.

Input Text Objects also have the additional Event onChanged available.


Frame Events

Frame Events occur when a Movie reaches a specified Frame.

The available Frame Events are as follows:

· onFrame: the Event is triggered just before the specified Frame is displayed
· onLoad: the Event is triggered when a Sprite or Scene is first displayed. OnLoad Events are handled before any onEnterFrame or onFrame Events
· onEnterFrame: the Event is triggered as each Frame is entered. OnEnterFrame Events are handled before any onFrame Events for a Frame.

For Actions, other than the Preload Content and Set Label Actions, the Event is triggered just before the specified Frame is displayed. See the Preload Content and Set Label Actions for information about how they work.

You can insert a Frame Event either by:

· using the Timeline: selecting the Scene row and pressing Add Script. This will create an onFrame Event Handler for that Frame
· using the Script Panel: selecting a Scene and pressing Add Script, and selecting Frame and the required Frame Event.


Self Events

Self Events occur when the mouse interacts with an Object in a Scene or a defined key is pressed. Only Objects that are defined as Targets can use Self Events.

More than one Self Event can trigger the same Action, as shown in the example below.

The Actions in a Self Event Handler apply to the Object itself. For example, with Sprites if a Self Event handler contains a stop() Action, then that Action stops the Sprite itself, not the main Movie. If you want the Actions to apply to the Movie, then use a Button Event instead.

You can insert a Self Event either by going to the Script Panel, selecting an Object, and pressing Add Script.

When you select a Self Event for an Object, the Self Event Properties are shown adjacent to the 'Event/Action' tree in the Script Panel.

selfevents-properties

This contains a list of check boxes showing the Self Events. You can select a combination of Self Events, such as Roll Over and Roll Out, so that the same list of Actions can be performed for different Events. The Events and their triggers are described below:

· onSelfEvent (press): press the left mouse button while the cursor is over the Sprite
· onSelfEvent (release): release the left mouse button while the cursor is over the Sprite
· onSelfEvent (rollOver): move the mouse cursor from outside the Sprite to over it with no mouse button pressed
· onSelfEvent (rollOut): move the mouse cursor from over the Sprite to outside it with no mouse button pressed
· onSelfEvent (dragOver): move the mouse cursor from outside the Sprite to over it with the left mouse button pressed
· onSelfEvent (dragOut): move the mouse cursor from over the Sprite to outside it with the left mouse button pressed
· onSelfEvent (releaseOut): release the left mouse button after moving the cursor outside the Sprite
· onSelfEvent (keyPress): press the define Key. The required key can be entered in the Key field or selected from the common keys drop-down Menu.

Note: Due to limitations of the Flash Player, the Play Sound and Stop Sound Action cannot be triggered by Drag Over, Drag Out or Release Outside Events

In the example below, both Press and Roll Over Actions will send the Movie to Frame one.

selfevents-example


Button Events

Button Events occur when the mouse interacts with an Object in a Scene or a defined key is pressed. Adding a Button Event to an Object makes it behave like a button and allows it to respond to the mouse and keyboard.

More than one Button Event can trigger the same Action, as shown in the example below.

The Actions in a Button Event Handler apply to the Scene or Sprite containing the Object. For example, if a Sprite has a Button Event Handler that contains a stop() Action, then that Action stops the Scene containing the Sprite, it does not stop the Sprite itself. If you want the Actions to apply to a Sprite, then use a Sprite Event instead.

You can insert a Button Event either by going to the Script Panel, selecting an Object, and pressing Add Event.

When you select a Button Event for an Object, the Button Event Properties are shown adjacent to the 'Event/Action' tree in the Script Panel.

buttonevents-options

This contains a list of check boxes showing the Button Events. You can select a combination of Button Events, such as Roll Over and Roll Out, so that the same list of Actions can be performed for different Events. The Events and their triggers are described below:

· on (press): press the left mouse button while the cursor is over the button
· on (release): release the left mouse button while the cursor is over the button
· on (rollOver): move the mouse cursor from outside the button to over it with no mouse button pressed
· on (rollOut): move the mouse cursor from over the button to outside it with no mouse button pressed
· on (dragOver): move the mouse cursor from outside the button to over it with the left mouse button pressed
· on (dragOut): move the mouse cursor from over the button to outside it with the left mouse button pressed
· on (releaseOut): release the left mouse button after moving the cursor outside the button
· on (keyPress): press the define Key. The required key can be entered in the Key field or selected from the common keys drop-down Menu.

Note: Due to limitations of the Flash Player, the Play Sound and Stop Sound Action cannot be triggered by Drag Over, Drag Out or Release Outside Events. A simple way around this limitation is to place your sounds in a Sprite called "sound", then use Actions such as sound.gotoAndPlay(2) where Frame 2 of the Sprite will cause the sound to play

In the example below, both Press and Roll Over Actions will send the Movie to Frame one.

buttonevents-example

Note: Button Events are assumed to work on the _root or main Movie layer. Consequently Actions such as _X += 5; which may be expected to move the button, will actually move the entire Movie to the right by 5 pixels


On Changed

The onChanged Event is only available for input Text Objects. This Event indicates that the text in the Text Object has been changed. The onChanged Event occurs when the user modifies the text in the input Text Object.

Note: There is a bug in Flash Player 6 where an OnChanged Event will cause it to crash if the Action triggered removes the Text Object. For example, changing the Scene with an OnChanged Event will cause the Flash Player to crash


Actions

Actions are operations that are triggered by Events.

Actions can alter the playing of the Movie, start or stop sounds, load other Movies or web pages, or communicate with the hosting browser or player.

Actions appear as Script Commands within Event Handler Functions. These can be viewed/modified via the Script Panel.

The available Actions are:

Frame Actions
· Set Label
· Preload Content

Movie control Actions
· Play
· Stop
· Goto And Play
· Load Movie
· Unload Movie

Conditional Actions
· If Frame Loaded
· If Near
· If Dropped On
· If Chance
· If
· While
· Do While
· Else
· Else If

Mouse dragging Actions
· Start Drag
· Stop Drag

Sprite Actions
· With
· Duplicate Sprite
· Remove Sprite

Statements
· Evaluate
· Assign
· Function
· Call
· Return

Sound Actions
· Play Sound
· Stop Sound
· Stop All Sounds

Browser/network Actions
· Get URL
· FS Command
· Javascript
· Mailto

Debugging Actions
· Comment
· Trace.


Common Concepts

Some concepts are common to many SWiSHscript commands. These concepts are described in this section.

You may find it easier to skip this section and rely on hyperlink references when necessary. If you wish to skip the detailed discussion of these concepts, you should continue from here.


Target

Many actions make reference to a 'Target'. The target is generally the Movie, Sprite or Object that the Action applies to.

The target can often be selected via a pull-down list in the Script Panel. Alternatively it can be typed in long hand.

The Object Synonyms '_root', '_parent' and 'this' can be used when the target refers to a Scripting Object. Note that slash notation is also accepted and is converted to the Object synonyms.


Slash Notation

In many cases, Object names are referred to as being in 'slash' notation. This means that the full path to the Object is specified via slashes where / represents the top or 'root' level.

For example, consider that a main Movie contains a Sprite s1 and that Sprite (s1) contains another Sprite s2.

The full slash notation name of s2 is "/s1/s2".
This is also defined by the _target property.
Therefore,
_root.s1.s2._target would return the string "/s1/s2".


User Defined Functions

You can define a function for any Scripting Object via the Define function option in the 'Script' tree. User defined functions are used to execute a series of statements. The function can be passed up to four arguments and return a value.

User defined functions can be called from any script in your Movie by using the Function Action.

Functions can (and should) be used to improve the modularity and readability of your code. Sections of code that are often re-used should be placed into a function.


Set Label

Use this Action to label a Frame. You can use the label to refer to the Frame by name in a Goto Frame or If Frame Loaded Action.

panels-action-setlabel

The Set Label Action can only be used with a Frame Event. That is, it has to be applied to a particular Frame of a Scene or Sprite. As with the Preload Content Action, the Frame does not need to be played for the label to be set.

The advantage of using Frame labels is that you can insert or delete Frames without having to change any Goto Frame Actions.

Label
This is the name given to a particular Frame. You should ensure that labels are unique within a Sprite or the main Movie, even if they appear in different Scenes. You can use the same label in different Sprites.

Use as a web page anchor
Sets the label as a web page anchor in your Movie. Anchors simplify navigation in Flash Movies by letting viewers use the 'Forward' and 'Back' buttons in a browser to jump from frame to frame or scene to scene. Anchors only work with Flash Player 6.

Note: There is a known 'bug' in how Flash Player 6 when using Anchors. When jumping with Goto Frame, the browser history records ALL anchors from the start of the Movie to the destination Frame. Therefore, the 'Back' button will go to each anchor in the browser history rather than straight to the previous one

In the example below, we have given Frame 10 the label "Part2". One could then use a Goto Frame Action elsewhere that jumps to the Frame labeled "Part2".

panels-action-setlabel-example


Preload Content

I find the original text confusing. Below (in blue) is my suggestion.
This action is used to mark the associated frame as the time when "Preload Content" should be loaded.

Any objects that have their preload option set to "At Preload Frame" will be loaded at this stage. The preload option can be found in the Export Panel of the Object.

Note:
· There can be more than one Preload Content Action in a Movie. The Object to be preloaded will be loaded at the closest Frame with the Preload Content Action before its first use. For example, if the Object to be preloaded is first used at Frame 18 and two Preload Content Actions are at Frame 10 and Frame 20, the Object will be loaded at Frame 10
· The Preload Content action is not required to use content. For example, if a sound has not been preloaded when a Play Sound Action is encountered, the sound will be automatically downloaded

Use this Action to instructs the SWiSH Movie to download (or define) a piece of content before it is used. For instance, you may want to make sure a sound is ready to be played before you issue a Play Sound Action, or an image has been downloaded before it is displayed.

To preload an object immediately before the Frame with the Preload Content Action, the preload option of the object has to be set as 'At Preload action'. The preload option can be found in the Export Panel, the properties dialog box of an image fill style and the sound options dialog box.

Note: There can be more than one Preload Content Action in a Movie. The object to be preloaded will be defined at the closest Frame with the Action before its first use. For example, if the object to be preloaded is first used at Frame 18 and two Preload Content Actions are at Frame 10 and Frame 20, the object will be defined at Frame 10.

Note: The Preload Content action is not required to use content. For example, if a sound has not been preloaded when a Play Sound Action is encountered, the sound will be automatically downloaded.

See also Creating a Preloader for further information.

There are no options for the Preload Content Action.


Play

Use this Action to play a Movie or Sprite. If the Movie or Sprite is stopped, the Play Action will cause it to resume playing from the current Frame. If the Movie or Sprite is already playing, then the Play Action will have no effect.

panels-action-play

Target
The target Movie or Sprite to play.


Stop

Use this Action to stop a Movie or Sprite. If the Movie or Sprite is playing, the Stop Action will cause it to stop. If the Movie or Sprite is already stopped, then the Stop Action will have no effect.

panels-action-stop

Target
The target Movie or Sprite to stop.


Goto And Play

Use this Action to go to another Frame. The Frame can be in the same Scene or another Scene.

panels-action-gotoframe

When you use the Goto And Play Action with a Frame Event, the Goto And Play happens before the Frame containing the Action is displayed.

Note: A Goto And Play Action will have no effect until the Frame it is to go to is loaded

Target
The target Movie or Sprite that the action applies to.
It is possible to start the Movie in Sprite s1 playing from Frame 10 via the command: _root.s1.gotoAndPlay(10); In which case, _root.s1 would be the target.

The target can also be a scene in the current Movie, in which case the Target Object is assumed to be the current Object.

You can specify the Frame you want to go to in one of three different ways:
· by Frame number within a Scene
· by Frame label
· skip a number of Frames.

Frame

panels-action-gotoframe-number

Select the Scene containing the Frame you want to go to. Enter the Frame number (starting from zero) in the 'Actions' Panel. You can select the Scene directly by name, or use one of the five special Scene names:
· _THIS_SCENE_
· _FIRST_SCENE_
· _LAST_SCENE_
· _PREV_SCENE_
· _NEXT_SCENE_.

Label

panels-action-gotoframe-label
Select the label of the Frame you want to go to. The Frame can be anywhere in the current Movie or Sprite. You do not need to select the Scene containing the labeled Frame. See the Set Label Action.

Skip

panels-action-gotoframe-skip

Specifies a postive or negative number of Frames to skip. For example, if set to 1 the next the Movie will go to the next Frame,
while if set to -1 the Movie will go the the previous Frame.

Scene
The Scene selection only appears when you select the Number option (see above). If the Goto Frame Action is targetting a sprite, then you cannot select a Scene, as Sprites do not have Scenes within them.

Play
When the Play option is selected (the default setting), the Movie or Sprite will continue playing from the Frame you specify.

Stop
When the Stop option is selected, the Movie or Sprite will display the Frame you specify and then stop.

In the example below, the Movie will jump to Frame 22 of "Scene_1" when the mouse button is pressed inside the current Object. The Movie will keep playing from that Frame after the jump.

((why is this after the stop function?? Should it be under Frame??))

panels-action-gotoframe-example


Load Movie

Use this Action to load another .swf file into the current Flash Player.

panels-action-loadmovie

When a .swf file is loaded, the [0,0] co-ordinate of the loaded .swf file is aligned with the [0,0] co-ordinate of the Movie or Sprite into which is it loaded. The [0,0] coordinate of a .swf file is usually the top-left corner. The [0,0] co-ordinate inside a Sprite is usually the center. This means that if you load a .swf file into a level, the top-left corner of the loaded .swf file will be aligned with the top-left corner of the Movie. If you load a .swf file into a Sprite, then the top-left corner of the loaded .swf file will be aligned with the center of the Sprite.

If you are exporting a .swf file from SWiSH, you can specify that the [0,0] co-ordinate of the Movie is in the center, rather than the top left. To do this, change the "Offset to suit use as a Movie Clip" option in the Movie Export Panel.

URL
You can specify an absolute or relative URL of the .swf file to load. If you do not specify an absolute URL for the .swf file, the Flash Player will assume the relative URLs are based on the URL for the currently open .swf file. When running in a browser, you can override the base URL using the 'Base' option on the HTML Export Panel. When playing within SWiSH, or using the File | Test | In Player or File | Test | In Browser commands, the default folder is the one selected in the Tools | Preferences dialog box. If you want to be able to test the Load Movie Action, then you need to ensure that the .swf files can be found in the selected folder.

Load Into

Sprite
You can load the .swf file into the current Sprite or Scene. The .swf file replaces the previous content of the Sprite, however, the position and size of the Sprite, and any Effects applied to it will apply to the loaded .swf instead.

Level
You can specify the level you wish to load the .swf file into. Movies loaded into higher levels appear in front of those in lower levels. The Movie that was loaded first is always loaded at the bottom level, level 0. The Movie at level 0 sets the Frame Rate, background color, and Frame size for all other loaded Movies. Movies are then stacked in numerically higher levels above the Movie at level 0. You can replace a Movie at a given level by simply loading another Movie into that level. In particular, you can 'Chain' Movies together by loading another Movie over the current Movie at level 0.

Variables
Specifies the HTTP method of sending variables to the Movie to be loaded.

· Don't send variables: no variables are sent
· Send using get: the GET method appends the variables to the end of the URL, and is used for small numbers of variables
· Send using post: the POST method sends the variables in a separate HTTP header and is used for long strings of variables

Load Variables Only
Reads variables from the URL specified, either from a text file or a script such as CGI, ASP, PHP or Perl scripts. The content of the Sprite or Level specified are not replaced, only the value of the variables.


Unload Movie

Use this Action to unload a .swf file that was previously loaded in a specified level.

panels-action-unloadmovie

Source
This variable determines whether the Movie should be unloaded from a particuler level or Sprite. See the Load Movie Action for more information. ((where??))

Sprite
You can specify the Sprite that you want unloaded. Any .swf Movie playing within that Sprite is cleared.
((no heading for Sprite in the screengrab??))

Level
You can specify the Movie level that you want unloaded. Any .swf Movie playing in that level is cleared.


If Frame Loaded

Use this Action to perform Actions only if a given Frame has been loaded. This can be useful when creating a preloader.

panels-action-ifframeloaded

You can specify the Frame you want to test for in one of two ways: by Frame number within a Scene, or by Frame label.

Target
The target Movie, Sprite or Object that the Action applies to. Note that the target name must use slash notation or the _target property.

Frame

panels-action-ifframeloaded-number

Select the Scene containing the Frame you want to go to. Enter the Frame number (starting from zero) in the 'Action' Panel. You can select the Scene directly by name, or use one of the five special Scene names:
· _THIS_SCENE_
· _FIRST_SCENE_
· _LAST_SCENE_
· _PREV_SCENE_
· _NEXT_SCENE_.

Scene
The Scene selection only appears when you select the Frame option (see above).

Label

panels-action-ifframeloaded-label

Select the label of the Frame you want to go to. The Frame can be anywhere in the current Movie or Sprite. You do not need to select the Scene containing the labeled Frame. See the Set Label Action.

Skip

panels-action-ifframeloaded-skip

Specifies a positive or negative number of frames to skip and test if loaded. For example if set to -1 the Action will test whether the previous Frame was loaded.

This Action can contain the other Conditional Actions including If, While and Else.

In the example below, the Movie is instructed to jump to Frame 0 of Scene 2, only when Frame 0 of Scene 2 has been downloaded.

Note: In this case, an If Frame Loaded Action is not strictly necessary, as the Goto And Play Action will not do anything if the Frame it is to go to is not yet loaded

panels-action-ifframeloaded-example


If Is Near This

Use this Action to perform Actions if the current Sprite is near another Sprite. You can specify how close the other Sprite has to be in the x and the y direction to be considered 'near'.

panels-action-ifnear

Target
The target Movie or Sprite that we are testing for proximity.

How Close
Select the the allowable distance in the x and y directions for the other Sprite to be considered near.

Note: The distance is taken from the x and y origin co-ordinate of the Sprites. Ths is usually the center of the Sprite

In the example below, the Sprite will jump to Frame 10 if its center is within 10 pixels of the center of the Sprite called "MySprite".

panels-action-ifnear-example

This Action can contain the other Conditional Actions including If, While and Else.


If Drop Target

Use this Action to perform Actions if the current Sprite is dropped on another Sprite when dragging (see the Start Drag and Stop Drag actions)

panels-action-ifdroppedon

Target
The target Movie, Sprite or Object that the Action applies to. Note that the target name must use slash notation or the _target property.

In the example below, the Sprite will jump to Frame 10 if dropped on the Sprite called "MySprite".

panels-action-ifdroppedon-example

This Action can contain the other Conditional Actions including If, While and Else.


If Chance

Use this Action to perform Actions at random. You can specify the chance of the Actions being taken as a percentage probability.

panels-action-ifrandom

Random Chance
Select the chance that the Actions should execute as a percentage probability

In the example below, the Sprite will have a 25% chance of jumping to Frame 10

panels-action-ifrandom-example

This Action can contain the other Conditional Actions including If, While and Else.


If

Use this Action to mark the start of an alternative set of Actions to perform, if the condition of the controlling Action (e.g. If Frame Loaded or If Near Action) is met.

There are no options for the If Action.


While

Use this Action to mark the start of a loop of Actions to perform while the condition of the controlling Action (e.g. If Frame Loaded or If Near Action) is met.

There are no options for the While Action.


Do While

Use this Action to execute a set of Actions and then evaluate the condition in a loop while the condition of the controlling Action (e.g. If Frame Loaded or If Near Action) is met.

There are no options for the Do While Action.


Else

Use this Action to mark the start of an alternative set of Actions to perform if the condition of the controlling Action (e.g. If Frame Loaded or If Near Action) is not met.

There are no options for the Else Action.


Else If

Use this Action to add an additional If Action to evaluate if the condition of the controlling Action (e.g. If Frame Loaded or If Near Action) is not met. Else If Actions are used to add nested statements to your Scripts.

There are no options for the Else If Action.


Start Drag

Use this Action when you want to start dragging a Sprite with the mouse. To stop dragging, use the Stop Drag Action. This Action is usually placed in a Press Event.

panels-action-startdrag

Target
The target to apply the Start Drag Action to.

Locked
When locked, the center of the Sprite follows the mouse, otherwise the Sprite will simply follow the mouse movement

Constrained
When constrained, the Sprite stays withint the specified rectangle.

Constrain to rectangle
The rectangle the Sprite is constrained to.

In the example below, the target "square" will start dragging when you press the mouse button on it.

panels-action-startdrag-example

Note: If you put a Press or Release Event on the Sprite itself, it will be exported as a button and no longer work as a Sprite. Also the dragging Actions will then apply to the Sprite or Movie that contain the Sprite (rather than the Sprite itself). Instead, put the mouse Events on a button or Object inside the Sprite


Stop Drag

Use this Action when you have finished dragging a Sprite using the Start Drag Action. This Action is usually placed in a Release Event.

There are no options for the Stop Drag Action.

Note: If you put a Press or Release Event on the Sprite itself, it will be exported as a button an no longer work as a Sprite. Also the dragging Actions will then apply to the Sprite or Movie that contain the Sprite (rather than the Sprite itself). Instead, put the mouse Events on a button or Object inside the Sprite


tellTarget

Use this Action to direct all its child Actions to the named Sprite/Movie rather than the current Sprite/Movie.

panels-action-telltarget

Target
Defines the target the Actions apply to.

The tellTarget Action is useful when you have Sprites or loaded Movies at other levels, as it allows Sprites do things to each other. It also lets the Sprite do things to the main Movie and vice versa.

Note: Sprites that are inside a Button State cannot act as targets, even if they have a name. Also Sprites that are within an unnamed Sprite or a Group can only be referred to from within the Sprite itself (i.e. from one of the Objects inside the Sprite)

Targets can be nested inside other targets. In this case, you need to specify a target by either an absolute or relative target path. Both slash and object synonym notation is supported.

An absolute target path starts with a '/' or _root.
A relative target path starts with either the name of a child Sprite or 'this.<child sprite name>'.
The parent Sprite (or Scene) can be referred to via '../' or '_parent.'.

For example, assume a Scene has the following Sprites:

Scene 1
Sprite Tom
Sprite Richard
Sprite Harry

Scene 1 contains two Sprites, 'Tom' and 'Harry'. Sprite Tom contains another Sprite, 'Richard'.

From within Sprite Tom, you could use the following to refer to the other Sprites and Scenes:

'/' and _root. refers to Scene 1 (main Movie)
'../' and _parent. refers to Scene 1 (parent of the current Sprite)
'../Harry' and _parent.Harry refers to the sibling Sprite called Harry (that is, Harry is within the parent of Tom)
'/Harry' and _root.Harry refers to the Sprite within the main Movie called Harry
'Richard' and this.Richard refers to the child Sprite Richard
'/Tom/Richard' and _root.Tom.Richard refers to the child sprite Richard, which is a child of Tom, which is in the main Movie.

In the example below, the tellTarget Action will send "My Sprite" to Frame 0 when Scene_1 arrives at frame 10.

panels-action-telltarget-example

This is identical to MySprite.gotoAndPlay(0);


Duplicate Sprite

Use this Action when you want to duplicate a Sprite in your Movie.

panels-action-duplicatesprite

Target
The target Movie or Sprite to be duplicated.

Name
The name of the new Sprite to be created.

Depth
Depth should be >= 0. Duplicate Sprites at higher depth appear in front of duplicate Sprites at lower depth. You can replace a duplicate Sprite by specifying the same depth as another Sprite. All duplicate Sprites appear in front of all static Objects.


Remove Sprite

Use this Action when you want to delete a Sprite created using the Duplicate Sprite Action.

Note: Only Sprites created with the Duplicate Sprite Action can be deleted using Remove Sprite

panels-action-removesprite

Target
The target Movie or Sprite to be deleted.


Evaluate

Use this Action when you evaluate an expression.

This can also be used to enter single lines of script without going through the full menu-pull-down procedure.

e.g. you can type in "this._X += 5" without using the Assign Action and its multiple parameters.

panels-action-evaluate

((this makes absolutely no sense to me...))


Assign

Use this Action to change a properties of an Object, Sprite or the whole Movie.

panels-action-assign

Target
The target Movie or Sprite.

Property/Variable
Select the variable or property you wish to set.

Operator
For any of the properties or variables, you can either set it to a new value (=), add (+=) or subtract (-=) a value, or multiply (*=) or divide (/=) by a constant value or by the corresponding value of another Sprite. You can also limit the property value to a maximum or minimum value.

panels-action-transform-menu

Value
The variable or property can be assigned any value or expression equating to a value.


Function

Use this Action when you want to call a User Defined Function.

panels-action-function

Target
Select the Sprite or Movie who's function you wish to call.

Function
The function to call.

Arguments
The arguments to be used by the function.

See Also
Return, User Defined Functions


Call

Allows you to Call the Actions in a labelled frame of the nominated clip. Lets you put a library of Action script in a Sprite and call it from elsewhere.

panels-action-call

Target
The target Movie or Sprite to be called.

Label
Select the label of the Frame you want to call. The Frame can be anywhere in the current Movie or Sprite. You do not need to select the Scene containing the labeled Frame. See the Set Label Action.


Return

Use this Action when you want to return a value from a Function.

panels-action-return

Return
The string or expression for the value you wish to be returned.

Example
If your function was intended to return the area of a circle, you would enter:

r * r * Math.PI

(assuming that r was the radius parameter of the function).

panels-action-return-example

See Also
Function


Play Sound

Use this Action to play a sound.

panels-action-playsound

Only sounds that have been imported can be selected. Use the 'Import...' or 'Reload' buttons to import/reload a .wav or .mp3 sound file.

Note:
· Due to a limitation in the Flash Player, sounds will only play in response to a Frame Event, or the Mouse Events Press, Release, Roll Over or Roll Out. Sounds cannot be played in response to the Mouse Events Drag Over, Drag Out or Release Outside
· Due to a limitation in the Flash Player, MP3 sounds must have sample rates of 11025Hz, 22050Hz or 44100Hz

Import...
You can import a sound file into the Movie using the 'Import...' button. You can import Windows .wav files or .mp3 sound files.

Reload
You can reload a previously loaded sound file by selecting the sound in the 'Content' tree and using the 'Reload' button. This is useful if the sound file on disk had changed since the last time it was loaded.

Delete
You can delete a sound file from the Movie by selecting it in the 'Content' tree and using the 'Delete' button. This does not delete the sound from your disk drive, it only removes it from within the .swi file so it can't be played.

Properties
Also available form the 'Content' tree, the 'Properties' dialog allows you to modify properties for a sound file including Compression, Channels and Sample Rate.

panels-action-playsound-properties

· Imported sound properties: displays the settings used on importing the sound file
· Preload sound: specifies when the sound is defined in the .swf file. See the discussion on the Object page of the Export Panel for more information
· Export settings: displays the settings used when the Movie is exported:
· Compression: specifies the sound compression method. The available options are None, ADPCM and MP3
· Channels: specifies whether the sound will play in Mono or Stereo
· Sample Rate: specifies the sample rate for the sound file. The available options are 5.5, 11, 22 and 44kHz
· Use LAME MP3 encoder: available when using MP3 compression. This option makes SWiSHmax use LAME MP3 encoder to compress the sound instead of using Windows' MP3 CODEC

Note: There is an option to 'Always use the LAMEencoder to encode MP3 sound' in the Tools | Preferences dialog box

· Sample Bits: available when using uncompressed sound, it defines the bits used for each sample. Higher settings will create better quality sound, though larger size files
· ADPCM Bits: available when using ADPCM compression, it defines the bits used for each sample. Higher settings will create better quality sound, though larger size files
· Play: plays the sound with the current setting. The 'Play' button also updates the number of bytes for the sound file, as shown under the 'Stop' button
· Stop: stops the currently playing sound. This is useful for a long sound, or a sound with a large number of loops

Sound Effect
The 'Sound Effect' dialog box allows you to modify how the sound file is played for this Action.

panels-action-playsound-settings

· Don't play sound if it is already playing: lets you stop a sound being triggered multiple times
· Sound effect: specifies simple sound Effects, including fading in or out and panning effects
· Loop sound: specifies how many times the sound will be played. In the example above, the sound called "chimes.wav" is played 10 times. Due to a limitation in the Flash Player, there is no infinite loop option. If you want your sound to loop for a very long time, enter a large number, such as 50,000
· Volume: specifies the volume of the sound for playback as a percentage of the original volume
· Fade in first loop: fades in the first loop played for the sounds file
· Fade out last loop: fades out the last loop played for the sound file
· Play: plays the sound with the current setting. The 'Play' button also updates the number of bytes for the sound file, as shown under the 'Stop' button
· Stop: stops the sound currently playing. This is useful for a long sound, or a sound with a large number of loops

Content tree
The 'Content' tree shows you the sound Objects that are available for playing in this Movie.

In the example below, the sound called "chimes.wav" is played when the movie reaches Frame 10.

panels-action-playsound-example

See also Adding Music and Sounds for further information.


Stop Sound

Use this Action to stop playing the selected sound.

panels-action-playsound

The options and limitations are the same as for the Play Sound Action. However, instead of playing the selected sound, it is stopped.


Stop All Sounds

Use this Action to stop playing all sounds that are currently playing for a Movie or Sprite.

There are no options for this Action.


Get URL

Use this Action to load an URL into the specified Target Frame of the browser (or whatever program is playing the Movie).

panels-action-gotourl

Note: When playing within SWiSHmax, Get URL Actions are not performed

URL
You can specify an absolute or relative URL of the file to load. If you do not specify an absolute URL for the file, the Flash Player will assume the relative URLs are based on the URL for the currently open .swf file. When running in a browser, you can override the base URL using the 'Base' option on the HTML Export Panel.

Target
You can specify an HTML Target Frame to load the file into. This is not the same as a Frame in the SWiSH Movie, but rather an HTML Frame. You can leave this blank if you do not understand HTML Frames, or simply want to replace the page that contains the Movie with the specified URL.

Send Variables Method ((do these need explaining??))
· Don't send ((or NO?? is this or the screengrab right??))
· GET
· POST

In the example below, the browser will load the URL "http://www.swishzone.com" when the mouse button is pressed inside the current Object.

panels-action-gotourl-example


FS Command

Use this Action to send commands to the browser or player.

panels-action-fscommand
((does screengrab need to show all the headings??))
Command
You can specify the command to enter.

Argument
This provides extra information to the script for the given command.

Note: When playing within SWiSHmax, FS Command Actions are not performed

Using FSCommand with the stand-alone Flash Player or Projector
If the .swf Movie is playing within a stand-alone Flash Player or a projector, you can only use one of the predefined FS commands. Those predefined FS commands appear in the drop-down list on the FS Command Action page.

AllowScale
True: displays the .swf file scaled (not always 100%)
False: .swf file is always 100%

ShowMenu
True: displays the full Flash Menu on right mouse click (Windows). Displays the full Flash Menu on control + mouse click (Mac)
False: displays "About Shockwave Flash" only (Windows). Greys out the Menu (Mac).

FullScreen
True: .swf file is displayed full-screen size
False: .swf file is displayed at original size

Exec
Program Name: executes the specified program. This command is valid for stand-alone projectors only.

Quit
Quits the .swf file.

Using FS Command within an HTML document in a browser
If the Movie is playing within an .htm document in a browser, there are no predefined commands. Instead, the FS Command Action triggers some JavaScript/VBScript within the HTML page. This script has to test for the command name, and should then run appropriate script commands. The argument value is also available to the script to use as it is required.

When you use the 'Export HTML' command, SWiSHmax will add the necessary basic script to the .htm document when you export the Movie. All you have to do is to implement the function at the place marked "// ADD YOUR CODE HERE" in the exported .htm document.

In the example below, the Movie will call the embedded script function TestFunction in the .htm document when the mouse button is pressed inside the current object.

panels-action-fscommand-example

SWiSHmax will add the following script to the beginning of the .htm document when you export the Movie. Then you can replace "// ADD YOUR CODE HERE" with your own code. ((need to explain what this code does??))

<SCRIPT LANGUAGE="JavaScript">
<!--
// Detect Browser
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// FSCommand handler for Netscape
function Movie1_DoFSCommand(command, args) {
var Movie1Obj = InternetExplorer ? Movie1 : document.Movie1;
if (command=="TestFunction") {
// ADD YOUR CODE HERE
}
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="VBScript">
<!--
// FSCommand handler for VBScript and ActiveX
Sub Movie1_FSCommand(ByVal command, ByVal args)
call Movie1_DoFSCommand(command, args)
end sub
//-->
</SCRIPT>


JavaScript

Use this Action to directly execute some JavaScript.

panels-action-javascript

The JavaScript can have multiple lines. SWiSHmax will automatically 'escape' the blanks and newlines etc, prefixes "javascript:", and appends ";void(0);" before sending it to the browser. This means you only have to include the actual JavaScript code itself.

Note: When playing within SWiSHmax or within a stand-alone player, JavaScript Actions are not performed

In the example below, the browser will call the specified JavaScript code to display the message "Hello World" in a dialog box when the mouse button is pressed inside the current Object.

panels-action-javascript-example


Mailto

Use this Action to send email.

panels-action-mailto

When the Mailto Action is executed, the Flash Player will start the default email client ((client's default email program??)). The fields you have specified will be already filled in. The user can edit any of these or fill in any that are blank and then send the message.

To
You can put in the email address of the recipient.

CC
You can put in the email address of the recipient of a copy of the message.

Subject
You can supply a subject line for the message.

Message body
You can supply text for the message. Newlines can be embedded for formatting.

In the example below, the Movie will allow the user to send an email to webmaster@swishzone.com and a copy to sales@swishzone.com.

panels-action-mailto-example


Comment

Use this Action to add comments to your code. Comments do nothing at all to the programming, they just help document what is going on.

There are no options for the Comment Action.


Trace

Use this Action to display the results of an expression in the Debug Panel when playing your Movie.

In the example below, the name of the Sprite will be displayed in the 'Debug' Panel when the Sprite is loaded.

panels-action-trace


Script Reference

There are a number of areas where SWiSHscript differs from Flash MX script (Actionscript). The main areas of difference are described here .

SWiSHscript commands can be divided into the following groups:

· operators: Arithmetic, Comparison, Equality, Logical
· functions and methods: General Functions, Sprite Object, String Object, Math Object, Timer Object, Text Object
· Object properties: General Object Properties, Sprite Object Properties, Text Object Properties
· Constants and Object synonyms

Each of the Scripting commands is described in detail in the Script Reference Dictionary. This dictionary is arranged in alphabetical order for ease of reference.

Any Scripting Object can have Event Handler functions associated with it. These Event Handler functions execute script commands in response to defined events.

General definitions can be found in the Definitions Section.

Useful formulas and other notes can be found in the Useful Stuff section.


Arithmetic Operators

· + (addition)
· - (minus)
· * (multiplication)
· / (division)
· % (mod)
· ++ (increment)
· -- (decrement)
· add (concat strings)


Comparison Operators

· < (less than)
· <= (less than or equal to)
· > (greater than)
· >= (greater than or equal to)
· lt (less than - string specific)
· le (less than or equal to - string specific)
· gt (greater than - string specific)
· ge (greater than or equal to - string specific)


Equality Operators

· == (equality)
· != (inequality)
· eq (equal - string specific)
· ne (not equal - string specific)


Logical Operators

· && (short-circuit AND)
· || (logical OR)
· ! (logical NOT)
· ?: (conditional)


Functions

· eval(string)
· variable(string)
· getProperty()
· Number(string)
· String(number)
· int(value)
· parseInt(string)
· parseFloat(string)
· isNearThis()
· isNearTarget()


Constants

· true
· false
· PI
· SQRT2
· SQRT1_2
· TAB
· NEWLINE
· $version


Object Properties

All Scripting Objects inherit the following properties:

Property | Read Only | Physics Option | Description
_age | yes | yes | Age of Object since placed (in seconds)
_alpha | no | yes | Sets the Object's transparency (0 = transparent, 100 = solid)
_delta | yes | yes | Time elapsed since last form displayed (in seconds)
_droptarget | yes | no | Name of the Movie Clip/ Sprite that draggableInstance has been dragged over
_focusrect | no | no | Global property that defines whether a yellow rectangle appears around the button that has keyboard focus. Default value is true
_framesloaded | yes | no | The number of Frames that have currently been loaded
_height | yes | no | Returns the current height of the Sprite or Object
_highquality | no | no | Specifies the level of anti-aliasing applied to the current Movie
_name | no | no | Current name of the Sprite/ Movie Clip or Object
_parent |  | no | Synonym for the Sprite/ Movie Clip/ Object that contains this Object, i.e. the parent
_rotation | no | yes | Sets/ Returns the current rotation angle of the Sprite or Object
_soundbuftime | no | no | Specifies the number of seconds of streaming sound to prebuffer
_target | yes | no | Target path of the Sprite/ Movie clip or Object
_time | yes | yes | Time since the start of the whole Movie (in seconds)
_totalframes | no | no | The number of Frames contained within the Sprite/ Movie Clip
_url | yes | no | Returns the URL of the .swf that the Movie Clip was downloaded from
_visible | no | no | Sets/ returns the current visibility status of the Sprite/ Movie Clip or Object
_width | yes | no | This read-only property returns the current width of the Sprite or Object
_x | no | yes | Sets/ returns the current X co-ordinate of the Sprite or Object
_xscale | no | yes | This property returns or sets the horizontal scale of the inidicated Sprite/ Object
_y | no | yes | Sets/ returns the current Y co-ordinate of the Sprite or Object
_yscale | no | yes | This property returns or sets the vertical scale of the inidicated Sprite/ Object


Event Handlers

Each Scripting Object can be supplied with an Event Handling routine so that specific script Actions occur in response to pre-defined Event conditions.

The following Event Handling routines are supplied:

· on(mouseEvent): used for buttons only. Defines Actions to be performed when a defined mouse or keyboard Action occurs. The Actions are always applied to the top level or _root Movie
· onEnterFrame(): defines the Actions to occur at the start of each Frame
· onFrame(): defines the Actions to occur in a specific Frame
· onLoad(): defines the Actions to occur when the Object is loaded
· onSelfEvent(mouseEvent): defines Actions to be performed when a defined mouse or keyboard Action occurs
· onChanged(): used for Text Field Objects only. Defines the Actions to occur when the contained text changes.


Definitions

This section defines the following features of SWiSHmax:

· Script Object
· Sprite
· Movie Clip.


Script Object

A Script Object is a drawing Object that is named and has the 'Target' checkbox ticked.

A Sprite is also a Script Object ('Target' checkbox is not required), as is the main Scene.

A Script Object can have Event Handler and private functions associated with it. Such an Object becomes the basic element of scripting.

All Script Objects have Object properties. In addition, Text Objects can also have text field properties.

When the 'Target' checkbox is available and ticked, the Object is automatically converted to a Sprite. This conversion will cause grouped Objects and text to lose their Complex Effect behavior.


Sprite

A Sprite Object is a Simple Object that has its own Timeline and is a collection of Objects with Effects. A Sprite is equivalent in concept to a Movie Clip in Flash.

Sprites do not support all of the Movie Clip properties and methods. A list of supported items can be found in Movie Clip methods and properties.


Movie Clip

The Movie Clip in Flash is equivalent to the Sprite in SWiSHmax.

Sprites do not support all of the Movie Clip properties and methods. A list of supported items can be found in Movie Clip methods and properties.


SWiSHscript Specific

Some Scripting operators and functions are handled differently between Flash MX and SWiSHmax.

The main differences are explained in the following sections.


Sprites

SWiSHmax uses the term Sprite in place of the Flash Movie Clip.

Sprites do not support all of the Movie Clip properties and methods. A list of supported items can be found in Movie Clip methods and properties.


Shapes/ Objects

Flash MX scripting is associated with the base Movie and Movie Clips. Only the base Movie, Movie Clips and other supported Objects can have properties and Scripting applied.

SWiSH uses Sprites in place of Movie Clips, but also allows Scripting and Object properties to be associated with simple Shape and Text Objects. This is an extension to Flash MX.

For Shape and Text Objects to have Scripting and dynamic properties, the Object must have a name and the 'Target' checkbox found under the 'Shape' tab must be checked.

The 'Target' checkbox is not visible until a name has been entered. Once the 'Target' box has been checked, the Object becomes a Scripting Object.

settarget


Variables and String Conversion

Variables can be used to store numbers and strings.

The exact item stored by the variable is converted, as appropriate, depending on the context in which the variable is used.

The operators +, <, <=, ==, !=, => and > can take numbers, strings or variables as their arguments. In general, variables are assumed to be numeric and conversion is done as appropriate.

The + operator has String Constant Precedence.
The <, <=, ==, !=, => and > operators have Numeric Constant Precedence.

The operators add, lt, le, eq, ne, ge, gt assume that variables are strings and have String Constant Precedence.

Consider the following trace statements:

a = 11;
b = "22";
trace(a + "987"); // string parameter causes conversion of 11 to "11" result is 11987
trace(a ADD 987); // ADD operator converts both a and 987 to strings, result is 11987
trace(a + 987); // both parameters are numbers, result is 998
trace("987" + b); // both parameters are strings, result is 98722
trace(987 ADD b); // ADD operator converts 987 to string, result is 98722
trace(987 + b); // variable is assumed to be number. "22" converted to number, result is 1009
trace(a + b); // variables assumed to be numbers. "22" converted to 22, result is 33

During conversion from string to number, 0 is returned if the string does not represent a number.

onLoad () {
five = 5;
six = 06;
fivestr = "5";
sixstr = "06";
if ("5" < "6") {
trace("test1");
}
if ("5" < "06") {
trace("test2");
}
if (5 < 06) {
trace("test3");
}
if (5 lt 06) {
trace("test4");
}
if (fivestr < sixstr) {
trace("test5");
}
if (fivestr lt sixstr) {
trace("test6");
}
if (five < six) {
trace("test7");
}
if (five lt six) {
trace("test8");
}
}

returns
test1
test3
test4
test5
test7
test8


Conversion To Numeric

If the variable contains a string that can be interpreted as a numeric value, it is converted to that number:

e.g. "-2.2" is converted to -2.2.

If the string contains any other characters that indicate that it is not a number, it is converted to 0:

e.g. "-2.2a" is converted to 0.


Conversion To String

When a variable is converted to a string, the number is simply expressed as a string. However, leading 0s are stripped from the number when it is first assigned to a variable.

Note: Comparisons of numbers expressed as strings may yeild some results that are not obvious.
"5" lt "06" returns false as '0' is alphabetically before '5'
"-2" lt "0" returns true but
"-2" lt "-0" returns false

Example
a = 06; // a contains the number 6
When the variable a is converted to a string, it is interpreted as "6", not "06"


String Constant Precedence

If one of the expressions is a string constant, the other expression is converted to a string.


Numeric Constant Precedence

If one of the expressions is a numeric constant, the other expression is converted to a numeric value.


Arrays

See the Array (Object) section for a discussion of SWiSHscript-specific items.


Physics

To simplify gaming and other scripted movement, SWiSHscript supports additional properties that let you define the velocity, acceleration and friction of an Object or Sprite.

Some of the standard Sprite properties, have physics extensions.

To enable these properties you must turn on physics for the Movie and each individual Object that uses these properties. See Enable Movie Physics and Enable Object Physics for more information.

Example
The property _X has the SWiSHscript physics extensions _aX, _vX, _fX where:
· _aX represents the acceleration in pixels/second/second
· _vX represents the velocity in pixels/second
· _fX represents the movement friction percentage.

The table of properties with physics extensions and the properties representing those extensions is shown below:

Property | Acceleration Property | Friction Property | Velocity Property
_alpha | _aalpha (% / sec / sec) | _falpha (%) | _valpha (% / sec)
_rotation | _arotation (deg / sec / sec) | _frotation (%) | _vrotation (deg / sec)
_X | _aX (pixels / sec / sec) | _fX (%) | _vX (pixels / sec)
_xscale | _axscale (% / sec / sec) | _fxscale (%) | _vxscale (% / sec)
_Y | _aY (pixels / sec / sec) | _fY (%) | _vY (pixels / sec)
_yscale | _ayscale (% / sec / sec) | _fyscale (%) | _vyscale (% / sec)
The additional properties _age, _delta and _time are also provided to assist with age and movement calculations.


Acceleration

Acceleration is the rate at which the velocity changes.

An acceleration of 0 means that the Object travels at a constant velocity (i.e. the velocity does not change).

Example
If an object has an initial velocity of 10 pixels per second and accelerates at 1 pixel per second:

· after 1 second its velocity will be 11 pixels per second
· after 10 seconds it velocity will be 20 pixels per second.

The distance moved can be calculated from the formula D = v * t + a * t * t / 2;
where D is the distance moved, v is the initial velocity and t is the time in seconds.

In the above example, after 10 seconds the object would have moved 10 * 10 + 1 * 10 * 10 / 2 = 150 pixels.

Within SWiSHscript, the concept of acceleration is also applied to % values. In this case, the acceleration is the rate at which the % velocity changes per second.


Friction

The friction property acts to simulate 'real' friction by reducing the velocity by a specified % per second.

It can be used to simulate things rolling to a stop.

It is different to acceleration, as it works by modifying velocity by a percent instead of a fixed value.

Example
An object has _vX = 100, _fX = 10:

· after 1 second, _vX = 90 (100 - 10%)
· after 2 seconds, _vX = 81 (90 - 10%)
· after 3 seconds, _vX = 72.9 (81 - 10%).


Velocity

Velocity is the rate at which the Object moves.

Example
If an object has a velocity of 10 pixels per second:

· after 1 second it will have moved 10 pixels
· after 10 seconds it will have moved 100 pixels.

Within SWiSHscript, the concept of velocity is also applied to % values. In this case, the velocity is the rate at which the % changes per second.


Enable Movie Physics

To enable Movie physics, select the Export options for Script from the 'Export' tab.

The items below will appear.

Check the 'Support physics properties' checkbox.


Enable Object Physics

It is necessary to enable the properties for each Object/ Sprite that uses the physics properties.

From the 'Export' tab, select the Export options for Selected Object.

The items below will appear.

Check the 'Uses physics properties' checkbox.


Script Reference Dictionary

The Script Reference Dictionary details each of the supported script commands.

The following symbols are used in the contents heading to indicate special notes about the script.

Symbol | Meaning
+ | SWiSH-specific or special SWiSH-specific use
* | Depreciated (old style) function/ operator


- (minus)

Syntax
(Negation) - expression
(Subtraction) expression1 - expression2

Arguments
None.

Returns
Nothing.

Description
Operator (arithmetic); used for negating or subtracting.
Usage 1: When used for negating, it reverses the sign of the numerical expression.
Usage 2: When used for subtracting, it performs an arithmetic subtraction on two numerical expressions, subtracting expression2 from expression1. When both expressions are integers, the difference is an integer. When either or both expressions are floating-point numbers, the difference is a floating-point number.

Sample
Usage 1: The following statement reverses the sign of the expression 2 + 3.
-(2 + 3)
The result is -5.
Usage 2: The following statement subtracts the integer 2 from the integer 5.
5 - 2
The result is 3, which is an integer.
Usage 2: The following statement subtracts the floating-point number 1.5 from the floating-point number 3.25.
3.25 - 1.5
The result is 1.75, which is a floating-point number.


-- (decrement)

Syntax
--expression
expression--

Arguments
expression can be a variable, number, element in an array, or the property of an Object.

Returns
--expression returns expression - 1
expression-- returns expression

Description
Operator (arithmetic); a pre-decrement and post-decrement unary operator that subtracts 1 from the expression. The pre-decrement form of the operator (--expression) subtracts 1 from expression and returns the result. The post-decrement form of the operator (expression--) subtracts 1 from the expression and returns the initial value of expression (the value prior to the subtraction).

Sample
The pre-decrement form of the operator decrements x to 2 (x - 1 = 2), and returns the result as y:
x = 3;
y = --x;
//both y and x are equal to 2
The post-decrement form of the operator decrements x to 2 (x - 1 = 2), and returns the original value of x as the result y:
x = 3;
y = x--;
//y is equal to 3, x is equal to 2


! (logical NOT)

Syntax
!expression

Arguments
An expression that evaluates to a boolean value, usually a comparison expression, such as x < 5

Returns
Inverted boolean value of expression.

Description
Operator (logical); inverts the boolean value of a variable or expression. If expression is a variable with the absolute or converted value true, the value of !expression is false. If the expression x && y evaluates to false, the expression !(x && y) evaluates to true.
The following expressions illustrate the result of using the ! operator:
!true returns false
!false returns true.

Sample
In the following example, the variable happy is set to false. The if condition evaluates the condition !happy, and if the condition is true, the trace Action sends a string to the 'Output' window.
happy = false;
if (!happy) {
trace("don't worry, be happy");
}


!= (inequality)

Syntax
expression1 != expression2

Arguments
None.

Returns
false if (expression1 == expression2)

Description
Operator (inequality); tests for the exact opposite of the == operator. If expression1 is equal to expression2, the result is false. As with the == operator, the definition of equal depends on the data types being compared:
· Numbers, strings, and boolean values are compared by value
· Variables, Objects, arrays and functions are compared by reference.

Sample
The following example illustrates the result of the != operator:
5 != 8 returns true
5 != 5 returns false
This example illustrates the use of the != operator in an if statement:
a = "David";
b = "Fool" ;
if (a != b){
trace("David is not a fool");
}


% (mod)

Syntax
expression1 % expression2

Arguments
expression1, expression2 are floating-point or integer numbers. expression2 cannot be 0.

Returns
The integer remainder of expression1 / expression 2.

Description
x%y is emulated by the calculation x - (int(x/y) * y).

Sample
7 % 3 returns 1
2.4 % 1.1 returns 0.2


%= (mod assignment)

Syntax
expression1 %= expression2

Arguments
None.

Returns
None.

Description
Identical to expression1 = expression1 % expression2.

Sample
a = 7;
a %= 3;

// a now has the value of 1 (7%3)


&& (short-circuit AND)

Syntax
expression1 && expression2

Arguments
None.

Returns
Boolean result of expression1 AND expression2.

Description
Operator (logical); performs a boolean operation on the values of one or both of the expressions. Evaluates expression1 (the expression on the left side of the operator) and returns false if the expression evaluates to false. If expression1 evaluates to true, expression2 (the expression on the right side of the operator) is evaluated. If expression2 evaluates to true, the final result is true; otherwise, it is false.

Sample
This example uses the && operator to perform a test to determine if a player has won the game. The turns variable and the score variable are updated when a player takes a turn or scores points during the game. The following script displays "You Win the Game!" in the 'Output' window when the player's score reaches 75 or higher in 3 turns or less.
turns=2;
score=77;
winner = (turns <= 3) && (score >= 75);
if (winner) {
trace("You Win the Game!");
} else {
trace("Try Again!");
}


() (parentheses)

Syntax
(expression1, expression2)
and
function(argument1, ..., argumentN)

Arguments
None.

Returns
None.

Description
Forces a precedence of evaluation and groups arguments and expressions together.

Sample
(x + 3) * 5 // this changes standard precedence so that addition is done before multiplication.

call MyFunction(a,b,c) // groups arguments to be passed to the function MyFunction().


* (multiplication)

Syntax
expression1 * expression2

Arguments
None.

Returns
result of expression1 * expression2

Description
Operator (arithmetic); multiplies two numerical expressions. If both expressions are integers, the product is an integer. If either or both expressions are floating-point numbers, the product is a floating-point number.

Sample
The following statement multiplies the integers 4 and 3:
4 * 3
The result is 12, which is an integer.

Sample
This statement multiplies the floating-point numbers 2.0 and 3.1416.
2.0 * 3.1416
The result is 6.2832, which is a floating-point number.


*= (multiplication assignment)

Syntax
expression1 *= expression2

Arguments
None.

Returns
None.

Description
Identical to expression1 = expression1 * expression2.

Sample
a = 7;
a *= 3;

// a now has the value of 21 (7 * 3)


, (comma)

Syntax
expression1, expression2

Arguments
expression1, expression2 are any data (numbers, variables, strings, etc).

Returns
None.

Description
Tells the Flash Player to evaluate expression1 then expression2, etc.

Sample
call Myfunction(a+3, 4 * 2); // the values a+3 and 8 are passed to the function.


. (dot operator)

Syntax
object.property
object.method
object.childObject
instance.variable
instance.child.variable

Arguments
object: Any instance of an Object.
property: Any property associated with an Object.
method: Any method associated with the Object.
instance: Any Instance of a Movie Clip (Sprite).
child: Any Instance of a Movie Clip that is a part of another Movie Clip (Sprite).
variable: Any variable in a Movie Clip.

Returns
Value of property or result of method operation or reference to child Object.

Description
Used to denote the hierarchical relationship among Objects, variables, methods, etc.

Sample
_root.Rect._X
_root.MySprite.play()


/ (division)

Syntax
expression1 / expression2

Arguments
expression: A number or a variable that evaluates to a number.

Returns
Floating-point result of expression1 / expression2.

Description
Operator (arithmetic); divides expression1 by expression2. The result of the division operation is a double-precision floating-point number.

Sample
The following statement divides the floating-point number 22.0 by 7.0 and then displays the result in the 'Output' window.
trace(22.0 / 7.0);
The result is 3.1429, which is a floating-point number.


/* */ or // (comment delimiter)

Syntax
// comment

or

/* multi
line
comment */

Arguments
Comment.

Returns
Nothing.

Description
Allows addition of comments to code. Comments can be used to explain complex areas of code or unusual coding practices.

Use of comments is highly recomended and will simplify future maintenance of the script.

Sample
a += 3; // single line comment, add 3 to a

/* multi line
comment
this next section is complex...*/
a -=1;


/= (division assignment)

Syntax
expression1 /= expression2

Arguments
None.

Returns
None.

Description
Identical to expression1 = expression1 / expression2.

Sample
a = 8;
a /= 4;

// a now has the value of 2, (8/4)


?: (conditional)

Syntax
expression1 ? expression2 : expression3

Arguments
expression1: An expression that evaluates to a boolean value, usually a comparison expression, such as x < 5.
expression2, expression3: Values of any type.

Returns
expression2 if expression1 is true, expression3 if expression1 is false.

Description
Operator; instructs the Flash Player to evaluate expression1, and if the value of expression1 is true, it returns the value of expression2; otherwise it returns the value of expression3.

Sample
The following statement assigns the value of variable x to variable z because expression1 evaluates to true:
x = 5;
y = 10;
z = (x < 6) ? x: y; // z assigned the value of x as (x<6) is true.
trace (z);
// returns 5


[] (array access operator)

Syntax
myArray[n]

Arguments
Index of the array element to return.

Returns
Returns / allows access to the nth element of an array.

Description
Used to access the nth element of an array.
Note that all elements of the array should be initialised before access.

Sample
n = 1
myArray[0] = 1;
myArray[1] = 2;
myArray[2] = 3;

b = myArray[n]; // b now contains the value 2


|| (logical OR)

Syntax
expression1 || expression2

Arguments
expression1,expression2: A boolean value or an expression that converts to a Boolean value.

Returns
Logical result of expression1 OR expression2.

Description
Operator (logical); evaluates expression1 and expression2. The result is true if either or both expressions evaluate to true; the result is false only if both expressions evaluate to false. You can use the logical OR operator with any number of operands; if any operand evaluates to true, the result is true.

With non-boolean expressions, the logical OR operator causes the Flash Player to evaluate the expression on the left; if it can be converted to true, the result is true. Otherwise, it evaluates the expression on the right and the result is the value of that expression.

Sample
The following example uses the || operator in an if statement. The second expression evaluates to true, so the final result is true:
x = 10
y = 250
start = false
if(x > 25 || y > 200 || start){
trace('the logical OR test passed');
}

Sample
This example demonstrates how a non-boolean expression can produce an unexpected result. If the expression on the left converts to true, that result is returned without converting the expression on the right.
function fx1(){
trace ("fx1 called");
returns true;
}
function fx2(){
trace ("fx2 called");
return true;
}
if (fx1() || fx2()){
trace ("IF statement entered");
}
// The following is sent to the 'Output' window:
// fx1 called
// IF statement entered


+ (addition)

Syntax
expression1 + expression2

Arguments
expression1,expression2 numeric constants, string constants or variables.

Returns
Result of the sum of expression1 + expression2, if both expressions are numbers (variables are assumed to be numeric).
Result of expression1 add expression2, if either expression is a string constant (SWiSHscript extension).

Description
If both expressions are integers, the sum is an integer. If either or both expressions are floating-point numbers, the sum is a floating-point number. If either expression is a string constant, the result is expression1 add expression2.

Sample
This statement below adds the integers 2 and 3 and displays the resulting integer, 5, in the 'Output' window:
trace (2 + 3);

This statement below adds the floating-point numbers 2.5 and 3.25 and displays the result, 5.75, a floating-point number, in the 'Output' window:
trace (2.5 + 3.25);

This statement below writes the string "1122" to the 'Debug' window"
trace(11 + "22"); // converts both to string because of "22"

onLoad () {
a = "10";
b = "eats dog";
c = "cat ";
trace(1 + a);
trace(a + b);
trace("cat" + " eats dog");
trace(a add b);
trace(c add b);
}

Produces the output
11
10
cat eats dog
10eats dog
cat eats dog

See Also
Variables and String Conversion for more information about automatic type conversion of variables.


++ (increment)

Syntax
++expression
expression++

Arguments
expression can be a variable, number, element in an array, or the property of an Object.

Returns
++expression returns expression + 1.
expression++ returns expression.

Description
Operator (arithmetic); a pre-increment and post-increment unary operator that adds 1 to expression. The expression can be a variable, element in an array, or property of an Object. The pre-increment form of the operator (++expression) adds 1 to expression and returns the result. The post-increment form of the operator (expression++) adds 1 to expression and returns the initial value of expression (the value prior to the addition).
The pre-increment form of the operator increments x to 2 (x + 1 = 2), and returns the result as y:
x = 1;
y = ++x
//y is equal to 2, x is equal to 2
The post-increment form of the operator increments x to 2 (x + 1 = 2), and returns the original value of x as the result y:
x = 1;
y = x++;
//y is equal to 1, x is equal to 2

Sample
The following example uses ++ as a post-increment operator to make a while loop run five times.
i = 0;
while(i++ < 5){
trace("this is execution " + i);
}

This example uses ++ as a pre-increment operator.
var a = [];
var i = 0;
while (i < 10) {
a.push(++i);
}
trace(a.join());
This script displays the following result in the 'Output' window:
1,2,3,4,5,6,7,8,9,10

The following example uses ++ as a post-increment operator.
var a = [];
var i = 0;
while (i < 10) {
a.push(i++);
}
trace(a.join());
This script displays the following result in the 'Output' window:
0,1,2,3,4,5,6,7,8,9


+= (addition assignment)

Syntax
expression1 += expression2

Arguments
None.

Returns
None.

Description
Identical to expression1 = expression1 + expression2

Sample
a = 7;
a += 3;

// a now has the value of 10 (7 + 3)


< (less than)

Syntax
expression1 < expression2

Arguments
expression1,expression2 can be numbers, strings or variables.

Returns
None.

Description
Operator (comparison): compares two expressions and determines whether expression1 is less than expression2; if so, the operator returns true. If expression1 is greater than or equal to expression2, the operator returns false.

String constants are converted to numeric unless both expressions are string constants.
Variables are assumed to be numeric. Possibly undergoing a conversion.

Mixed numeric / string comparisons can give unusual results.
If string comparison is intended, use the lt operator.

Sample
The following examples illustrate true and false returns for both numeric and string comparisons.
3 < 10;
// true

10 < 3;
// false

"a" < "cat";
// true

a = "a";
b = "b";
b < a;
// true. Possibly not what is exptected but caused by conversion of strings to numeric 0. Use the lt operator instead.

See Also
lt


<= (less than or equal to)

Syntax
expression1 <= expression2

Arguments
expression1,expression2 can be numbers or strings.

Returns
Nothing.

Description
Operator (comparison): compares two expressions and determines whether expression1 is less than or equal to expression2; if so, the operator returns true. If expression1 is greater than expression2, the operator returns false.

String constants are converted to numeric unless both expressions are string constants.
Variables are assumed to be numeric. Possibly undergoing a conversion.

Mixed numeric / string comparisons can give unusual results.
If string comparison is intended, use the le operator.

Sample
The following examples illustrate true and false results for both numeric and string comparisons:
5 <= 10;
// true

2 <= 2;
// true

10 <= 3;
// false

"Allen" <= "Jack";
// true

a = "a";
b = "b";
b <= a;
// true. Possibly not what is exptected but caused by conversion of strings to numeric 0. Use the le operator instead.

See Also
le


<> (inequality *)

Syntax
a <> b

Description
This is old version of inequality syntax. Although recognized this should be replaced with != syntax.

See != for more information.


= (assignment)

Syntax
expression1 = expression2

Arguments
expression1: A variable, element of an array, or property of an Object.
expression2: A value of any type.

Returns
Nothing.

Description
Assigns the value of expression2 to the item defined in expression1.

Sample
x=10; // assigned the number 10 to the variable x
x="hello"; // assigns the string "hello" to the variable x


-= (negation assignment)

Syntax
expression1 -= expression2

Description
Identical to expression1 = expression1 - expression2.

Sample
a = 7;
a -= 3;

// a now has the value of 4 (7 - 3)


== (equality)

Syntax
expression1 == expression2

Arguments
expression1,expression2: A number, string, boolean value, variable or function.

Returns
Nothing.

Description
Operator (equality); tests two expressions for equality. The result is true if the expressions are equal.
The definition of equal depends on the data type of the parameter:
· Numbers and boolean values are compared by value and are considered equal if they have the same value
· String constants are converted to numeric unless both expressions are string constants
· Variables are assumed to be numeric. Possibly undergoing a conversion
· Two variables are equal if they have the same numeric value.

Sample
x = 5;
y = 6;

trace(x == y); // returns (0), false

These examples show the results of operations that compare mixed types.
x = "5"; y = "5";
trace(x == y); // this works as variables are converted to numbers.
// true
// this works as variables are converted to numbers.

x = "5"; y = "66";
trace(x ==y);
// false
// this works as variables are converted to numbers.

x = "chris"; y = "steve";
trace (x == y);
// true
// unexpected result caused by conversion of both strings constants to numeric (value = 0).
// use 'eq' operator instead.

See Also
eq


> (greater than)

Syntax
expression1 > expression2

Arguments
expression1,expression2 can be numbers, strings or variables.

Returns
Nothing.

Description
Operator (comparison): compares two expressions and determines whether expression1 is greater than expression2; if so, the operator returns true. If expression1 is less than or equal to expression2, the operator returns false.

String constants are converted to numeric unless both expressions are string constants.
Variables are assumed to be numeric. Possibly undergoing a conversion.

Mixed numeric / string comparisons can give unusual results.
If string comparison is intended, use the gt operator.

Sample
The following examples illustrate true and false returns for both numeric and string comparisons.
31 > 10;
// true

10 > 31;
// false

"dog" > "cat";
// true, both string constants so comparison based on string comparison.

c = "cat";
d = "dog";
d > c;
// false. Probably not what was intended as both variables are converted to numeric 0. Use the gt operator.

See Also
gt


>= (greater than or equal to)

Syntax
expression1 >= expression2

Arguments
expression1, expression2 can be numbers, or strings.

Returns
Nothing.

Description
Operator (comparison): compares two expressions and determines whether expression1 is greater than or equal to expression2; if so, the operator returns true. If expression1 is less than expression2, the operator returns false.

String constants are converted to numeric unless both expressions are string constants.
Variables are assumed to be numeric. Possibly undergoing a conversion.

If string comparison is intended, use the ge operator.

Sample
The following examples illustrate true and false returns for both numeric and string comparisons.
31 >= 31;
// true

10 >= 31;
// false

"dog" >= "cat";
// true

d = "dog";
c = "cat";

c >= d;
// true, possibly not what is intended as both variables are converted to numeric (0). Use ge instead.

See Also
ge


and (logical AND *)

Syntax
a and b

Description
This is old version of logical AND syntax. Although recognized this should be replaced with && syntax.


eq (string ==)

Syntax
a eq b

Description
Similar to ==, however it assumes that variables are strings and has String Constant Precedence. This should be used when comparing two strings.

Sample
a = "hi";
b = "there";
trace(a == b); // returns 1 (true) as both a and b are converted to numeric.
trace(a eq b); // returns 0 (false) as strings are different, which is the expected result.

See Also
==


ge (string >=)

Syntax
a ge b

Description
Similar to >=, however it assumes that variables are strings and has String Constant Precedence. This should be used when comparing two strings.

Sample
a = "hi";
b = "there";
trace(a >= b); // returns 1 (true) as both a and b are converted to numeric and equate to equal (both 0).
trace(a ge b); // returns 0 (false) as "hi" is before "there", which is the expected result.

See Also
>=


gt (string >)

Syntax
a gt b

Description
This is old version of greater than syntax. Although recognized this should be replaced with > syntax.

Similar to >, however it assumes that variables are strings and has String Constant Precedence. This should be used when comparing two strings.

Sample
a = "hi";
b = "there";
trace(a > b); // returns 0 (false) as both a and b are converted to numeric and equate to equal (both 0).
trace(a ge b); // returns 0 (false) as "hi" is before "there", which is the expected result.

See Also
>


le (string <=)

Syntax
a le b

Description
Similar to <=, however it assumes that variables are strings and has String Constant Precedence. This should be used when comparing two strings.

Sample
a = "zhi";
b = "there";
trace(a <= b); // returns 1 (true) as both a and b are converted to numeric and equate to equal (both 0).
trace(a le b); // returns 0 (false) as "zhi" is after "there", which is the expected result.

See Also
<=


lt (string <)

Syntax
a lt b

Description
This is old version of less than syntax. Although recognized this should be replaced with < syntax.

Similar to <, however it assumes that variables are strings and has String Constant Precedence. This should be used when comparing two strings.

Sample
a = "hi";
b = "there";
trace(a < b); // returns 0 (false) as both a and b are converted to numeric and equate to equal (both 0).
trace(a le b); // returns 1 (true) as "hi" is before "there", which is the expected result.

See Also
<


ne (string !=)

Syntax
a ne b

Description
Similar to !=, however it assumes that variables are strings and has String Constant Precedence. This should be used when comparing two strings.

Sample
a = "hi";
b = "there";
trace(a != b); // returns 0 (false) as both a and b are converted to numeric and equate to 0
trace(a ne b); // returns 1 (true) as strings are different, which is the expected result.

See Also
!=


not (logical NOT *)

Syntax
not a

Description
This is old version of logical NOT syntax. Although recognized this should be replaced with ! syntax.


or (logical OR *)

Syntax
a or b

Description
This is old version of logical OR syntax. Although recognized this should be replaced with || syntax.


_aalpha +

See Physics Properties.


_age +

Syntax
instanceName._age

Arguments
None.

Returns
Age of Object since placed (in seconds).

Description
Read-only property. Returns the age of the Object in seconds.

This is a SWiSH-specific Physics Property.


_alpha

Syntax
instanceName._alpha
instanceName._alpha = value

Arguments
Can be set to a number between 0 and 100.

Returns
Current setting.

Description
The property both reads and sets a Sprite's or Object's alpha transparency.
A value of 0 is transparent.
A value of 100 is opaque.

Elements with an alpha of 0 (i.e. invisible) can still detect Events.

Sample
onLoad()
{
_root.rectangle._alpha = 40; // make rectangle partly transparent
}

Physics Properties are also supported for this property.


_arotation +

See Physics Properties.


_aX +

See Physics Properties.


_axscale +

See Physics Properties.


_aY +

See Physics Properties.


_ayscale +

See Physics Properties.


_currentframe

Syntax
instanceName._currentframe

Arguments
None.

Returns
The current Frame number of the named Instance / Sprite.

Description
Read-only property returns the current Frame number of the named Instance / Sprite.

Sample
if (_root._currentframe > 10) {
trace("passed frame 10");
}


_delta +

Syntax
instanceName._delta

Arguments
None.

Returns
Time elapsed since last Frame displayed (in seconds).

Description
Read-only property. Returns the time since the last Frame was displayed in seconds.

This is a SWiSH-specific Physics Property.


_droptarget

Syntax
draggableInstance._droptarget

Arguments
draggableInstance is the name of the draggable Instance Movie Clip / Sprite or Object.

Returns
Name of the Movie Clip / Sprite that draggableInstance has been dragged over.
The return value is in "slash" notation.

Note: The property will only change in the Object that is being dragged

Description
This is a read-only property.

Sample
Assume a Movie contains two Sprites, s1 and s2.
code below is for Sprite s1...
no script is required for s2.
"zap" is displayed in the 'Debug' Panel if s1 is dragged over s2.

Note:
· If s2 was dragged over s1, s1._droptarget (this._droptarget) would not change, but s2._droptarget would show "/s1"
· To enter the if statement, use the if (_droptarget) option

onEnterFrame() {
if (this._droptarget ==_parent.s2._target) {
trace("zap");
}
}

onSelfEvent (release) {
stopDrag();
}

onSelfEvent (press) {
this.startDrag(true);
}

See Also
_target


_falpha +

See Physics Properties.


_focusrect

Syntax
_focusrect = Boolean;

Arguments
None.

Returns
None.

Description
Global property that defines whether a yellow rectangle appears around the button that has keyboard focus.
Default value is true.

Sample
onLoad() {
_focusrect = false; // turn off yellow rectangle around selected button.
}


_framesloaded

Syntax
a = spritename._framesloaded

Arguments
spritename is the name of a Sprite or Movie Clip.

Returns
The number of Frames that have currently been loaded.

Description
Property (read-only); the number of Frames currently loaded from a streaming Movie.

This can be used to check if the contents of a specific Frame has been loaded or for checking the download progress of large Movies.

This property could be used to create a temperature bar that shows the % complete of download.

The following example uses the _totalframes property to calculate the % loaded

Sample
a = _framesloaded / _totalframes * 100; // a contains % complete of download.

See Also
_totalframes


_frotation +

See Physics Properties.


_fX +

See Physics Properties.


_fxscale +

See Physics Properties.


_fY +

See Physics Properties.


_fyscale +

See Physics Properties.


_height

Syntax
spritename._height

Arguments
spritename is the name of a Sprite / Movie Clip or Object.

Returns
This read-only property returns the current height of the Sprite or Object.

Description
This can be used to determine the current height of the referenced Object.
If scaling is applied (_yscale), this property is modified to show the revised size.

Sample
h = rect._height; // h contains the current height of the Object rect.


_highquality

Syntax
_highquality
_highquality = value

Arguments
value: Numeric, new value of global quality setting.

Returns
Current quality setting.

Description
Property (global); specifies the level of anti-aliasing applied to the current Movie. Specify 2 (BEST) to apply high quality with bitmap smoothing always on. Specify 1 (high quality) to apply anti-aliasing; this will smooth bitmaps if the Movie does not contain animation. Specify 0 (low quality) to prevent anti-aliasing.

Sample
_highquality = 1; // apply anti-aliasing

See also
toggleHighQuality


_level

Syntax
_levelN

Arguments
N is any non-negative integer.

Returns
None.

Description
Synonym for the Movie loaded into level N.
The root Movie is loaded onto level 0.

Sample
_level2.stop() will stop the Movie playing on level 2.
_level0 can be used in place of _root (for clarity, this is not recommended).


_name

Syntax
sprite._name
sprite._name = value

Arguments
sprite: The name of the Sprite / Movie Clip, Instance or Object.
value: A string containing the new name of the Sprite / Movie Clip or Object.

Returns
Current name of the Sprite / Movie Clip or Object.

Description
This property allows the Sprite / Movie Clip, Instance or Object to be read and modified.

Sample
onLoad() {
trace(this._name); // show name of this Object / Sprite
}

See Also
_target


_parent

Syntax
_parent.property
_parent.property = value

_parent._parent.property is also valid.

Arguments
property: Any property of the parent Object.
value: New value of the property.

Description
Synonym for the Sprite / Movie Clip / Object that contains this Object, i.e. the parent.

Sample
_parent.play(); // restart parent Movie Clip

See Also
_root, this


_root

Syntax
_root.property
_root.property = value

Arguments
property: Any property of the root (top level) Object.
value: New value of the property.

Description
Synonym for the Sprite / Movie Clip / Object that contains all other objects. i.e. the root.
Note that the root has no parent Object.

Sample
_root.play(); // restart root Movie Clip

See Also
_parent, this


_rotation

Syntax
spritename._rotation
spritename._rotation = value;

Arguments
spritename is the name of Sprite / Movie Clip or Object.
value is the new rotation angle in degrees. Positive angle indicates clockwise rotation.

Returns
Rotation angle in degrees. Positive angle indicates clockwise rotation.

Description
Sets / Returns the current rotation angle of the Sprite or Object. This angle is specified in degrees.

Sample
_root.rect._rotation += 10; // rotate rect Object 10 degrees clockwise.

Physics Properties are also supported for this property.


_soundbuftime

Syntax
_soundbuftime
_soundbuftime = value

Arguments
value: Integer, specifying the number of seconds before the Movie starts to stream.

Returns
Current buffer setting.

Description
Property (global): Specifies the number of seconds of streaming sound to prebuffer. Default is 5.

Sample
_soundbuftime = 10; // buffer 10 seconds of audio.


_target

Syntax
sprite._target

Arguments
sprite is the name of the Sprite / Movie Clip or Object.

Returns
Target path of the Sprite / Movie Clip or Object.

Description
This is a read-only property that returns the path name of the the Sprite / Movie Clip or Object. The returned name is in 'slash' notation.
This is used in a comparison statement with the _droptarget property of another Sprite / Movie Clip or Object.
Unlike _name this returns the full path using slash notation.

Sample
Assume a Movie contains two Sprites, s1 and s2 (s2 is smaller than s1 so it can be completely covered).
The code below is for Sprite s1, no script is required for s2:

onEnterFrame() {
if (this._droptarget ==_parent.s2._target) {
trace("zap");
}
}

onSelfEvent (release) {
stopDrag();
}

onSelfEvent (press) {
this.startDrag(true);
}

if s2 is a Sprite owned by the main Movie Clip then its _target name is "/s2".

See Also
_droptarget


_time +

Syntax
instanceName._time

Arguments
None.

Returns
Time since the start of the whole Movie (in seconds).

Description
Read-only property. Returns the age of the Movie in seconds.

This is a SWiSH-specific Physics Property.


_totalframes

Syntax
a = spritename._totalframes

Arguments
spritename is the name of the Sprite or Movie Clip.

Returns
The number of Frames contained within the Sprite / Movie Clip.

Description
Property (read-only): the number of Frames contained within the Sprite / Movie Clip.

This property could be used to create a temperature bar that shows the % complete of download.

The following example uses the _framesloaded property to calculate the % loaded

Sample
a = _framesloaded / _totalframes * 100; // a contains % complete of download.

See Also
_framesloaded


_url

Syntax
a = spritename._url

Arguments
spritename is the name of the Sprite or Movie Clip.

Returns
The URL of the .swf file that the Movie Clip was downloaded from.

Description
Property (read-only): returns the URL of the .swf file that the Movie Clip was downloaded from.

Sample
a = _root._url

Note: This will return "pipe", if download is internal


_width

Syntax
spritename._width

Arguments
spritename is the name of the Sprite / Movie Clip or Object.

Returns
This read-only property returns the current width of the Sprite or Object.

Description
This can be used to determine the current width of the referenced Object.
If scaling is applied (_xscale), this property is modified to show the revised size.

Sample
w = rect._width; // w contains the current width of the Object rect.


_valpha +

See Physics Properties.


_visible

Syntax
_spritename._visible
_spritename._visible = value

Arguments
spritename: Name of the Sprite / Movie Clip or Object.
value: Boolean value. True indicates visible.

Returns
Current visible status.

Description
Sets / Returns the current visibility status of the Sprite / Movie Clip or Object.
A button that is not visible cannot be clicked.

Sample
_rect._visible = false; // hide rectangle.


_vX +

See Physics Properties.


_vxscale +

See Physics Properties.


_vY +

See Physics Properties.


_vyscale +

See Physics Properties.


_X

Syntax
spritename._X
spritename._X = value;

Arguments
spritename is the name of the Sprite / Movie Clip or Object.
value is the new value of the distance from the left edge of the stage in pixels.

Returns
X co-ordinate in pixels.

Description
Sets / Returns the current X co-ordinate of the Sprite or Object. This is the distance from the left edge of the stage in pixels to the specified anchor point of the Object / Sprite.

Sample
_root.rect._X += 10; // moves the Object rect 10 pixels to the right.

Physics Properties are also supported for this property.


_xscale

Syntax
spritename._xscale
spritename._xscale = percentage;

Arguments
spritename is the name of the Sprite / Movie Clip or Object.
percentage is the new width of the Sprite / Object with respect to the original size as a percentage.
Negative percentage values can be used to horizontally flip the Sprite / Object.

Returns
Current scale. 100 represents the original size.

Description
This property returns or sets the horizontal scale of the indicated Sprite / Object.

Sample
_root.rect._xscale = 200; // double the width of the Sprite / Object.

Physics Properties are also supported for this property.


_Y

Syntax
spritename._Y
spritename._Y = value;

Arguments
spritename is the name of the Sprite / Movie Clip or Object.
value is the new value of the distance from the top edge of the stage in pixels.

Returns
Y co-ordinate in pixels.

Description
Sets / Returns the current Y co-ordinate of the Sprite or Object. This is the distance from the top edge of the stage in pixels to the specified anchor point of the Object / Sprite.

Sample
_root.rect._Y += 10; // moves the Object rect 10 pixels down.

Physics Properties are also supported for this property.


_yscale

Syntax
spritename._yscale
spritename._yscale = percentage;

Arguments
spritename is the name of the Sprite / Movie Clip or Object.
percentage is the new height of the Sprite / Object with respect to the original size as a percentage.
Negative percentage values can be used to vertically flip the Sprite / Object.

Returns
Current scale. 100 represents the original size.

Description
This property returns or sets the vertical scale of the indicated Sprite / Object.

Eyample
_root.rect._yscale = 200; // double the height of the Sprite / Object.

Physics Properties are also supported for this property.


add (concat strings)

Syntax
expression1 add expression2

Arguments
None.

Returns
Combined string containing both strings.

Description
The string expression2 is concatonated to the string in expression1. This operator converts expressions to strings before concatonation.

Sample
a = "cat ";
b = "eats dog";
c = a add b;

// c now contains "cat eats dog"

trace(5 add 10); // displays "510".

See Also
+ operator


Array (Object)

An array is an Object that is composed of a number of items. Each item is contained an element, which is indexed by means of a subscript. The subscript is enclosed within [] and can be a numeric or string constant or a variable.

Sample
dayArray = new Array;
dayArray[0] = "Monday";
dayArray[1] = "Tuesday";
dayArray[2] = "Wednesday";
dayArray[3] = "Thursday";

Arrays are a convenient way of handling tables of data. Access to the specific element is via an integer, which could be another variable. This property makes an array an extremely powerful tool, especially when used with looping constructs such as while, do while etc.

The first 3 days of the week could be conveniently traced with the following code:

while (i < 3) {
trace(dayArray[i++]);
}

Subscripts can also be strings.
dayArray = new Array;
dayArray["M"] = "Monday";
dayArray["Tu"] = "Tuesday";
dayArray["W"] = "Wednesday";
dayArray["Th"] = "Thursday";

abbrev = "Tu";

dayArray[abbrev] contains "Tuesday"

Creating Arrays
Arrays can be created in any of the following ways:

name = new Array;
name[index] = "value";
name = new Array(length); (Note: won't work with SWF4 Movies)
name = new Array(value1, value2...); (Note: won't work with SWF4 Movies)
name = new Array(name1:value1, name2:value2...); (Note: won't work with SWF4 Movies)

For SWF5+ you need to create an array Object and assign it to a variable BEFORE you can start accessing or setting the variable as an array. Therefore simply going name[index] = "value"; won't work. For this reasons the RECOMMENDED WAY to do arrays that are compatible for both SWF4 and SWF5+ is:

name = new Array;

Flash MX Differences
The Flash MX array Object contains a number of methods that can be applied to it, such as concat, join, etc. The SWiSHscript array Object does not support any Flash MX array Object methods.

This SWiSHscript array Object can be indexed via strings and string constants. Flash MX does not support this feature.


Boolean (Object)

A boolean Object is used to store a boolean (true / false) value.
The constants true and false are provided to allow assignment of those values.

Sample
myBool = true;
myBool = false;
myBool = (a < 5); // true if a was previously assigned a value < 5

Flash MX Differences
The Flash MX boolean Object contains a number of methods that can be applied to it such as toString(), valueOf(), etc. The SWiSHscript boolean Object does not support any Flash MX boolean Object methods.


Button (Object)

A Button Object is a Scripting Object that supports the additional Event Handling function on().


call *

Syntax
call(frame);

Arguments
frame: The name or number of a Frame in the current Timeline.

Returns
Nothing.

Description
Action: executes the script in the called Frame without moving the playhead to that Frame. Local variables will not exist once the script is finished executing.

Depreciated
For script readability reasons, it is recommended that you use the function Action instead.


call function

Syntax
object.function([parameter1, [parameter2, [parameter3, [parameter4]]]])

Arguments
object: Name of the Object / Sprite containing the function.
function: Name of the function being called.
parameter1: Optional input parameter.
parameter2: Optional input parameter.
parameter3: Optional input parameter.
parameter4: Optional input parameter.

Returns
Value defined by return Action.

Description
Allows you to call a user-defined function. Functions are useful when the same processing needs to be applied to different variables or Objects.

Sample
onLoad () {
a = 0;
r = 3;
a = _root.area(r);
trace(a);
}

function area(p) {
return Math.PI * p * p;
}

// On completion, a contains the area for a radius of 3 (pi * r^2), 28.2743346691132

See Also
function


chr

Syntax
chr(number)

Arguments
number: Integer representing an ASCII code number.

Returns
The character corresponding to the code number.

Description
String function. Converts ASCII code numbers to characters.

Sample
myVar = chr(65); // myVar now contains the character "A"

See Also
ord


do...while

Syntax
do {
statements;
} while (condition);

Arguments
statements: The statements that are to be executed while the condition is true.
condition: An expression that evaluates to a boolean value.

Returns
Nothing.

Description
This Action executes at least once and repeats while the condition remains true.

Sample
onLoad () {
a = 1;
do {
trace(a);
} while (a++ < 5);
}

The above example writes the numbers 1 2 3 4 5 to the 'Debug' window.

See Also
while and for.


duplicateMovieClip

This function is Flash-MX-specific. Use duplicateSprite instead.


duplicateSprite

Syntax
spritename.duplicateSprite(newname, depth)

Arguments
spritename: The target path of the Sprite / Movie Clip to duplicate.

newname: A unique identifier for the duplicated Sprite / Movie Clip.

depth: A unique depth level for the duplicated Sprite / Movie Clip. The depth level is a stacking order for duplicated sprites. This stacking order is much like the stacking order of layers in the Timeline; Sprites with a lower depth level are hidden under clips with a higher stacking order. You must assign each duplicated Sprite a unique depth level to prevent it from replacing Sprites of the same name on occupied depths.

Returns
Nothing.

Description
Method: Creates an Instance of a Sprite / Movie Clip while the Movie is playing. The playhead in duplicate Movie Clips always starts at Frame 1, regardless of where the playhead is in the original (or "parent") Movie Clip. Variables in the parent Movie Clip are not copied into the duplicate Movie Clip. If the parent Movie Clip is deleted, the duplicate Movie Clip is also deleted. Use the removeSprite() method to delete a Movie Clip Instance created with duplicateSprite() method.

Sample
This example duplicates the existing Sprite, s1, and creates a new Sprite s2 on the same level. The position of both Sprites is adjusted so that they can be seen. To remove the duplicated Sprite, use s2.removeSprite().

onLoad () {

s1.duplicateSprite("s2",1);
s1._X += 50;
s1._Y += 50;
s2._X += 150;
s2._Y += 50;
}

See also
removeSprite and Sprite Methods .


else

Syntax
else {...statement(s)...}

Arguments
condition: A boolean expression that evaluates to true or false.
statement(s): An alternative series of statements to run if the condition specified in the if statement is false.

Returns
Nothing.

Description
Action: Specifies the statements to run if the condition in the if statement returns false.

See also
if


else if

Syntax
if (condition){
statement(s);
} else if (condition){
statement(s);
}

Arguments
condition: An expression that evaluates to true or false.
statement(s): An alternative series of statements to run if the condition specified in the if statement is false.

Returns
Nothing.

Description
Action: Used to introduce second (or more) conditional test(s) if initial condition equates to false. Once a condition evaluates to true, after the associated statemetns have been executed, control passes to the end of the if / else if / else if sequence. This can be used to prevent too many nested levels if standard else construct is used.

Sample
if (this._X > maxX) {
this._X = maxX;
dx = -dx; // bounce of right wall
} else if (this._X < minX) {
this._X = minX;
dx = -dx;
}

The above example is easier to read than the following (equivalent code)

if (this._X > maxX) {
this._X = maxX;
dx = -dx; // bounce of right wall
} else {
if (this._X < minX) {
this._X = minX;
dx = -dx;
}
}

See also
if


eval(string)

Syntax
eval(expression);

Arguments
expression: A string containing the name of a variable.

Returns
Nothing.

Description
Function: Accesses variables, properties, Objects or Movie Clips by name. If the expression is a variable or a property, the value of the variable or property is returned. If the expression is an Object or Sprite, a reference to the Object or Sprite is returned.

If the element named in the expression cannot be found, undefined is returned.

You can also use the eval function to dynamically set and retrieve the value of a variable or Instance name.

Note: The ActionScript eval Action is not the same as the JavaScript eval function, and cannot be used to evaluate statements.

Sample
The following example uses the eval function to determine the value of the expression "piece" + x. Because the result is a variable name, piece3, the eval function returns the value of the variable and assigns it to y:
Item5 = "test";
x = 5;

y = eval("Item" add x);
trace(y);

// Output: test

Flash MX Differences
Flash MX can use eval to return references to Objects, properties and Movie Clips as well. SWiSHscript eval() can only return references to variables.


false

Syntax
false

Description
A unique boolean value that represents the opposite of true.


for

Syntax
for (initial ; condition ; end of loop) {
statements;
}

Arguments
statements: The statements that are to be executed while the condition is true.

initial: This clause can be used to set up initial conditions and Arguments. Multiple statements can be entered if each statement is separated by a comma.

condition: An expression that evaluates to a boolean value. The loop continues while this is true.
end of loop: A statement that is executed at the end of the loop. This is normally used to increment a loop counter. Multiple statements can be entered if each statement is separated by a comma.

Returns
Nothing.

Description
This Action executes and repeats while the condition remains true. If the condition is initially false, no statements are executed.
This is a more useful statement than while or do while if a loop is to be executed a defined number of times. It is ideal for initializing arrays.

Sample
for (i = 0; i <= 5 ; i++) {
trace(i);
}

The above example writes the numbers 0 1 2 3 4 5 to the 'Debug' window.

See Also
while, do...while and for.


fscommand

Syntax
fscommand("command", "Arguments")

Arguments
command: A string passed to the host application for any use or a command passed to the stand-alone Flash Player.
Arguments: A string passed to the host application for any use or a value passed to the Flash Player.

Returns
Nothing.

Description
Action: Allows the Flash Movie to communicate with:
· The .exe Flash Player.
· The program hosting the Flash Player, such as a Web browser.
· Other programs that can host ActiveX controls such as Visual Basic or Visual C++.

Usage 1: To send a message to the Flash Player, you must use predefined commands and Arguments. The following table shows the values you can specify for the command and Arguments Arguments of the fscommand Action to control a Movie playing in the stand-alone Flash Player (including projectors):

Command Arguments Purpose
quit None Closes the projector
fullscreen true or false Specifying true sets the Flash Player to full-screen mode. Specifying false returns the player to normal Menu view
allowscale true or false Specifying false sets the player so that the Movie is always drawn at its original size and never scaled. Specifying true forces the Movie to scale to 100% of the player
showmenu true or false Specifying true enables the full set of context Menu items. Specifying false dims all the context Menu items except About Flash Player
exec Path to app. Executes an application from within the projector
trapallkeys true or false Specifying true sends all key events, including accelerator keys, to the onClipEvent(keyDown/keyUp) handler in the Flash Player

Usage 2: To use the fscommand Action to send a message to a scripting language such as JavaScript in a Web browser, you can pass any two Arguments in the command and Arguments Arguments. These Arguments can be strings or expressions and are used in a JavaScript function that 'catches', or handles, the fscommand Action.

In a Web browser, the fscommand Action calls the JavaScript function moviename_DoFScommand in the HTML page containing the Flash Movie. The moviename is the name of the Flash Player as assigned by the NAME attribute of the EMBED tag or the ID property of the OBJECT tag. If you assign the Flash Player the name myMovie, the JavaScript function called is myMovie_DoFScommand.

Usage 3: In Visual Basic, Visual C++ and other programs that can host ActiveX controls, fscommand sends a VB event with two strings that can be handled in the environment's programming language.

Samples
In the following example, the fscommand Action sets the Flash Player to scale the Movie to the full monitor screen size when the button is released.

on(release){
fscommand("fullscreen", true);
}


function

Syntax
object.function([parameter1, [parameter2, [parameter3, [parameter4]]]])

Arguments
object: Name of the Object / Sprite containing the function.
function: Name of the function being called.
parameter1: Optional input parameter.
parameter2: Optional input parameter.
parameter3: Optional input parameter.
parameter4: Optional input parameter.

Returns
Value defined by return Action.

Description
Allows you to call and define a user-defined function. Functions are useful when the same processing needs to be applied to different variables or Objects.

Sample
onLoad () {
a = 0;
r = 3;
a = _root.area(r);
trace(a);
}

function area(p) {
return Math.PI * p * p;
}

// On completion, a contains the area for a radius of 3 (pi * r^2), 28.2743346691132

See Also
call function


getProperty(property)

Syntax
[instance.]getProperty([instancename ,] property)

Arguments
instancename: The instance name of a Movie Clip for which the property is being retrieved. This can either be the Instance name (using slash notation) or the _target property. If omitted, the Instance is specified by instance. if instance is omitted, defaults to 'this'.

property: A property of a Sprite / Movie Clip.

Returns
The specified property value.

Description
Function: Returns the value of the specified property for the Movie Clip instancename.

Sample
The following example retrieves the horizontal axis co-ordinate (_x) for the Movie Clip myMovie and assigns it to the variable myMovieX:

myMovieX = getProperty(_root.myMovie._target, _x);
myMovieX = getProperty("/myMovie", _x);
myMovieX = _root.myMovie.getProperty(_x);

See Also
getProperty() and setProperty().


getTimer()

Syntax
getTimer()

Arguments
None.

Returns
Number of milliseconds since Movie started.

Description
Function: returns the number of milliseconds that have elapsed since the Movie started playing.

Does not seem to be implemented.


getURL(url [, window ])

Syntax
getURL(url [,window])

Arguments
url: Name of the URL to load (text / string).
window: Optional parameter defining which Frame to load URL into. One of "_self", "_parent", "_top" or "_blank".

Returns
Nothing.

Description
Function: Loads the specified URL into the specified Frame. Note that Frame is an HTML Frame, not a Movie Frame in this situation.

If the URL specified is not an absolute reference, the Flash Player will assume a file relative to the currently playing .swf file.

See Also
getURL(), getURLGet() and getURLPost().


getURLGet(url [, window])

Syntax
getURLGet(url [,window])

Arguments
url: Name of the URL to load (text / string).
window: Optional parameter defining which Frame to load URL into. One of "_self", "_parent", "_top" or "_blank".

Returns
Nothing.

Description
Function: Loads the specified URL into the specified Frame. Note that Frame is an HTML Frame, not a Movie Frame in this situation.
Gets variables via the Get method.

If the URL specified is not an absolute reference, the Flash Player will assume a file relative to the currently playing .swf file.

See Also
getURL(), getURLGet() and getURLPost().


getURLPost(url [, window])

Syntax
getURLGet(url [,window])

Arguments
url: Name of the URL to load (text / string).
window: Optional parameter defining which Frame to load URL into. One of "_self", "_parent", "_top" or "_blank".

Returns
Nothing.

Description
Function: Loads the specified URL into the specified Frame. Note that Frame is an HTML Frame, not a Movie Frame in this situation.
Gets variables via the Post method.

If the URL specified is not an absolute reference, the Flash Player will assume a file relative to the currently playing .swf file.

See Also
getURL(), getURLGet() and getURLPost().


getVersion()

Identical to $version and can be used in place of $version.


gotoAndPlay

Syntax
spritename.gotoAndPlay(frame / label)

Arguments
spritename: The name of the Sprite / Movie Clip to be played.
frame: The Frame number or label to which the playhead is sent.

Returns
Nothing.

Description
Action and Sprite Method: Sends the playhead to the specified Frame in a Scene and plays from that Frame.

Sample
onLoad() {
this.gotoAndPlay(16); // Sprite starts at Frame 16 when loaded.
}

See Also
play(), stop(), gotoAndPlay(), gotoAndStop(), gotoSceneAndPlay(), gotoSceneAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndPlay(), prevFrameAndStop(), skipFrameAndPlay() and skipFrameAndStop().


gotoAndStop

Syntax
spritename.gotoAndStop(frame / label)

Arguments
spritename: The name of the Sprite / Movie Clip to be played.
frame: The Frame number or label to which the playhead is sent.

Returns
Nothing.

Description
Action and Sprite Method: Sends the playhead to the specified Frame in a Scene and stops at that Frame.

Sample
onLoad() {
this.gotoAndStop(16); // Sprite goes to Frame 16 and stops.
}

See Also
play(), stop(), gotoAndPlay(), gotoAndStop(), gotoSceneAndPlay(), gotoSceneAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndPlay(), prevFrameAndStop(), skipFrameAndPlay() and skipFrameAndStop().


gotoSceneAndPlay(scene, frame)

Syntax
gotoSceneAndPlay(scene, frame)

Arguments
scene: The Scene name to which the playhead is sent. This can also be a Scene name synonym.
frame: The Frame number or label to which the playhead is sent.

Returns
Nothing.

Description
Action: Sends the playhead to the specified Frame in a Scene and plays from that Frame. If no Scene is specified, the playhead goes to the specified Frame in the current Scene.

Sample
onLoad() {
gotoSceneAndPlay("Scene_2", 16);
}

See Also
Scene-based Movie Control
gotoSceneAndPlay(), gotoSceneAndStop(), nextSceneAndPlay(), nextSceneAndStop(), prevSceneAndPlay() and prevSceneAndStop() .

Frame-based Movie Control
play(), stop(), gotoAndPlay(), gotoAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndPlay(), prevFrameAndStop(), skipFrameAndPlay() and skipFrameAndStop().


gotoSceneAndStop(scene, frame)

Syntax
gotoSceneAndStop(scene, frame)

Arguments
scene: The Scene name to which the playhead is sent. This can also be a Scene name synonym.
frame: The Frame number or label to which the playhead is sent.

Returns
Nothing.

Description
Action: Sends the playhead to the specified Frame in a Scene and stops at that Frame. If no Scene is specified, the playhead goes to the specified Frame in the current Scene.

Sample
onLoad() {
gotoSceneAndStop("Scene_2", 16);
}

See Also
play(), stop(), gotoAndPlay(), gotoAndStop(), gotoSceneAndPlay(), gotoSceneAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndPlay(), prevFrameAndStop(), skipFrameAndPlay() and skipFrameAndStop().


if

Syntax
if(condition) {
statement(s);
}

Arguments
condition: An expression that evaluates to true or false.
statement(s): The instructions to execute if or when the condition evaluates to true.

Returns
Nothing.

Description
Action: Evaluates a condition. If condition evaluates to true, then statements(s) within {} are executed.

Sample
a = 2;
b = 1;

if (a > b) {
trace("a > b");
}

// "a > b" will be displayed in 'Debug' window. If a < b, nothing will be displayed.

See Also
else and else if.


isNearTarget(target,dx,dy)

Syntax
isNearTarget(targetname [,a] [,b])

Arguments
targetname: Name of the Sprite / Movie Clip whose proximity we are testing.
a: X near boundary or radius if parameter b omitted.
b: Y near boundary.

Returns
Boolean true if the two Objects are near each other.
Boolean false otherwise.

Description
Returns true if the current Sprite / Object / Movie Clip is 'near' the Sprite / Object / Movie Clip defined by targetname. This targetname must be defined using slash notation. The _target property of another Sprite / Object is also an allowable parameter.

Calculation is defined with respect to the center points of the Sprites / Objects (not the anchor point).
The meaning of 'near' depends on the supplied Arguments.
If no Arguments are defined, the Objects are considered 'near' if their bounding rectangles overlap.
If only the 'a' parameter is defined, the Objects are considered 'near' if the distance between their centers is less than the radius defined by the 'a' parameter.
If 'a' and 'b' Arguments are defined, the Objects are considered 'near' if abs(x1 - x2) < a and abs(y1 - y2) < b
x1, y1 is the center point of one of the Objects, x2, y2 is the center point of the other Object.

Sample
Two shapes exist in the Movie, s1 and s2. The following script is included for s1:

onEnterFrame() {
if (isNearTarget("/s2", 50, 50)) { // _root.s2._target can be used in place of "/s2"
this._xscale = 150; // s1 gets fat when it is near s2.
} else {
this._xscale = 100;
}
}

See Also
isNearTarget(), isNearThis() and _target.


isNearThis(dx,dy)

Syntax
spritename.isNearThis([a][,b])

Arguments
spritename: Name of the Sprite / Movie Clip whose proximity we are testing.
a: X near boundary or radius if parameter b omitted.
b: Y near boundary.

Returns
Boolean true if the two Objects are near each other.
Boolean false otherwise.

Description
Returns true if the current Sprite / Object / Movie Clip is 'near' the Sprite / Object / Movie Clip defined by spritename.
Calculation is defined with respect to the center points of the Sprites / Objects (not the anchor point).
The meaning of 'near' depends on the supplied Arguments.
If no Arguments are defined, the Objects are considered 'near' if their bounding rectangles overlap.
If only the 'a' parameter is defined, the Objects are considered 'near' if the distance between their centers is less than the radius defined by the 'a' parameter.
If 'a' and 'b' Arguments are defined, the Objects are considered 'near' if abs(x1 - x2) < a and abs(y1 - y2) < b
x1, y1 is the center point of one of the Objects, x2, y2 is the center point of the other Object.

Sample
Two shapes exist in the Movie, s1 and s2. The following script is included for s1:

onEnterFrame() {
if (_root.s2.isNearThis(50,50)) {
this._xscale = 150; // s1 gets fat when it is near s2.
} else {
this._xscale = 100;
}
}

See Also
isNearTarget(), isNearThis() and _target.


int(value)

Syntax
int(value)

Arguments
value: A number to be truncated to an integer.

Returns
Nothing.

Description
Function: Converts a decimal number an integer value by discarding the fractional part of the number.

Sample
int(3.8); // return value is 3
int(-9.9); // return value is -9

See Also
Math.floor


length(string)

Syntax
length(expression)
length(variable)

Arguments
expression: A string.
variable: The name of a variable containing a string.

Returns
length of the string defined by the expression or variable.

Description
String function: Returns the length of the specified string or variable name.

Sample
onLoad () {

s = "dude";
trace(length(s));
}

// returns the value 4

See Also
String.length()


loadMovie(name[,variables])

Syntax
spritename.loadMovie("url"[, variables])

Arguments
spritename: Name of the Sprite / Movie Clip that is loaded.

url: The absolute or relative URL of the .swf file or .jpeg file to be loaded. A relative path must be relative to the .swf file at level 0. The URL must be in the same subdomain as the URL where the Movie currently resides. For use in the Flash Player or for testing in test mode in the Flash authoring application, all .swf files must be stored in the same folder and the filenames cannot include folder or disk drive specifications.

variables: An optional parameter specifying an HTTP method for sending variables. The parameter must be the string GET or POST. If there are no variables to be sent, omit this parameter. The GET method appends the variables to the end of the URL, and is used for small numbers of variables. The POST method sends the variables in a separate HTTP header and is used for long strings of variables.

Returns
Nothing.

Description
Action and Sprite Method: Loads a .swf or .jpeg file into the Flash Player while the original Movie is playing. The loadMovie Action lets you display several Movies at once and switch between Movies without loading another HTML document.

Without the loadMovie Action, the Flash Player displays a single Movie (.swf file) and then closes. When you use the loadMovie Action, you must specify a target Sprite / Movie Clip, into which the Movie will load.

A Movie or image loaded into a target inherits the position, rotation, and scale properties of the targeted Sprite / Movie Clip. The upper-left corner of the loaded image or Movie aligns with the registration point of the targeted Movie Clip. Alternatively, if the target is the _root Timeline, the upper left corner of the image or Movie aligns with the upper-left corner of the stage.

Use the unloadMovie Action to remove Movies loaded with the loadMovie Action.

Sample
The following loadMovie statement if added to the onLoad event of a Sprite, loads the external file into that Sprite when the Sprite is loaded.

onLoad () {
this.loadMovie("http://www.swishzone.com/script_samples/testswf.swf");
}

Note: The above script must be tested using the test in player or test in browser feature. loadVariables / loadMovies functions cannot be debugged using standard debugging features

See also
loadMovie, loadMovieNum, unloadMovie, unloadMovieNum, loadVariables and loadVariablesNum.


loadMovieNum(name,level[,variables])

Syntax
loadMovieNum("url",level[, variables])

Arguments
url: The absolute or relative URL of the .swf or .jpeg file to be loaded. A relative path must be relative to the .swf file at level 0. The URL must be in the same subdomain as the URL where the Movie currently resides. For use in the stand-alone Flash Player or for testing in test-movie mode in the Flash authoring application, all .swf files must be stored in the same folder; and the filenames cannot include folder or disk drive specifications.

level: An integer specifying the level in the Flash Player into which the Movie will be loaded.

variables:An optional parameter specifying an HTTP method for sending variables. The parameter must be the string GET or POST. If there are no variables to be sent, omit this parameter. The GET method appends the variables to the end of the URL and is used for small numbers of variables. The POST method sends the variables in a separate HTTP header and is used for long strings of variables.

Returns
Nothing.

Description
Action: Loads a .swf or .jpeg file into a level in the Flash Player while the originally loaded Movie is playing. The loadMovieNum Action lets you display several Movies at once and switch between Movies without loading another HTML document.

The Flash Player has a stacking order of levels starting with level 0. These levels are like layers of acetate; they are transparent except for the Objects on each level. When you use the loadMovieNum Action, you must specify a level in the Flash Player into which the Movie will load. Once a Movie is loaded into a level, you can use the syntax, _levelN, where N is the level number, to target the Movie.

When you load a Movie, you can specify any level number and you can load Movies into a level that already has a .swf file loaded into it. If you do, the new Movie will replace the existing .swf file. If you load a Movie into level 0, every level in the Flash Player is unloaded, and level 0 is replaced with the new file. The Movie in level 0 sets the Frame rate, background color and Frame size for all other loaded Movies.

The loadMovieNum Action also allows you to load .jpeg files into a Movie while it plays. For both images and .swf files, the upper-left corner of the image aligns with the upper-left corner of the stage when the file loads. Also in both cases, the loaded file inherits rotation and scaling, and the original content is over written.

Use the unloadMovieNum Action to remove Movies or images loaded with the loadMovieNum Action.

Sample
This example loads the specified .swf into level 1 of the Player.
The URL "http://www.swishzone.com/script_samples/testswf.swf" is provided for testing purposes.

loadMovieNum("http://www.swishzone.com/script_samples/testswf.swf",1);

Note: The above script must be tested using the test in player or test in browser feature.
loadVariables / loadMovies functions cannot be debugged using standard debugging features

See also
loadMovie, loadMovieNum, unloadMovie, unloadMovieNum, loadVariables and loadVariablesNum.


loadVariables(name[,variables])

Syntax
spritename.loadVariables ("url" [, variables])

Arguments
spritename: Name of the Sprite / Movie Clip that the variables are loaded.

url: An absolute or relative URL where the variables are located. If you access the Movie using a Web browser, the host for the URL must be in the same subdomain as the Movie itself.

variables: An optional parameter specifying an HTTP method for sending variables. The parameter must be the string GET or POST. If there are no variables to be sent, omit this parameter. The GET method appends the variables to the end of the URL and is used for small numbers of variables. The POST method sends the variables in a separate HTTP header and is used for long strings of variables.

Returns
Nothing.

Description
Action and Sprite Method: Reads data from an external file, such as a text file or text generated by a CGI script, Active Server Pages (ASP), or PHP, or Perl script, and sets the values for variables in a Flash Player level or a target Movie Clip. This Action can also be used to update variables in the active Movie with new values.

The text at the specified URL must be in the standard MIME format application/x-www-form-urlencoded (a standard format used by CGI scripts). The Movie and the variables to be loaded must reside at the same subdomain.

Any number of variables can be specified. For example, the phrase below defines several variables:
name=dude&address=home&city=Sydney

When you use the loadVariables Action, you must specify a Sprite / Movie Clip target into which the variables will load.

Sample
The project contains a Sprite named datetime. The datetime Sprite contains two Dynamic Text elements named date and time. The onLoad() Event is for the datetime Sprite.
The referenced URL returns a string
date=dd-mmmm-yyyy&time=hh:mm

The URL is available on our Web site for development / testing purposes.

onLoad () {

this.date = "date";
this.time = "time";
this.loadVariables("http://www.swishzone.com/script_samples/date.php",'GET');
}

Note: The above script must be tested using the test in player or test in browser feature. loadVariables / loadMovies functions cannot be debugged using standard debugging features

The date.php Web page contains the following script:
<?php
// example script that returns date and time.
// demonstrates use of load variable function.
echo "date=";
print (date ("d-M-Y"));
echo "&time=";
print (date ("H:i"));
?>

See also
loadMovie loadMovieNum ,unloadMovie ,unloadMovieNum ,loadVariables and loadVariablesNum.


loadVariablesNum(name,level[,variables]

Syntax
loadVariablesNum("url" ,level [, variables])

Arguments
url: An absolute or relative URL where the variables are located. If you access the Movie using a Web browser, the host for the URL must be in the same subdomain as the Movie itself.

level: An integer specifying the level in the Flash Player to receive the variables.

variables: An optional parameter specifying an HTTP method for sending variables. The parameter must be the string GET or POST. If there are no variables to be sent, omit this parameter. The GET method appends the variables to the end of the URL, and is used for small numbers of variables. The POST method sends the variables in a separate HTTP header and is used for long strings of variables.

Returns
Nothing.

Description
Action: Reads data from an external file, such as a text file or text generated by a CGI script, Active Server Pages (ASP), or PHP, or Perl script, and sets the values for variables in a Flash Player level. This Action can also be used to update variables in the active Movie with new values. When you load variables into a level, the Action in the 'Script' Panel in guided mode becomes loadVariablesNum; in expert mode, you must specify loadVariablesNum or choose it from the Add Script Menu.

The text at the specified URL must be in the standard MIME format application/x-www-form-urlencoded (a standard format used by CGI scripts). The Movie and the variables to be loaded must reside at the same subdomain.

Any number of variables can be specified. For example, the phrase below defines several variables:
name=dude&address=home&city=Sydney

When you use the loadVariablesNum Action, you must specify a Flash Player level into which the variables will load.

Sample
The project contains two Dynamic Text elements named date and time.
The onLoad() Event is for the main page.
The referenced URL returns a string
date=dd-mmmm-yyyy&time=hh:mm

The URL is available on our Web site for development / testing purposes.

onLoad () {
date = "date";
time = "time";
loadVariablesNum("http://www.swishzone.com/script_samples/date.php",0,'GET');
}

Note: The above script must be tested using the test in player or test in browser feature. loadVariables / loadMovies functions cannot be debugged using standard debugging features

See also
loadMovie, loadMovieNum, unloadMovie, unloadMovieNum, loadVariables and loadVariablesNum.


Math (Object)

This Object allows access to various mathematical functions and constants without a constructor.

When exporting SWF4 Movies, it is recommended that you select the Shared advanced math library option in the 'Export' Panel if you plan to use the Math Object. If this option is not selected, math functions still work, but the code is placed directly into your compiled script, which will cause your Movie to be much larger if you use math functions throughout your Movie.

The Math Object is emulated in SWiSHmax.

Function
Requires Advanced Math Support?
Description
Math.abs(number)
N
Absolute value of number
Math.acos(number)
Y
Arc cos of ratio in radians
Math.acosdeg(number)
Y
Arc cos of ratio in degrees
Math.approach(number,dest,factor)
N
Moves 'value' closer to 'dest' by a factor of 'factor'
Math.asin(number)
Y
Arc sin of ratio in radians
Math.asindeg(number)
Y
Arc sin of ratio in degrees
Math.atan(number)
Y
Arc tan of ratio in radians
Math.atandeg(number)
Y
Arc tan of ratio in degrees
Math.atan2(y,x)
Y
Arc tan (angle in radians) of specified co-ordinates
Math.atan2deg(y,x)
Y
Arc tan (angle in degrees) of specified co-ordinates
Math.ceil(number)
N
Returns closest integer >= specified number
Math.chance(percent)
N
Returns true (1) percent (on average) amount of the time
Math.clamp(number,lo,hi)
N
if (lo < number < hi) returns number
if (number <= lo) returns lo
if (number >= hi) returns hi
Math.cos(radians)
Y
Returns the cosine of the angle. Angle is in radians
Math.cosdeg(degress)
Y
Returns the cosine of the angle. Angle is in degrees
Math.degrees(radians)
N
Converts an angle in radians to degrees
Math.exp(number)
Y
Raises e to the power of number
Math.floor(number)
N
Returns closest integer <= specified number
Math.log(number)
Y
Returns the natural log of number
Math.max(number,number...)
N
Returns the maximum of the supplied Arguments
Math.min(number,number...)
N
Returns the minimum of the supplied Arguments
Math.Pi
N
Constant, PI
Math.pow(base,power)
Y
Raises base to the power of power
Math.radians(degrees)
N
Converts an angle in degrees to radians
Math.random()
N
Returns a random number, 0 <= number <= 1
Math.randomInt(max)
N
Returns a random number in the range
0 <= number <= max
Math.randomRange(lo,hi)
N
Returns a random number in the range
lo <= number <= hi
Math.round(number)
N
rounds the value of the parameter up or down to the nearest integer
Math.sign(number)
N
if (number < 0) returns -1
if (number == 0) returns 0
if (number > 0) returns +1
Math.sin(radians)
Y
Returns the sine of the angle. Angle is in radians
Math.sindeg(degrees)
Y
Returns the sine of the angle. Angle is in degrees
Math.sqrt(number)
Y
Returns the square root of number
Math.SQRT1_2
N
Constant, square root of 0.5
Math.SQRT2
N
Constant, square root of 2
Math.tan(radians)
Y
Returns the tangent of the angle. Angle is in radians
Math.tandeg(degrees)
Y
Returns the tangent of the angle. Angle is in degrees

Members of the Math Object are selectable from the following Menu.

tempmath


Math.abs(number)

Syntax
Math.abs(x)

Arguments
x: A number or expression.

Returns
A number, the absolute value of x.

Description
Method: Returns the absolute value of x.

Sample
Math.abs(3.4); // returns 3.4
Math.abs(-3.4); // returns 3.4


Math.acos(number)

Syntax
Math.acos(x)

Arguments
x: A number or expression. (-1 <= x <= 1).

Returns
A number, the angle (in radians) of arc cosine (x).

Description
Calculates the arc cosine (x).

Sample
Math.acos(0.5); // returns 1.0471975511966 (PI / 3 radians = 60 degrees)

Note: Requires Advanced Math Support. See here for more information

See Also
Math.acos(), Math.acosdeg(), Math.asin(), Math.asindeg(), Math.atan(), Math.atandeg(),
Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan(), Math.tandeg(),
Math.atan2(y,x) and Math.atan2deg(y,x).


Math.acosdeg(number) +

Syntax
Math.acosdeg(x)

Arguments
x: A number or expression. (-1 <= x <= 1).

Returns
A number, the angle (in degrees) of arc cosine (x).

Description
Calculates the arc cosine (x).

Sample
Math.acosdeg(0.5); // returns 60 degrees

Note: Requires Advanced Math Support. See here for more information

Flash MX Differences
This function is not implemented in Flash MX.

See Also
Math.acos(), Math.acosdeg(), Math.asin(), Math.asindeg(), Math.atan(), Math.atandeg(),
Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan(), Math.tandeg(),
Math.atan2(y,x) and Math.atan2deg(y,x).


Math.approach(number,dest,factor) +

Syntax
Math.approach(number, dest, factor)

Arguments
All numeric numbers or expressions.
number:Current position (x or y co-ordinate)
dest: Desired position (x or y co-ordinate)
factor: Amount to approach dest.

Returns
A number, the new current position.

Description
Use to calculate 'easing' amount in scripted moves.
Calculated function is ((number - dest) * factor + dest)
If 0 < factor < 1, Object moves towards dest, slowing as it approaches.
if 1 < factor Object moves away from dest, accelerating as it leaves.

Sample
In subsequent Frames, move Object towards X = 10 by 5% each Frame

onEnterFrame() {
this._X = math.approach(this._X, 10, 0.95);
}

Flash MX Differences
This function is not implemented in Flash MX.


Math.asin(number)

Syntax
Math.asin(x)

Arguments
x: A number or expression. (-1 <= x <= 1).

Returns
A number, the angle (in radians) of arc sine (x).

Description
Calculates the arc sine (x).

Sample
Math.asin(0.5); // 0.523598775598299 ( PI / 6 radians = 30 degrees)

Note: Requires Advanced Math Support. See here for more information

See Also
Math.acos(), Math.acosdeg(), Math.asin(), Math.asindeg(), Math.atan(), Math.atandeg(),
Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan(), Math.tandeg(),
Math.atan2(y,x) and Math.atan2deg(y,x).


Math.asindeg(number) +

Syntax
Math.asindeg(x)

Arguments
x: A number or expression. (-1 <= x <= 1).

Returns
A number, the angle (in degrees) of arc sine (x).

Description
Calculates the arc sine (x).

Sample
Math.asindeg(0.5); // returns 30 degrees

Note: Requires Advanced Math Support. See here for more information

Flash MX Differences
This function is not implemented in Flash MX.

See Also
Math.acos(), Math.acosdeg(), Math.asin(), Math.asindeg(), Math.atan(), Math.atandeg(),
Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan(), Math.tandeg(),
Math.atan2(y,x) and Math.atan2deg(y,x).


Math.atan(number)

Syntax
Math.atan(x)

Arguments
x: A number or expression.

Returns
A number, the angle (in radians) of arc tan (x).

Description
Calculates the arc tan (x).

Sample
Math.atan(1); // returns 0.785398163397448. (Pi/4 radians = 45 degrees)

Note: Requires Advanced Math Support. See here for more information

See Also
Math.acos(), Math.acosdeg(), Math.asin(), Math.asindeg(), Math.atan(), Math.atandeg(),
Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan(), Math.tandeg(),
Math.atan2(y,x) and Math.atan2deg(y,x).


Math.atandeg(number) +

Syntax
Math.atandeg(x)

Arguments
x: A number or expression.

Returns
A number, the angle (in degrees) of arc tan (x).

Description
Calculates the arc tan (x).

Sample
Math.atandeg(1); // returns 45 degrees

Note: Requires Advanced Math Support. See here for more information

Flash MX Differences
This function is not implemented in Flash MX.

See Also
Math.acos(), Math.acosdeg(), Math.asin(), Math.asindeg(), Math.atan(), Math.atandeg(),
Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan(), Math.tandeg(),
Math.atan2(y,x) and Math.atan2deg(y,x).


Math.atan2(y,x)

Syntax
Math.atan2(y,x)

Arguments
x, y: Numbers or expressions.

Returns
A number, the angle (in radians) of arc tan (y/x).

Description
Calculates the arc tan (y/x).
Handles the special cases where y = 0 or x = 0. Although x = y = 0 is undefined, function returns 0.

Sample
Math.atan2(1,1); // returns 0.785398163397448. (Pi/4 radians = 45 degrees)
Math.atan2(1,0); // returns 1.5707963267949 (Pi/2 radians = 90 degrees)

Note: Requires Advanced Math Support. See here for more information

See Also
Math.acos(), Math.acosdeg(), Math.asin(), Math.asindeg(), Math.atan(), Math.atandeg(),
Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan(), Math.tandeg(),
Math.atan2(y,x) and Math.atan2deg(y,x).


Math.atan2deg(y,x) +

Syntax
Math.atan2deg(y,x)

Arguments
x, y: Numbers or expressions.

Returns
A number, the angle (in degrees) of arc tan (y/x).

Description
Calculates the arc tan (y/x).
Handles the special cases where y = 0 or x = 0. Although x = y = 0 is undefined, function returns 0.

Sample
Math.atan2deg(1,1); // returns 45 degrees
Math.atan2deg(1,0); // returns 90 degrees

Note: Requires Advanced Math Support. See here for more information.

Flash MX Differences
This function is not implemented in Flash MX.

See Also
Math.acos(), Math.acosdeg(), Math.asin(), Math.asindeg(), Math.atan(), Math.atandeg(),
Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan(), Math.tandeg(),
Math.atan2(y,x) and Math.atan2deg(y,x).


Math.ceil(number)

Syntax
Math.ceil(x)

Arguments
x: A number or expression.

Returns
A number, the closest integer that is greater than or equal to x.

Description
Returns the ceiling of the specified number or expression. The ceiling of a number is the closest integer that is greater than or equal to the number.

Sample
Math.ceil(4.2); // returns 5
Math.ceil(-3.8); // returns -3

See Also
Math.floor() and Math.round().


Math.chance(percent) +

Syntax
Math.chance(percent)

Arguments
The percentage of time that the function should return 1 (or true).

Returns
0 or 1.

Description
Returns 1 or 0 depending on random chance.
On average, 1 is returned per cent of the time.

Sample
Math.randomInt(25); // will return 1 on 25% of occasions. i.e. 1 in 4 chance

Flash MX Differences
This function is not implemented in Flash MX.

See also
Math.random(), Math.randomInt() and Max.randomRange().


Math.clamp(number,lo,hi) +

Syntax
Math.clamp(number, lo, hi)

Arguments
All are numbers or expressions.
number: Value to be clamped.
lo: Low clamp value.
hi: Hi clamp value.

Returns
Clamped value.

Description
If number <= lo returns lo; If number >= hi returns hi; otherwise returns number.

This is a convenient way of limiting values to a set boundary.

Sample
Math.clamp(-5,2,15); // returns 2
Math.clamp(4.6,2,15); // returns 4.6
Math.clamp(103,2,15); // returns 15

Flash MX Differences
This function is not implemented in Flash MX.


Math.cos(radians)

Syntax
Math.cos(x)

Arguments
x: A number or expression representing the angle in radians.

Returns
A number, the cosine of (x).

Description
Calculates the cosine of x. This will be a value from -1.0 to 1.0.

Sample
Math.cos(Math.PI / 2); // returns 6.12303176911188e-17 (pretty close to 0, cos 90deg = 0)

Note: Requires Advanced Math Support. See here for more information

See Also
Math.acos(), Math.asin(), Math.atan(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan() and Math.tandeg().


Math.cosdeg(degress) +

Syntax
Math.cosdeg(x)

Arguments
x: A number or expression representing the angle in degrees.

Returns
A number, the cosine of (x).

Description
Calculates the cosine of x. This will be a value from -1.0 to 1.0.

Sample
Math.cosdeg(90); // returns 6.12303176911188e-17 (pretty close to 0, cos 90deg = 0)

Note: Requires Advanced Math Support. See here for more information

Flash MX Differences
This function is not implemented in Flash MX.

See Also
Math.acos(), Math.asin(), Math.atan(), Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan() and Math.tandeg().


Math.degrees(radians) +

Syntax
Math.degrees(x)

Arguments
x: A number or expression representing the angle in radians.
2 * PI radians = 360 degrees.

Returns
The corresponding number of degrees.

Description
Calculates the number of degrees based on the formula:
degrees = radians * 360 / (2 * pi).

Sample
Math.degrees(Math.PI); // returns 180 degrees

Flash MX Differences
This function is not implemented in Flash MX.

See Also
Math.acos(), Math.asin(), Math.atan(), Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan() and Math.tandeg().


Math.distance(x1,y1,x2,y2) +

Syntax
Math.distance(x1,y1,x2,y2)

Arguments
x1, y1, x1, y2: Numbers or expressions.

Returns
A number, the distance between the two points (x1, y1) and (x2, y2).

Description
Calculates the distance between the two points (x1, y1) and (x2, y2) using Math.sqrt((x2-x1)*(x2-x2)+(y2-y1)*(y2-y1)).

Sample
Math.distance(1,1,10,10); // returns 12.727
Math.distance(3,5,30,40); // returns 44.204

Note: Requires Advanced Math Support. See here for more information

See Also
Math.distanceSq()


Math.distanceSq(x1,y1,x2,y2) +

Syntax
Math.distanceSq(x1,y1,x2,y2)

Arguments
x1, y1, x1, y2: Numbers or expressions.

Returns
A number, the square of the distance between the two points (x1, y1) and (x2, y2).

Description
Calculates the square of the distance between the two points (x1, y1) and (x2, y2) using ((x2-x1)*(x2-x2)+(y2-y1)*(y2-y1)).

Sample
Math.distanceSq(1,1,10,10); // returns 162
Math.distanceSq(3,5,30,40); // returns 1954

Note: Requires Advanced Math Support. See here for more information

See Also
Math.distance()


Math.exp(number)

Syntax
Math.exp(x)

Arguments
x: The exponent - a number or expression.

Returns
A number.

Description
Returns the value e, to the power of the exponent specified in the parameter x.

e is a constant and is the value of the base of the natural logarithm.
e has an approximate value of 2.71828

Sample
Math.exp(2); // returns e squared (or e * e), which is approximately 7.3890

Note: Requires Advanced Math Support. See here for more information

See Also
Math.log(), Math.log10(), Converting Log Base
Math.pow() and Math.sqrt().


Math.floor(number)

Syntax
Math.floor(x)

Arguments
x: A number or expression.

Returns
A number, the closest integer that is less than or equal to x.

Description
Returns the floor of the specified number or expression. The floor of a number is the closest integer that is less than or equal to the number.

Sample
Math.floor(4.8); // returns 4
Math.floor(-3.2); // returns -4

See Also
Math.ceil() and Math.round().


Math.log(number)

Syntax
Math.log(x)

Arguments
x: A number or expression > 0.

Returns
A number.

Description
Returns the natural logarithm of the parameter x.

Sample
Math.log(2); // returns natural log of 2, approximately 0.6931
Math.log(100)/Math.log(10); // returns 2, the log, base 10 of 100

Note: Requires Advanced Math Support. See here for more information

See Also
Math.exp(), Math.log10(), Converting Log Base
Math.pow() and Math.sqrt().


Math.log10(x) +

Syntax
Math.log(x)

Arguments
x: A number or expression > 0.

Returns
A number.

Description
Returns the log base 10 of x.

Sample
Math.log10(2); // returns 1, the log base 10 of 10
Math.log10(100); // returns 2, the log base 10 of 100

Note: Requires Advanced Math Support. See here for more information

See Also
Math.exp(), Math.log(), Converting Log Base
Math.pow() and Math.sqrt().


Math.max(number,number...) +

Syntax
Math.max(n1, n2[, n3 ....])

Arguments
n1: A number or expression.
n2: A number or expression.
n3: A list of numbers or expressions.

Returns
A number, the parameter with the highest value.

Description
Returns the value of the parameter with the highest value.

Sample
Math.max(1,4,-3); // returns 4

Flash MX Differences
Under MX, the method is limited to two Arguments.

See Also
Math.max() and Math.min() .


Math.min(number,number...) +

Syntax
Math.min(n1, n2[, n3 ....])

Arguments
n1: A number or expression.
n2: A number or expression.
n3: A list of numbers or expressions.

Returns
A number, the parameter with the lowest value.

Description
Returns the value of the parameter with the lowest value.

Sample
Math.min(1,4,-3); // returns -3

Flash MX Differences
Under MX, the method is limited to two Arguments.

See Also
Math.max() and Math.min() .


Math.PI

Syntax
Math.PI

Arguments
None.

Returns
The constant PI.

Description
Returns the mathematical constant PI.
PI is the ratio of the circumferene of a circle to its diameter.
This is an irrational number and has the approximate value of 3.141592.

Sample
rad = deg * 2 * Math.PI / 360; // converts deg to radians


Math.pow(base,power)

Syntax
Math.pow(base,power)

Arguments
base, power: Numbers or expressions.
If base < 0, then power must be an integer value.

Returns
A number.

Description
Returns base to the power of power.

Samples
Math.pow(3,2); // returns 9 (3 * 3)
Math.pow(2,3); // returns 8 (2 * 2 * 2)
Math.pow(-2,3); // returns -8
Math.pow(2,-1); // returns 0.5 (1/2)
Math.pow(2,0.5); // returns 1.414213... (square root of 2)
Math.pow(2,-0.5); // reutrns 0.707... (1/(square root of 2)
Math.pow(-2,0.5); // returns 0. (Error condition, base <0, non integer power)

Note: Requires Advanced Math Support. See here for more information

See Also
Math.exp(), Math.log(), Math.log10(), Converting Log Base
Math.pow() and Math.sqrt().


Math.radians(degrees) +

Syntax
Math.radians(x)

Arguments
x: A number or expression representing the angle in degrees.
2 * PI radians = 360 degrees.

Returns
The corresponding number of degrees.

Description
Calculates the number of radians based on the formula:
radians = degress * 2 * pi / 360.

Sample
Math.radians(360); // returns 2 * pi radians, (6.28318548202515)

Flash MX Differences
This function is not implemented in Flash MX.

See Also
Math.acos(), Math.asin(), Math.atan(), Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan() and Math.tandeg().


Math.random()

Syntax
Math.random()

Arguments
None.

Returns
A random number.

Description
Returns a random number n, where 0 <= n < 1.
n has a maximum precision of 5 decimal places.

See also
Math.chance(), Math.random(), Math.randomInt() and Max.randomRange().


Math.randomInt(max) +

Syntax
Math.randomInt(max)

Arguments
max: An integer number or expression > 0.

Returns
A random integer.

Description
Returns a random integer n, where 0 <= n < max.

Sample
Math.randomInt(5); // will randomly return one of the values 0, 1, 2, 3 or 4

Flash MX Differences
This function is not implemented in Flash MX.

See also
Math.chance(), Math.random(), Math.randomInt() and Max.randomRange().


Math.randomRange(lo,hi) +

Syntax
Math.randomInt(lo, hi)

Arguments
Both Arguments are numbers or expressions.
lo: The low value of the range.
hi: The high value of the range.

Note: lo < hi

Returns
A random number.

Description
Returns a random number n, where lo <= n < hi.
Maximum precision of 5 decimal places.

Sample
Math.randomInt(-10,10); // will return a random value in the range -10 to 10

Flash MX Differences
This function is not implemented in Flash MX.

See also
Math.chance(), Math.random(), Math.randomInt() and Max.randomRange().


Math.round(number)

Syntax
Math.round(x)

Arguments
x: A number or expression.

Returns
An integer.

Description
Rounds the value of the parameter x up or down to the nearest integer and returns the value.

Sample
Math.round(4.8); // returns the value 5
Math.round(4.2); // returns the value 4
Math.round(-4.8); // returns the value -5

See Also
Math.ceil(), Math.floor() and Math.round().


Math.sign(number) +

Syntax
Math.sign(number)

Arguments
All numeric numbers or expressions.
number: Value

Returns
The sign of the value.

Description
if (number < 0) returns -1.
if (number == 0) returns 0.
if (number > 0) returns +1.

Sample
Math.sign(3.8); // returns +1
Math.sign(0); // returns 0
Math.sign(-9); // returns -1

Flash MX Differences
This function is not implemented in Flash MX.


Math.sin(radians)

Syntax
Math.sin(x)

Arguments
x: A number or expression representing the angle in radians.

Returns
A number, the sine of (x).

Description
Calculates the sine of x. This will be a value from -1.0 to 1.0.

Sample
Math.sin(Math.PI / 2); // returns 1 (sin 90deg = 1)

Note: Requires Advanced Math Support. See here for more information

See Also
Math.acos(), Math.asin(), Math.atan(), Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan() and Math.tandeg().


Math.sindeg(degrees) +

Syntax
Math.sindeg(x)

Arguments
x: A number or expression representing the angle in degrees.

Returns
A number, the sine of (x).

Description
Calculates the sine of x. This will be a value from -1.0 to 1.0.

Sample
Math.sindeg(90); // returns 1 (sin 90deg = 1)

Note: Requires Advanced Math Support. See here for more information

Flash MX Differences
This function is not implemented in Flash MX.

See Also
Math.acos(), Math.asin(), Math.atan(), Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan() and Math.tandeg().


Math.sqrt(number)

Syntax
Math.sqrt(number)

Arguments
number: Number or expression.
number must be >= 0.

Returns
A number.

Description
Returns square root of the number.

Samples
Math.sqrt(3); // returns 1.732050807...

Note: Requires Advanced Math Support. See here for more information

See Also
Math.exp(), Math.log(), Math.log10(), Converting Log Base
Math.pow() and Math.sqrt().


Math.SQRT1_2

Syntax
Math.SQRT1_2

Arguments
None.

Returns
Square root of 1/2.

Description
Returns the square root of 1/2. This constant is often used in trig calculations.
It is an irrational number and has the approximate value of 0.707106.

Sample
Math.SQRT1_2; // returns 0.707106
Math.sindeg(45) - Math.SQRT1_2; // returns -1.11022302462515e-16 which is pretty close to 0

See Also
Math.SQRT2


Math.SQRT2

Syntax
Math.SQRT2

Arguments
None.

Returns
Square root of 2.

Description
Returns the square root of 2. This constant is often used in trig calculations.
It is an irrational number and has the approximate value of 1.414213.

Sample
Math.SQRT2; // returns 1.414213
Math.cosdeg(45) - 1/Math.SQRT2; // returns 1.11022302462515e-16 which is pretty close to 0

See Also
Math.SQRT1_2


Math.tan(radians)

Syntax
Math.tan(x)

Arguments
x: A number or expression representing the angle in radians.

Returns
A number, the tangent of (x).

Description
Calculates the tangent of x.

Sample
Math.tan(Math.PI / 4); // returns 1 (tan 45deg = 1)

Note: Requires Advanced Math Support. See here for more information

See Also
Math.acos(), Math.asin(), Math.atan(), Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg() and Math.tandeg().


Math.tandeg(degrees) +

Syntax
Math.tandeg(x)

Arguments
x: A number or expression representing the angle in degrees.

Returns
A number, the tangent of (x).

Description
Calculates the tangent of x.

Sample
Math.tandeg(45); // returns 1 (tan 45deg = 1)

Note: Requires Advanced Math Support. See here for more information

Flash MX Differences
This function is not implemented in Flash MX.

See Also
Math.acos(), Math.asin(), Math.atan(), Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg() and Math.tan().


maxscroll

Syntax
variable_name.maxscroll

Description
A read-only property associated with Script Text Fields.
Indicates the line number of the top-most visible line of text in a Text Field when the bottom-most line in the field is also visible.
The maxscroll property works with the scroll property to control the display of information in a Text Field.

Note: This property is not available with simple Text Field Objects

See also
scroll and Text Field Properties.


Mouse Events

Event Handling procedures exist for Sprites / Objects (onSelfEvent()) and for Button Objects (on()). The exact Event being handled is defined by the Event name supplied to the onSelfEvent() or on() functions.

In Windows-based computers that support left and right mouse buttons, only the left mouse button is monitored (the right mouse button is not available on Mac computers).

Event | Description
dragOut | Mouse button is pressed then mouse is moved away from the Object / Sprite / button
dragOver | Mouse button is pressed over the Object / Sprite / button. The mouse is then moved away and back while the button is pressed
keyPress(key) | The specified key has been pressed
press | Mouse button has been pressed over the Object / Sprite / button
release | Mouse button has been released over the Object / Sprite / button
releaseOutside | Mouse button has been released outside the Object / Sprite / button
rollOut | Mouse is moved away from the Object / Sprite / button
rollOver | Mouse is moved over the Object / Sprite / button


dragOut

Syntax
A Mouse Event Parameter. Used as a parameter to on() and onSelfEvent() Event Handling functions.

Description
The associated Event is executed when the Event condition is met.

The Event condition requires:
1. The mouse button to be pressed while the mouse is positioned over the Object / Sprite / button
2. The mouse to be moved outside of the Object / Sprite / button while the button is held down.

The condition occurs as the mouse moves outside of the Object / Sprite / button.

Sample
The following Event script could be added to an Object / Sprite or button so that it gets smaller after a dragOut Event.

onSelfEvent (dragOut) {

_xscale -= 10;
_yscale -= 10;
}

See Also
dragOver, keyPress(key), press, release, releaseOutside, rollOut, rollOver, on() and onSelfEvent().


dragOver

Syntax
A Mouse Event Parameter. Used as a parameter to on() and onSelfEvent() Event Handling functions.

Description
The associated Event is executed when the Event condition is met.

The Event condition requires:
1. The mouse button to be pressed while the mouse is positioned over the Object / Sprite / button
2. The mouse to be moved outside the Object / Sprite / button while the button is held down
3. The mouse to be moved over the Object / Sprite / button while the button is still held down.

The condition occurs as the mouse returns over of the Object / Sprite / button.

Sample
The following event script could be added to an Object / Sprite or button so that it gets larger after a dragOver Event.

onSelfEvent (dragOver) {
_xscale += 10;
_yscale += 10;
}

See Also
dragOut, keyPress(key), press, release, releaseOutside, rollOut, rollOver, on() and onSelfEvent().


keyPress(key)

Syntax
A Mouse Event Parameter. Used as a parameter to on() and onSelfEvent() Event Handling functions.

Description
The associated Event is executed when the Event condition is met.

The Event condition requires the specified button to be pressed.

Apart from standard keyboard characters, non-printable characters can be selected via the pull-down Menu. The non-printable characters that are supported are:
Symbol | Entered as | Description
Space | "<Space>" | Space character
Left | "<Left>" | Left arrow
Right | "<Right>" | Right arrow
Up | "<Up>" | Up arrow
Down | "<Down>" | Down arrow
Home | "<Home>" | Home key
End | "<End>" | End key
PageUp | "<PageUp>" | Page Up key
PageDown | "<PageDown>" | Page Down key
Insert | "<Insert>" | Insert key
Delete | "<Delete>" | Del / Delete key
Backspace | "<Backspace>" | Backspace key
Tab | "<Tab>" | Tab key
Enter | "<Enter>" | Enter key
Escape | "<Escape>" | Esc key

Sample
The following Event script could be added to an Object / Sprite or button so that it gets larger after the button 'a' is pressed.

onSelfEvent (keyPress("a")) {
_xscale += 10;
_yscale += 10;
}

If multiple characters are to be tested, it is necessary to use multiple Event Handling functions.

onSelfEvent (keyPress("a")) {
_xscale += 10;
_yscale += 10;
}
onSelfEvent (keyPress("<Tab>")) {
_xscale += 10;
_yscale += 10;
}

See Also
dragOut, dragOver, press, release, releaseOutside, rollOut, rollOver, on() and onSelfEvent().


press

Syntax
A Mouse Event Parameter. Used as a parameter to on() and onSelfEvent() Event Handling functions.

Description
The associated Event is executed when the Event condition is met.

The event condition requires the mouse button to be pressed while the mouse is positioned over the Object / Sprite / button.

The condition occurs as the button is pressed.

Sample
The following Event script could be added to an Object / Sprite or button so that it gets smaller after a press Event.

onSelfEvent (press) {
_xscale -= 10;
_yscale -= 10;
}

See Also
dragOut, dragOver, keyPress(key), release, releaseOutside, rollOut, rollOver, on() and onSelfEvent().


release

Syntax
A Mouse Event Parameter. Used as a parameter to on() and onSelfEvent() Event Handling functions.

Description
The associated Event is executed when the Event condition is met.

The Event condition requires the mouse button to be released while the mouse is positioned over the Object / Sprite / button.

The condition occurs as the button is released.

Sample
The following Event script could be added to an Object / Sprite or button so that it gets larger after a release Event.

onSelfEvent (release) {
_xscale += 10;
_yscale += 10;
}

See Also
dragOut, dragOver, keyPress(key), press, releaseOutside, rollOut, rollOver, on() and onSelfEvent().


releaseOutside

Syntax
A Mouse Event Parameter. Used as a parameter to on() and onSelfEvent() Event Handling functions.

Description
The associated Event is executed when the Event condition is met.

The Event condition requires:
1. The mouse button to be pressed while the mouse is positioned over the Object / Sprite / button
2. The mouse button to be released while the mouse is positioned outside the Object / Sprite / button.

The condition occurs as the button is released.

Sample
The following Event script could be added to an Object / Sprite or button so that it gets larger after a releaseOutside Event.

onSelfEvent (releaseOutside) {
_xscale += 10;
_yscale += 10;
}

See Also
dragOut, dragOver, keyPress(key), press, release, releaseOutside, rollOut, rollOver, on() and onSelfEvent().


rollOut

Syntax
A Mouse Event Parameter. Used as a parameter to on() and onSelfEvent() Event handling functions.

Description
The associated event is executed when the event condition is met.

The event condition requires:
1. The mouse is positioned over the object / sprite / button.
2. The mouse is positioned outside the object / sprite / button.

The condition occurs as the mouse is no longer over the object / sprite / button.

Sample
The following event script could be added to an object / sprite or button so that it gets larger after a rollOut Event.
onSelfEvent (rollOut) {
_xscale += 10;
_yscale += 10;
}

See Also
dragOut, dragOver ,keyPress(key) ,press ,release ,releaseOutside ,rollOut ,rollOver ,on() and onSelfEvent()


rollOver

Syntax
A Mouse Event Parameter. Used as a parameter to on() and onSelfEvent() Event Handling functions.

Description
The associated Event is executed when the Event condition is met.

The Event condition requires:
1. The mouse is positioned outside the Object / Sprite / button
2. The mouse is positioned over the Object / Sprite / button.

The condition occurs as the mouse is moved over the Object / Sprite / button.

Sample
The following Event script could be added to an Object / Sprite or button so that it gets larger after a rollOver Event.

onSelfEvent (rollOver) {
_xscale += 10;
_yscale += 10;
}

See Also
dragOut, dragOver, keyPress(key), press, release, releaseOutside, rollOut, on() and onSelfEvent().


newline

Syntax
newline

Arguments
None.

Returns
Nothing.

Description
Constant: Inserts a carriage return character (\r) that inserts a blank line into the ActionScript code. Use newline to make space for information that is retrieved by a function or Action in your code.


nextFrameAndPlay

Syntax
spritename.nextFrameAndPlay()

Arguments
spritename: The name of the Sprite / Movie Clip to be played.

Returns
Nothing.

Description
Action and Sprite Method: Sends the playhead to the next Frame in a Scene and plays from that Frame.

Sample
onLoad() {
this.nextFrameAndPlay(); // Sprite starts playing from second Frame
}

See Also
play(), stop(), gotoAndPlay(), gotoAndStop(), gotoSceneAndPlay(), gotoSceneAndStop(), nextFrameAndStop(), prevFrameAndPlay(), prevFrameAndStop(), skipFrameAndPlay() and skipFrameAndStop().


nextFrameAndStop

Syntax
spritename.nextFrameAndStop()

Arguments
spritename: The name of the Sprite / Movie Clip to be played.

Returns
Nothing.

Description
Action and Sprite Method: Sends the playhead to the next Frame in a Scene and stops at that Frame.

Sample
onLoad() {
this.nextFrameAndStop(); // Sprite moves playhead to 2nd Frame and stops
}

See Also
play(), stop(), gotoAndPlay(), gotoAndStop(), gotoSceneAndPlay(), gotoSceneAndStop(), nextFrameAndPlay(), prevFrameAndPlay(), prevFrameAndStop(), skipFrameAndPlay() and skipFrameAndStop().


nextSceneAndPlay +

Syntax
nextSceneAndPlay()

Arguments
None.

Returns
Nothing.

Description
Action: Sends the playhead to the next Scene and plays from the first Frame.

Sample
onFrame (10) {
nextSceneAndPlay(); // identical to gotoSceneAndPlay("<next scene>", 1);
}

Flash MX Differences
This function is not implemented in Flash MX.

See Also
Scene-based Movie Control
gotoSceneAndPlay(), gotoSceneAndStop(), nextSceneAndStop(), prevSceneAndPlay() and prevSceneAndStop() .

Frame-based Movie Control
play(), stop(), gotoAndPlay(), gotoAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndPlay(), prevFrameAndStop(), skipFrameAndPlay() and skipFrameAndStop().


nextSceneAndStop +

Syntax
nextSceneAndStop()

Arguments
None.

Returns
Nothing.

Description
Action: Sends the playhead to the next Scene and stops at the first Frame.

Sample
onFrame (10) {
nextSceneAndStop(); // identical to gotoSceneAndStop("<next scene>", 1);
}

Flash MX Differences
This function is implemented in MX as prevScene().

See Also
Scene-based Movie Control
gotoSceneAndPlay(), gotoSceneAndStop(), nextSceneAndPlay(), prevSceneAndPlay() and prevSceneAndStop() .

Frame-based Movie Control
play(), stop(), gotoAndPlay(), gotoAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndPlay(), prevFrameAndStop(), skipFrameAndPlay() and skipFrameAndStop().


Number(expression)

Syntax
Number(expression)

Arguments
expression: The expression to convert to a floating-point number.

Returns
Converted number.

Description
Function: Converts an expression to a floating-point number.
If expression is a string, behaves like parseFloat().
If expression is boolean, returns 1 if true, 0 if false.
If expression is numeric, returns the result of the expression.

Sample
The following examples use the Number function to evaluate various expressions:

trace(Number("-4e3")); // displays -4000
trace(Number(4 + 3)); // displays 7
trace(Number(4 > 3)); // displays 1 (boolean true)
trace(Number("garbage")); // displays 0

Flash MX Differences
Flash supports the concept of NaN, SWiSH returns 0 in these instances.

See Also
parseFloat() and parseInt().


on(mouseEvent)

Syntax
object.on(mouseEvent) {
statements;
}

Arguments
object: The button name.
mouseEvent: One of the defined mouse / keyboard Events.
statements: A list of any valid scripting commands that are executed if the Event has occured.

Description
An Event Handler. Code is executed when the Mouse Event condition applies to the named button.
Unlike onSelfEvent(), the statements executed are with respect to the containing Object.

Sample
Stop Movie playing if button "btnStop" is pressed.

btnStop.on(press) {
this.stop(); // stops continaing sprite. If this button is contained by the main movie (_root.btnStop) then it stops the movie.
}

See Also
dragOut, dragOver, keyPress(key), press, release, releaseOutside, rollOut, rollOver, on() and onSelfEvent().


onChanged()

Syntax
object.onChanged() {
statements;
}

Arguments
object: A Text Object.
statements: A list of any valid scripting commands that are executed if the Event has occured.

Description
An Event Handler. Code is executed when the text changes.
Note that Event statements assume that "this." is the containing Object.

Sample
Make the Text Field y scale bigger after each character is typed. This assumes an Input Text Field Object named txtInput:

txtInput.onChanged() {
txtInput._yscale += 10;
}

See Also
Text Field Object


onEnterFrame()

Syntax
onEnterFrame() {
statement(s);
}

Arguments
None.

Returns
Nothing.

Description
This Event Handler Function is called at the start of each Frame. The Actions associated with the Event are processed before any Frame Actions that are attached to the affected Frames.

This Event Handler is an ideal place to install collision detection routines for games, etc.

Sample
s1, s2 are both Sprites. Below is the scripting for Sprite s1. Debug trace is generated on transition.

onEnterFrame() {
blIsNear = _root.s2.isNearThis();
if (blIsNear != blIsNearLast) {
// we have moved to or from is Near condition
trace("x=" + _X + " y=" + _Y + " isnear=" + blIsNear);
}
blIsNearLast = blIsNear;
}

onLoad () {
blIsNearLast = false; // initialise boundary condition
}

onSelfEvent (press) {

this.startDragLocked(); // when Object is clicked on, start mouse drag
}
onSelfEvent (release) {

stopDrag(); // when Object is released, stop mouse drag
}


onFrame(frame)

Syntax
[spritename.] onFrame(frame) {
statement(s);
}

Arguments
spritename: The optional Sprite name containing the Frame.
frame: The Frame number when the statements are to be executed.

Returns
Nothing.

Description
This Event Handler function is called when the playhead moves to the specified Frame.

Sample
Stop the Movie on the 10th Frame of the current Scene.

onFrame (10) {
stop();
}


onLoad()

Syntax
onLoad() {
statement(s);
}

Arguments
None.

Returns
Nothing.

Description
This Event Handler function is called when the Scene / Sprite / Object is loaded.
This function is useful for defining boundary (initial) conditions and initialising variables.

Note: Commands that affect the play order of other Sprites / Objects may yield unpredictable results, as the exact order of loading is not defined

Sample
onLoad() {
mydebug = 0; // define and initialise variable
this._vx = 10; // set initial velocity
}


onSelfEvent(mouseEvent) +

Syntax
object.onSelfEvent(mouseEvent) {
statements;
}

Arguments
object: The Sprite / Object / button / Text Field name.
mouseEvent: One of the defined Mouse / keyboard Events.
statements: A list of any valid scripting commands that are executed if the Event has occured.

Description
An Event Handler. Code is executed when the Mouse Event condition applies to the named Object.

Sample
Make the Object 'square' bigger when the mouse is rolled over it.

square.onSelfEvent(rollOver) {
this._xscale += 10;
this._yscale += 10;
}

// return to nomal size when mouse moves away
square.onSelfEvent(rollOut) {
this._xscale -= 10;
this._yscale -= 10;
}

Flash MX Differences
This function is not implemented in Flash MX.

See Also
dragOut, dragOver, keyPress(key), press, release, releaseOutside, rollOut, rollOver, on() and onSelfEvent().


ord

Syntax
ord(char)

Arguments
char: Character or string.

Returns
The ascii code of the 1st character.

Description
String function. Converts characters to ASCII code numbers.

Sample
myVar = ord("AB"); // myVar now contains 65, the ASCII code for 'A'

See Also
chr and String.charCodeAt().


parseFloat(string)

Syntax
parseFloat(string)

Arguments
string: The string to read and convert to a floating-point number.

Returns
Nothing.

Description
Function: Converts a string to a floating-point number. The function reads, or 'parses', and returns the numbers in a string until it reaches a character that is not a part of the initial number. If the string does not begin with a number that can be parsed, parseFloat returns NaN (not a number). White space preceding valid integers is ignored, as are trailing non-numeric characters.

Sample
The following examples use the parseFloat function to evaluate various types of numbers:

trace(parsefloat("-4.9")); // displays -4.9
trace(parsefloat("-4e3")); // displays -4000
trace(parsefloat("-4.9stuff")); // displays 0
trace(parsefloat("garbage")); // displays 0

Flash MX Differences
Flash supports the concept of NaN, SWiSH returns 0 in these instances.

See Also
parseInt() and Number().


parseInt(string)

Syntax
parseInt(expression)

Arguments
expression: A string to convert to a integer.

Returns
An integer.

Description
Function: Converts a string to an integer. If the specified string in the Arguments cannot be converted to a number, the function returns 0. All strings are assumed to be base 10.
If the string represents a floating-point number, that number is truncated.

Sample
The following examples use the parseInt function to evaluate various types of numbers:

parseInt("3.5")
// returns 3

parseInt("-3.5")
// returns -3

parseInt("bar")
// returns 0

parseInt("4foo")
// returns 4

Flash MX Differences
In Flash MX this function supports different input radix (bases) via an optional parameter.
Flash supports the concept of NaN, SWiSH returns 0 in these instances.

See Also
parseFloat(), parseInt()


PI

Alternate syntax for Math.PI.


play

Syntax
[object.]play()

Arguments
object: Sprite / Object that the play command applies to.

Returns
Nothing.

Description
Action and Sprite Method: Moves the playhead forward in the Timeline.

Sample
If new hi score, start the newhiscore Sprite to play.

if (score > hiscore) {
newhiscore.play();
}

See Also
stop(), gotoAndPlay(), gotoAndStop(), gotoSceneAndPlay(), gotoSceneAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndPlay(), prevFrameAndStop(), skipFrameAndPlay() and skipFrameAndStop().


playSound

Syntax
playSound(soundname, dontplayifloaded [, volume, loop, fadein, fadeout, effect])

Arguments
soundname: Name of imported sound (string).
dontplayifloaded: Boolean. If true, don't play sound if it is already playing.
volume: Volume to play sound, 0 to 100% (default = 100).
loop:: After sound has played, loop this many times. default = 1, infinite = 0.
fadein: Boolean. If true, fade in over 1st loop. Default = false.
fadeout: Boolean. If true, fade out during last loop. Default = false.
effect: One of the supported Effect constants, 'None', 'Fade In', 'Fade Out', 'Pan left to right', 'Pan right to left', 'Left channel only' or 'Right channel only'. Default = 'None').

Returns
Nothing.

Description
Defines how a sound should be played.

Sample
On Frame 2, play the sound "chatinvt.wav" 5 times at a max volume of 90%.
Fade in on the first loop, fade out on the last loop. Pan from left to right on each loop.

onFrame (2) {
playSound("ChatInvt.wav",true,90,5,true,true,'Pan Left to Right');
}

See Also
playSound(), stopAllSounds()


prevFrameAndPlay

Syntax
spritename.prevFrameAndPlay()

Arguments
spritename: The name of the Sprite / Movie Clip to be played.

Returns
Nothing.

Description
Action and Sprite Method: Sends the playhead to the previous Frame in a Scene and plays from that Frame.

Sample
onFrame (5) {
this.prevFrameAndPlay(); // continues playing from frame 4
}

See Also
play(), stop(), gotoAndPlay(), gotoAndStop(), gotoSceneAndPlay(), gotoSceneAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndStop(), skipFrameAndPlay() and skipFrameAndStop().


prevFrameAndStop

Syntax
spritename.prevFrameAndStop()

Arguments
spritename: The name of the Sprite / Movie Clip to be played.

Returns
Nothing.

Description
Action and Sprite Method: Sends the playhead to the previous Frame in a Scene and stops at that Frame.

Sample
onFrame (5) {
this.prevFrameAndStop(); // sprite moves playhead to 4th frame and stops.
}

See Also
play(), stop(), gotoAndPlay(), gotoAndStop(), gotoSceneAndPlay(), gotoSceneAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndPlay(), skipFrameAndPlay() and skipFrameAndStop().


prevSceneAndPlay +

Syntax
prevSceneAndPlay()

Arguments
None.

Returns
Nothing.

Description
Action: Sends the playhead to the previous Scene and plays from the first Frame.

Sample
onFrame (10) {
prevSceneAndPlay(); // identical to gotoSceneAndPlay("<previous scene>", 1);
}

Flash MX Differences
This function is not implemented in Flash MX.

See Also
Scene-based Movie Control
gotoSceneAndPlay(), gotoSceneAndStop(), nextSceneAndPlay(), nextSceneAndStop() and prevSceneAndStop() .

Frame-based Movie Control
play(), stop(), gotoAndPlay(), gotoAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndPlay(), prevFrameAndStop(), skipFrameAndPlay() and skipFrameAndStop().


prevSceneAndStop +

Syntax
prevSceneAndStop()

Arguments
None.

Returns
Nothing.

Description
Action: Sends the playhead to the previous Scene and stops at the first Frame.

Sample
onFrame (10) {
prevSceneAndStop(); // identical to gotoSceneAndStop("<previous scene>", 1);
}

Flash MX Differences
This function is implemented in MX as prevScene().

See Also
Scene -based Movie Control
gotoSceneAndPlay(), gotoSceneAndStop(), nextSceneAndPlay(), nextSceneAndStop() and prevSceneAndPlay().

Frame-based Movie Control
play(), stop(), gotoAndPlay(), gotoAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndPlay(), prevFrameAndStop(), skipFrameAndPlay() and skipFrameAndStop().


removeMovieClip

This command is Flash MX-specific. Use removeSprite instead.


removeSprite +

Syntax
spritename.removeSprite()

Arguments
spritename: The target path of the Sprite / Movie Clip to delete.

Returns
Nothing.

Description
Sprite Method: Removes an Instance of a Sprite created with the duplicateSprite() method.

Sample
This example duplicates the existing Sprite, s1, and creates a new Sprite s2 on the same level. The position of both Sprites is adjusted so that they can be seen. To remove the duplicated Sprite, use s2.removeSprite(). The created Sprite, s2 is removed after Frame 12.

onLoad () {
s1.duplicateSprite("s2",1);
s1._X += 50;
s1._Y += 50;
s2._X += 150;
s2._Y += 50;
}

onFrame (12) {
s2.removeSprite(); // remove the duplicated Sprite
}

See also
duplicateSprite


return

Syntax
return;
return expression;

Arguments
expression: Optional parameter that returns string / variable value. If omitted, returns NULL.

Returns
Value defined by the expression.

Description
Allows a user-defined function to return a value.

Sample
function area(p) {
return Math.PI * p * p;
}

See Also
function

Flash MX Differences
It is not possible to return arrays or Objects.


scroll

Syntax
textFieldVariableName.scroll = x

Description
A property that controls the display of information in a Text Field associated with a variable. The scroll property defines where the Text Field begins displaying content; after you set it, the Flash Player updates it as the user scrolls through the Text Field.

The scroll property is useful for directing users to a specific paragraph in a long passage, or creating scrolling Text Fields. This property can be retrieved and modified.

Sample
The following code is attached to an 'Up' button that scrolls the Text Field txt:

on (release) {
txt.scroll = txt.scroll + 1; // scroll to the next line
}

Note:
· This property is not available with simple Text Field Objects
· Property must be an integer value. Consequently smooth scrolling is not possible
· If smooth scrolling is required, it is possible to simulate using Sprites and Sprite masks

See also
maxscroll and Text Field Properties.


setProperty

Syntax
[instance.]setProperty([instancename,] property, value)

Arguments
instancename: The Instance name of a Movie Clip for which the property is being set. This can either be the Instance name (using slash notation) or the _target property. If omitted, the Instance specified by instance is used. If instance is omitted, defaults to 'this'.

property: A property of a Sprite / Movie Clip.

Returns
The specified property value.

Description
Function: Returns the value of the specified property for the Movie Clip instancename.

Sample
moves the object s1 to x = 300 then to x = 100
onFrame ("Scene_1",10) {

setProperty(_root.s1._target, _X, 300);
}

onFrame ("Scene_1",20) {

setProperty("/s1",_X, 100);
}

See Also
getProperty() and setProperty().


skipFrameAndPlay

Syntax
spritename.skipFrameAndPlay(n)

Arguments
spritename: The name of the Sprite / Movie Clip to be played.
n: The number of Frames to be skipped. If n is negative, moves to previous Frames.

Returns
Nothing.

Description
Action and Sprite Method: Sends the playhead ahead n Frames and plays from that Frame.

Sample
onFrame (5) {
this.skipFrameAndPlay(3); // sprite starts playing from 8th frame
}

See Also
play(), stop(), gotoAndPlay(), gotoAndStop(), gotoSceneAndPlay(), gotoSceneAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndPlay(), prevFrameAndStop() and skipFrameAndStop().


skipFrameAndStop

Syntax
spritename.skipFrameAndStop(n)

Arguments
spritename: The name of the Sprite / Movie Clip to be moved.
n: The number of Frames to be skipped. If n is negative, moves to previous Frames.

Returns
Nothing.

Description
Action and Sprite Method: Sends the playhead ahead n Frames and stops at that Frame.

Sample
onFrame (5) {
this.skipFrameAndStop(3); // moves the playhead to the 8th frame.
}

See Also
play(), stop(), gotoAndPlay(), gotoAndStop(), gotoSceneAndPlay(), gotoSceneAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndPlay(), prevFrameAndStop() and skipFrameAndPlay().


Sprite / Movie Clip (Object)

SWiSHscript Sprites are equivalent in concept to Flash 'Movie Clips'.

Sprites support both properties and methods. Events associated with a Sprite are handled by the associated Event Handling routines. Sprites do not support all of the Movie Clips properties and methods. A list of supported items can be found in Movie Clip Methods and Properties.

The property can be accessed via spritename.property, where spritename is the name of the Sprite and property is the property being accessed.

The methods can be applied via spritename.method(), where spritename is the name of the Sprite and method() is the method being applied.

The synonym 'this' can be used to mean the current Sprite / Object where scripting is used within the Sprite.
If the synonym 'this' is omitted, it is assumed when valid property names or methods are specified.

e.g. this._X = 5; is equivalent to _X = 5; if the script is contained within the Sprite Object.


Sprite Properties

Sprites inherit the standard Scripting Object properties.


Sprite Methods

Method | Description
duplicateSprite | Creates an Instance of a Sprite / Movie Clip while the Movie is playing
getURL | This Actions loads a document from the specified URL into a browser window
gotoAndPlay | Sends the playhead to the specified Frame in a Scene and plays from that Frame
gotoAndStop | Sends the playhead to the specified Frame in a Scene and stops at that Frame
loadMovie | Loads a .swf or .jpeg file into the Flash Player while the original Movie is playing
loadVariables | Reads data from an external file, such as a text file or text generated by a CGI script, Active Server Pages (ASP), or PHP, or Perl script and sets the values for variables in a Flash Player level or a target Movie Clip
nextFrameAndPlay | Sends the playhead to the next Frame in a Scene and plays from that Frame
nextFrameAndStop | Sends the playhead to the next Frame in a Scene and stops at that Frame
play | Moves the playhead forward in the Timeline
prevFrameAndPlay | Sends the playhead to the previous Frame in a Scene and plays from that Frame
prevFrameAndStop | Sends the playhead to the previous Frame in a Scene and stops at that Frame
removeSprite | Removes an Instace of a Sprite created with the duplicateSprite() method
skipFrameAndPlay | Sends the playhead ahead n Frames and plays from that Frame
skipFrameAndStop | Sends the playhead ahead n Frames and stops at that Frame
startDragLocked | Makes the target Sprite / Object draggable while the Movie is playing The Sprite / Object is locked to the center of the mouse position
startDragUnlocked | Makes the target Sprite / Object draggable while the Movie is playing. The Sprite / Object is locked to mouse position where the user first pushed the mouse button
stop | Stops the playhead at the current position
unloadMovie | Removes a loaded Movie or a Movie Clip from the Flash Player


Movie Clip Methods and Properties

The list below defines the Movie Clip Methods and Properties that are supported by Sprites.

MovieClip._alpha YES
MovieClip.attachMovie NO
MovieClip.beginFill NO
MovieClip.beginGradientFill NO
MovieClip.clear NO
MovieClip.createEmptyMovieClip NO
MovieClip.createTextField NO
MovieClip._currentframe YES
MovieClip.curveTo NO
MovieClip._droptarget YES (should be on normal mode Menu)
MovieClip.duplicateMovieClip YES (duplicateSprite)
MovieClip.enabled NO
MovieClip.endFill NO
MovieClip.focusEnabled NO
MovieClip._focusrect YES
MovieClip._framesloaded YES
MovieClip.getBounds NO
MovieClip.getBytesLoaded YES
MovieClip.getBytesTotal YES
MovieClip.getDepth NO
MovieClip.getURL NO (support getURL() function)
MovieClip.globalToLocal NO
MovieClip.gotoAndPlay YES
MovieClip.gotoAndStop YES
MovieClip._height YES (should be on normal mode Menu)
MovieClip._highquality YES
MovieClip.hitArea NO
MovieClip.hitTest NO
MovieClip.lineStyle NO
MovieClip.lineTo NO
MovieClip.loadMovie YES
MovieClip.loadVariables YES
MovieClip.localToGlobal NO
MovieClip.moveTo NO
MovieClip._name YES
MovieClip.nextFrame YES
MovieClip._parent YES
MovieClip.play YES
MovieClip.prevFrame YES
MovieClip.removeMovieClip YES (removeSprite)
MovieClip._rotation YES
MovieClip.setMask NO
MovieClip._soundbuftime YES
MovieClip.startDrag YES (startDragUnlocked/Locked)
MovieClip.stop YES
MovieClip.stopDrag NO (support stopDrag() function)
MovieClip.swapDepths NO
MovieClip.tabChildren NO
MovieClip.tabEnabled NO
MovieClip.tabIndex NO
MovieClip._target YES
MovieClip._totalframes YES
MovieClip.trackAsMenu NO
MovieClip.unloadMovie YES
MovieClip._url YES (should be on normal mode Menu)
MovieClip.useHandCursor NO
MovieClip._visible YES
MovieClip._width YES (should be on normal mode Menu)
MovieClip._x YES
MovieClip._xmouse NO (emulated with global variable)
MovieClip._xscale YES
MovieClip._y YES
MovieClip._ymouse NO (emulated with global variable)
MovieClip._yscale YES


SQRT1_2

Alternate syntax for Math.SQRT1_2.


SQRT2

Alternate syntax for Math.SQRT2.


startDrag

Supported in Flash MX, though not supported in SWiSH. Use startDragLocked() and startDragUnlocked() instead.


startDragLocked +

Syntax
target.startDragLocked([left, right, top, bottom])

Arguments
target: The name of the Object / Sprite to be dragged. If omitted, the default is 'this'.
The optional Arguments, left, right, top and bottom, if specified, define a bounding region for the Sprite. The co-ordinates are specified relative to the Sprite's parent.

Returns
Nothing.

Description
This Sprite Method makes the target Sprite / Object draggable while the Movie is playing. Only one Sprite / Object can be dragged simultaneously.

The Sprite / Object is locked to the center of the mouse position.

Dragging continues until a stopDrag Action is called or startDragLocked or startDragUnlocked is applied to a different Sprite / Object.

Flash MX Differences
This function is implemented in MX as startDrag().

Sample
Make Object draggable while mouse is pressed:

onSelfEvent (press) {

this.startDragLocked();
}
onSelfEvent (release) {

stopDrag();
}

See Also
startDragLocked(), startDragUnlocked() and stopDrag().


startDragUnLocked +

Syntax
target.startDragUnlocked([left, right, top, bottom])

Arguments
target: The name of the Object / Sprite to be dragged. If omitted, the default is 'this'.
The optional Arguments, left, right, top and bottom, if specified, define a bounding region for the Sprite. The co-ordinates are specified relative to the Sprite's parent.

Returns
Nothing.

Description
This Sprite Method makes the target Sprite / Object draggable while the Movie is playing. Only one Sprite / Object can be dragged simultaneously.

The Sprite / Object is locked to mouse position where the user first pushed the mouse button.

Dragging continues until a stopDrag Action is called or startDragLocked or startDragUnlocked is applied to a different Sprite / Object.

Flash MX Differences
This function is implemented in MX as startDrag().

Sample
Make Object draggable while mouse is pressed:

onSelfEvent (press) {
this.startDragUnlocked();
}
onSelfEvent (release) {
stopDrag();
}

See Also
startDragLocked(), startDragUnlocked() and stopDrag().


stop

Syntax
[object.]stop()

Arguments
object: Sprite / Object that the stop command applies to.

Returns
Nothing.

Description
Action or Sprite Method: Stops the playhead at the current position.

Sample
intro.stop(); // stops the Sprite intro from playing
_root.stop(); // stop the main Timeline

See Also
play(), stop(), gotoAndPlay(), gotoAndStop(), gotoSceneAndPlay(), gotoSceneAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndPlay(), prevFrameAndStop(), skipFrameAndPlay() and skipFrameAndStop().


stopAllSounds

Syntax
stopAllSounds()

Arguments
None.

Returns
Nothing.

Description
Action: Stops all currently playing sounds. Does not stop the Movie. Sounds set to stream will resume playing as the playhead moves over the Frames they are in.

Sample
stopAllSounds(); // stops all sounds in the Movie

See Also
playSound() and stopAllSounds().


stopDrag

Syntax
stopDrag()

Arguments
None.

Returns
Nothing.

Description
This Action stops the current Drag Action.
As only one simultaneous Drag Action is permitted, the target Sprite / Object is implied.

Sample
Make Object draggable while mouse is pressed, stop dragging when mouse is released.

onSelfEvent (press) {
this.startDragLocked();
}

onSelfEvent (release) {
stopDrag();
}

See Also
startDragLocked(), startDragUnlocked() and stopDrag().


String(expression)

Syntax
String(expression)

Arguments
expression: An expression to convert to a string.

Returns
String representing the expression.

Description
This function returns a string representation of the specified parameter as follows:

· If expression is a boolean value, the return string is "1" or "0", ("1" == true).
· If expression is a number, the return string is a text representation of the number.
· If expression is a string, the return string is expression.

Samples
String(4 > 3); // returns "1"
String(_root.s1._target); // returns "/s1"
String(44.3); // returns "44.3"


String (Object)

With all of the following methods, note that the 1st character in the string is at position '0'.

Some of the methods listed are of the form 'String.method()' whereas others are 'myString.method()'.

The methods listed as myString.method() will work with any string variable wheras methods listed as 'String.method()' are associated with the Class Object 'String' and will simply return a value (similar to Math.method()).

Methods available with the String Object can be selected from the list below.

tempstrings


String.charAt(position)

Syntax
myString.charAt(index)

Arguments
index: The number of the character in the string to be returned. The first character is at index position 0.

Returns
The character at the specified index.

Description
Method: Returns the character in the position specified by the parameter index. The index of the first character in a string is 0. If index is not a number from 0 to string.length - 1, an empty string is returned.

Sample
onLoad () {
i = 0;
t1 = $version;
trace(t1);
do {
trace(t1.charat(i));
} while (i++ < t1.length());
}


String.charCodeAt(position)

Syntax
myString.charCodeAt(index)

Arguments
index: The number of the character in the string to be returned. The first character is at index position 0.

Returns
The character code at the specified index.

Description
Method: Returns the character code of the character in the position specified by the parameter index. The index of the first character in a string is 0. If index is not a number from 0 to string.length - 1, 0 is returned.

The character code is an integer from 0 to 65535.

Sample
onLoad () {
i = 0;
t1 = $version;
trace(t1);
do {
trace(t1.charCodeAt(i));
} while (i++ < t1.length());
}

See Also
ord


String.concat(string)

Syntax
myString.concat(value1,...valueN)

Arguments
value1,...valueN: Zero or more values to be concatenated.

Returns
Concatonated string. Original string is unchanged.

Description
Method: Combines the value of the String Object with the Arguments and returns the newly formed string; the original value, myString, is unchanged.

Sample
onLoad () {
str = "test2";
trace(str.concat("hi","this", 4 > 3, "more")); // returns "test2hithis1more"
trace (str); // returns "test2"
}


String.fromCharCode(ascii)

Syntax
String.fromCharCode(c1,c2,...cN)

Arguments
c1,c2,...cN: Decimal integers that represent ASCII values.

Returns
String made up of characters assembled from the ASCII codes.

Description
Method: Returns a string made up of the characters represented by the ASCII values in the Arguments.

Sample
str = String.fromCharCode(60,61,62,63,64);
trace(str); // returns the string "<=>?@"

Note: str.fromCharCode() is not valid


String.indexOf(substring [,start])

Syntax
myString.indexOf(substring, [startIndex])

Arguments
substring: An integer or string specifying the substring to be searched for within myString.
startIndex: An integer specifying the starting point in myString to search for substring. This parameter is optional.

Returns
Returns the index of the first occurance of the specified substring.

Description
Method: Searches the string and returns the position of the first occurrence of the specified substring. If the value is not found, the method returns -1.

Sample
onLoad () {

str = "abcdefgbc";
trace (str.indexof("bc")); // returns 1, position of "bc"
trace (str.indexof("bd")); // returns -1, not found
trace (str.indexof("bc",3)); // returns 7, second occurance
trace (str.indexof("cd",4)); // returns -1 as "cd" exists before index 4
trace (str);
}


String.lastIndexOf(substring [,start])

Syntax
myString.lastindexOf(substring, [startIndex])

Arguments
substring: An integer or string specifying the substring to be searched for within myString.
startIndex: An integer specifying the starting point in myString to search for substring. This parameter is optional. 0 represents the first character of the string.

Returns
Returns the index of the first occurance of the specified substring.

Description
Method: Searches the string from right to left and returns the position of the first found (last in string) occurrence of the specified substring. If the value is not found, the method returns -1.

Sample
onLoad () {

str = "abcdefgbc";
trace (str.lastindexof("bc")); // returns 7, (last position of "bc")
trace (str.lastindexof("bd")); // returns -1, not found
trace (str.lastindexof("bc",3)); // returns 7, (last position of "bc")
trace (str.lastindexof("cd",3)); // returns 2, found because 'd' of "cd" is at 3. See note below.
trace (str.lastindexof("cd",4)); // returns -1 as "cd" exists before index 4
trace (str);
}

Note: As search is from right to left, returns position before startIndex as start of string (on right to left basis) started after startIndex


String.length()

Syntax
myString.length()

Arguments
None.

Description
Property: Returns the number of characters in myString.

Sample
str = "abc";
trace(str.length()); // returns 3


String.slice(start,end)

Syntax
myString.slice(start [, end])

Arguments
myString: The string variable.

start: A number specifying the index of the starting point for the slice. If start is a negative number, the starting point is determined from the end of the string, where -1 is the last character. 0 represents the first character.

end: A number specifying the index of the ending point for the slice. If end is not specified, the slice includes all characters from start to the end of the string. If end is a negative number, the ending point is determined from the end of the string, where -1 is the last character.

Returns
Substring specified by start, end Arguments.

Description
Method: Extracts a slice, or substring, of the specified String Object; then returns it as a new string without modifying the original String Object. The returned string includes the start character and all characters up to (but not including) the end character.

Sample
onLoad () {
str = "abcdefgbc";
trace ("[" + str.slice(3,6) + "]"); // returns [def]
}


String.substr(start [,length])

Syntax
myString.substr(start [, length])

Arguments
start: An integer. The postion of 1st character in myString to form substring. If start is a negative number, the starting position is determined from the end of the string, where the -1 is the last character.
length: An optional integer. The number of characters in the substring being created. If length is not specified, the substring includes all of the characters from the start to the end of the string.

Returns
The substring defined by start, length.

Description
Method: Returns the substring formed from the characters in a string from the index specified in the start parameter through the number of characters specified in the length parameter. The substr method does not change the string specified by myString, it returns a new string.

Sample
onLoad () {

str = "abcdefgbc";
trace (str.substr(3,3)); // returns "def"
trace (str); // returns "abcdefgbc"
}


Synonyms

Various synonyms are used to refer to commonly used references. This use of synonyms can simplify scripting.


Object Reference

Various synonyms can be used when referring to an Object or Sprite.

The _parent, _root and this synonyms are supported.


Scene Name

The following synonyms are recognized by the gotoSceneAndPlay() and gotoSceneAndStop() functions.

Synonym | Meaning
<current scene> | Use current Scene
<first scene> | Move to first Scene in Movie
<last scene> | Move to last Scene in Movie
<next scene> | Move to next Scene in Movie
<previous scene> | Move to previous Scene in Movie


TAB

Syntax
TAB

Description
Property: Constant associated with the key code value for the Tab key (9).


tellTarget

Syntax
tellTarget(object) {
statement(s);
}

Arguments
object: An Instance of an Object or Sprite.
statement(s): An Action or group of Actions enclosed in curly brackets {...}.

Returns
Nothing.

Description
Action: Allows you to specify an Object (such as a Movie Clip) with the Object parameter. The statements within the tellTarget curly brackets are applied to that Object. This prevents you from having to repeatedly write the Object's name or the path to the Object.

Sample
Consider a Sprite _root.s1. Sprite properties can be accessed from other Sprites or from the root level via the following code:

tellTarget (_root.s1) {
_X += 10; // same as _root.s1._X += 10
_alpha = 40; // same as _root.s1._alpha = 40
}

Note: In Flash the Object is a either a string containting a target OR a target reference. In SWiSH, it is always a target reference. If you want to use a string variable then enclose it in parentheses, as shown below:

who = "mysprite";
telltarget((who)) {
stop(); // same as mysprite.stop();
}

If you do not use the parentheses around the variable name, it will be treated as a target name instead. In the above example, if you did not put the extra parethesis around the variable name you would get this:

who = "mysprite";
telltarget(who) {
stop(); // same as who.stop();
}

See Also
with


text

Syntax
TextField.text

Description
Property: Indicates the current text in the Text Field. Lines are separated by the carriage return character ('\r', ASCII 13). This property contains the normal, unformatted text in the Text Field, without HTML tags, even if the text field is HTML.

This property allows access to the text of a Script Text Field Object.

Sample
txt.text = "this is new text"; // change the text in txt to be "this is the new text"

See Also
Text Field Properties


TextField (Object)

Dynamic Text Objects can either be a Simple Text Field Object or a Script Text Field Object.


Simple Text Field Object

These are created when Dynamic (or Input) Text is selected and the 'Target' checkbox is left unchecked.
A variable of the same name as the Text Object is automatically created for these Objects.

scriptingsimpletext
Text can be read and written to and from the Text Field via the associated variable of the same name.

Sample
trace(txtsimple); // displays "simple text object" the default text
txtsimple = "this is some different text"; // assigns new text to the Text Object

No other Text Field properties are available, e.g. txtsimple._X is not defined.


Script Text Field Object

These are created when Dynamic (or Input) Text is selected and the 'Target' checkbox is checked.

scriptingnormaltext

Text Objects created in this way have all of the properties and methods that are described for the Text Field Object.

Access to and from the text is via the .text property.
e.g. txtnormal.text returns the current text, txtnormal.text = "new text" sets the text.

Access to and from the text can also be via an associated variable (See the Advanced Panel). The associated variable must have a different name to that of the Object.


TextField Properties

In addition to the Scripting Properties, Text Fields have the following additional properties.

Property | Read Only | Physics Property | Description
TextField.maxscroll | yes | no | Indicates the line number of the top-most visible line of text in a Text Field when the bottom-most line in the field is also visible
TextField.scroll | no | no | Controls the scrolling of information in a Text Field associated with a variable
TextField.text | no | no | Allows access to the text associated with the Object


TextField Events

Apart from the standard Events associated with any Scripting Object, Text Field Objects can use the onChanged() Event.


this

Syntax
this.property
this.property = value

Arguments
property: Any property of the current Object.
value: New value of the property.

Description
Synonym for the current Sprite / Movie Clip / Object that contains this script element.
An Event Handler for the Object can use this synonym to access any property associated with the Object that called the method.

This is extremly useful when Instances of a Sprite / Movie Clip are made. If the Sprite makes reference to this (rather than via Object name) then each Instance will be self-contained and independant.

Sample
this.stop(); // stop the current Sprite / Movie Clip

See Also
_parent and _root.


Timer.ticks()

Syntax
Timer.ticks

Arguments
None.

Returns
Milliseconds since the Movie started.

Description
Function: Returns the number of milliseconds that have elapsed since the Movie started playing.
Can be used to provide accurate timing between Events that are not dependent on the Frame Rate.

Sample
onFrame ("Scene_1",20) {
trace (timer.ticks()); // displays number around 1025 (frame rate was 20 fps)
}


toggleHighQuality

Syntax
toggleHighQuality()

Arguments
None.

Returns
Nothing.

Description
Action: Turns anti-aliasing on and off in Flash Player. Anti-aliasing smooths the edges of Objects and slows down the Movie playback. The toggleHighQuality Action affects all Movies in the Flash Player.

Sample
The following code could be applied to a button that, when clicked, would toggle anti-aliasing on and off:

on(release) {
toggleHighQuality();
}

See also
_highquality


trace(expression)

Syntax
trace(expression)

Arguments
expression: Can be numbers, strings or variables.

Returns
Nothing.

Description
The result of the expression is displayed in the 'Debug' window. Syntax errors in the script will disable all Debug display.


true

Syntax
true

Description
A unique boolean value that represents the opposite of false.


unloadMovie

Syntax
spritename.unloadMovie()

Arguments
spritename: Name of the Sprite / Movie Clip that is removed.

Returns
Nothing.

Description
Action or Sprite Method: Removes a loaded Movie or a Movie Clip from the Flash Player.

Sample
In the following unloadMovie statement to the onLoad Event of a Sprite, the Movie previously in Sprite1 is unloaded.

onLoad () {
sprite1.unloadMovie(); // unload Sprite 1
}

Note: The above script must be tested using the test in player or test in browser feature

See also
loadMovie, loadMovieNum, unloadMovie, unloadMovieNum, loadVariables and loadVariablesNum.


unloadMovieNum

Syntax
unloadMovieNum(level)

Arguments
level: The level of the Movie to be unloaded.

Returns
Nothing.

Description
Action: Removes a loaded Movie or a Movie Clip from the Flash Player.

Sample
unloadMovie(5); // unload Movie that was resident in level 5.

See also
loadMovie, loadMovieNum, unloadMovie, loadVariables and loadVariablesNum.


variable(string)

Syntax
1. variable(string); or
2. variable(string) = expression;

Arguments
string: A string containing the name of a variable.
expression: Any valid expression.

Returns
Value of the variable defined by the string (mode 1).

Description
1. Function: Accesses variables, by name. If the expression is a variable or a property, the value of the variable or property is returned. In this mode it is equivalent to eval().

2. Function: Allows the variable specified within the string to be assigned the value defined by the expression.

Sample
The following example uses the eval function to determine the value of the expression "piece" + x. Because the result is a variable name, piece3, the eval function returns the value of the variable and assigns it to y:

Item5 = "test";
x = 5;
y = variable("Item" add x);
trace(y); // Output: test this demonstrates function 1
variable(Item5) = "hi"
trace(test); // output: "hi", new variable test is created. This demonstrates function 2


void

Syntax
void

Description
Evaluates the expression, but ignores the result. It is included only for compatibility with Flash ActionScript.


while

Syntax
while (condition) {
statements;
}

Arguments
statements: The statements that are to be executed while the condition is true.
condition: An expression that evaluates to a boolean value.

Returns
Nothing.

Description
This Action executes and repeats while the condition remains true. If the condition is initially false, no statements are executed.

Sample
onLoad () {
a = 1;
while (a++ < 5) {
trace(a);
}
}

The above example writes the numbers 2 3 4 5 to the 'Debug' window.

See Also
do...while and for.


with

'with' in Flash is identical to tellTarget in SWiSHmax.

Note: In Flash, a 'with' statement does not apply statements to the target. Instead, whenever you refer to a variable, method, or Clip by name, the nominated Object is searched first. If no corresponding name is found, then the search continues the same as outside the 'with'. For example:

with (xxx) {
with (yyy) {
zzz = 10;
}
}

This will search the yyy Object for a variable called zzz. If it is found, it will set if to 10, if not, then it will search the xxx Object for variable 'zzz', etc.

See Also
tellTarget


Useful Stuff

This section includes some standard mathematical forumulas that may be useful. These formulas can often be used to expand the power of the Math Object.


Converting Log Base

If the logarithm of a different base is required, use the following formula:

logN(x) = ln(x)/ln(N)

e.g. To calculate the log10(5) use Math.log(5) / Math.log(10) (note Math.log() is ln()).

To calculate x^y (here ^ represents power operator).

x^y = e ^ (y * ln(x)) where e is the base of the natural logarithm.

e.g. To calculate 10 ^ 2 use Math.exp(2 * Math.log(10)) .
Note Math.exp() is e ^ n.

To calculate the square root of a number, use x^y where y = 1/2 or 0.5.
e.g. Math.exp(0.5 * Math.log(3)) returns the square root of 3.


User Interface

When SWiSHmax is first started, it displays a Start Up Menu to allow selection of common tasks. After the Start Up Menu has been used or closed, the following interface is visible.

The SWiSH User Interface is made up of the following components:

· Main Menu
· Toolbox
· Toolbars including the Standard, Insert and Control Toolbars
· Panels including the Timeline, Outline, Layout and Text Panels
· Status Bar.

Each of these features are indicated in the illustration below. ((indicate Timeline panel??))
userinterface


Main Menu

The Main Menu is located at the top of the 'SWiSHmax application' window. From here you can select commands and options. You can also access many of the Main Menu commands and options from the Toolbars.

The Menus are:
· File
· Edit
· View
· Insert
· Modify
· Control
· Tools
· Panels
· Help.

To describe pathways through the Menu system, the '|' character is used to indicate a selection on the next level of the Menu system.
For example, File | Open... means the command can be accessed by selecting File from the Main Menu and then Open from the Submenu.

Shortcut keys shown as (key sequence) allow direct access to the command.
For example, File | Open... (Ctrl + O) means the command can also be accessed by pressing the Control and O keys simultaneously.

If the command is available from a Toolbar, the associated icon is shown.


File Menu

The File Menu enables you to work with .swf files and Movies as a whole.

The available options are as follows:

Manage .swi files
· newmovie New
· openmovie Open...
· savemovie Save
· Save As...

Templates
· New from Template
· Save as Template

Create a new 'application' window
· New Window

External files and testing
· Samples
· Import...
· Export
· Test

Recent files
· Recent Files

Closing windows and exiting
· Close
· Exit.


New

newmovie File | New (Ctrl+N)
Creates a new SWiSH Movie. If you already have a Movie open, SWiSH will ask you if you want to save it before closing the current Movie and creating a new one.


Open

openmovie File | Open... (Ctrl+O)
Opens a .swi (SWiSH Movie) file.

You can also use File | Open to create a new SWiSH Movie ((to import a specified file into??)) into which the file you specify imported. To do this, choose a file with a type and extension that is supported by File | Import.

filemenuopen

Show Preview
A preview of the currently selected .swi, .swf or image file is provided to allow you to see the Movie or image before opening it.

Note:
· SWiSH cannot open .fla files because it is not a public format
· If you want to open an existing .swf file and do not have the corresponding .swi file, use File | Import to import it into the current Movie


Save

savemovie File | Save (Ctrl+S)
Saves the current SWiSH Movie. If it is a new Movie, SWiSH will ask you for a name. There is no need to type in the .swi extension.

If the Auto Export option is set, every time you save your .swi file you will be prompted to save a corresponding .swf file. This way, the Save command also automatically saves a new .swf file for the Movie.


Save As

File | Save As...
Saves the current SWiSH Movie under a new name. There is no need to type in the .swi extension.


New from Template

File | New from Template...
Creates a new SWiSH Movie based on a Template Movie. If you already have a Movie open, SWiSH will ask you if you want to save it before closing the current Movie and creating a new one.

See Templates for more information on using Templates in your SWiSH Movies.


Save as Template

File | Save as Template...
Saves the current .swi file to the template area as a template .swi.

See Templates for more information on using Templates in your SWiSH Movies.


New Window

File | New Window (Ctrl+Shift+N)
Opens a new 'SWiSH application' window. You can create or edit different SWiSH Movies in different windows. This allows you to copy objects from one Movie and paste to another.


Samples

File | Samples
The Samples Menu contains a list of sample .swi Movies to illustrate some of the potential of SWiSHmax.

The following examples are included in the Samples folder and many more samples are available at http://www.swishzone.com/movies.php.

Snakes.swi
This example was produced by Roger Onslow to illustrate the many Effect variations possible using the Snake Effect in SWiSHmax. A study of the settings used in each of these variations will assist you in understanding what they do. It also includes, as a bonus, Scenes which demonstrate a Radarscope Effect and a Spotlight Effect produced with a masked Sprite and three vector objects.

Pseudo3D.swi
This example, produced by Dawn Barrie, also shows some variations on the Snake Effect, but uses the gradient fill properties of vector objects to show how a pseudo 3D Effect can be produced. It also demonstrates an Explode Effect applied to a 'sheet of glass' (a group of vector shapes).

Ray of Light.swi
This example was also produced by Dawn Barrie, to illustrate the use of vector shapes and gradient fills to produce the Effect of light beaming out from, and sweeping across, the letters of a word.

Spritedemo.swi
This example was produced by David Petley to illustrate the use of masked Sprites. An inspection will show the use of Sprites within Sprites.

Actions.swi, Buttons.swi, First.swi
The Actions, Buttons and First samples are used in the tutorials.

Three other examples from SWiSH v1.5 are also included. They illustrate some basic techniques.

Promo.swi
The demonstrates how Text Effects, including Squeeze, Scale and Wave, are simply and effectively applied.

Preloader.swi
This is a basic preloader. SWiSHmax provides more preload options, but this shows the basics.

Menu.swi
This example shows how easy it can be to apply Mouse Events to Text Objects and, although this only shows the Goto URL Action, there are many other Actions that can be applied.


Import

File | Import...
Imports an external file into the current Scene. Multiple files may be selected for importing by holding the Shift or Ctrl key while selecting. SWiSH currently supports the following formats:

Text
· Plain text (*.txt)

Images (raster)
· Windows bitmap (*.bmp; *.dib)
· GIF image (*.gif)
· JPEG image (*.jpg; *.if, *.jpeg)
· PNG image (*.png)

Graphics (vector)
· Windows Metafile (*.wmf)
· Enhanced Metafile (*.emf)
· Flash Graphics (*.swf both compressed and uncompressed)

Animation
· Animated GIF (*.gif)
· Flash Animation (*.swf both compressed and uncompressed)
· Flash Projector (*.exe)
· SWiSH Movie (*.swi)

Flash Animation
When importing a Flash Animation (*.swf) file, SWiSHmax does not import any sounds, morph shapes, external video streams or Flash clip events. Clipping (mask) layers are imported, but are not automatically set as a Mask Object in SWiSHmax. The following Actions are imported, all other Actions are ignored:
· setLabel
· play
· stop
· gotoAndPlay
· gotoAndStop
· stopAllSounds
· nextFrame
· prevFrame
· getURL
· fscommand
· javascript
· mailto
· loadMovie
· if frame loaded
· var = expression
· _property = expression.

Sound
· Wave sounds (*.wav)
· MP3 sounds (*.mp3)

Note:
· When importing a sound, SWiSHmax will add a Play Sound Action that will play the sound to the current Frame of the current Scene or Sprite
· MP3 sounds are imported without SWiSHmax processing it, so external programs can be used for optimum compression or quality

Import Frames
The 'Import Frames' dialog box appears when you import an animation. With this dialog box, you can select the Frames you want to import.

importframes

Select All Frames button
To select all Frames in the Frame list.

Import background
The background rectangle will be imported if this option is checked.

Import as a Sprite
The selected Frames will be imported as a Sprite if this option is checked. Otherwise, the selected Frames will be imported as a group of pictures.

Masked
The imported Sprite will be masked by the background rectangle if this option is checked.

Show File Information...
Displays the details of the file to be imported.

details


Export

exportswf File | Export | SWF... (Ctrl+E)
Exports the current SWiSH Movie to a .swf file. You can import the .swf file into Flash by choosing File | Import and selecting Files of Type: Flash Player (*.swf, *.spl) on the 'Flash Import' dialog box. See the tutorial on Importing a SWiSH Movie into Flash.

exporthtml File | Export | HTML + SWF... (Ctrl+P)
Creates an .htm and .swf file for uploading to your web site. Both the .htm and .swf files will have the name you enter on the 'Publish SWiSH Movie' dialog box.

Note: Once these files have been created, simply upload to your web server (using FTP or similar). That's it. No other files are necessary to play your SWiSH Movie over the internet. See the section Publishing SWiSHmax Files for more information on uploading files to the web

exportexe File | Export | EXE (projector)...
Exports the current SWiSH Movie to a Flash Player 6 projector executable. This allows you to show your Movie without any external program or browser. See Creating an Auto Run CD for information on how to create a CD that will automatically show your Movie when a CD containing the projector is inserted into the CD Drive.

exportavi File | Export | AVI... (Ctrl+D)
Exports SWiSH Movies in the .avi video format. Actions (except sounds), buttons and other interactive components are excluded.

Note: During the export process, the 'SWiSH main application' window will be minimized. The export process is done in two stages: capturing audio and recording data. During capturing audio:
· make sure your computer is not running a heavy process, as this will affect the quality of the exported audio
· Do not press the 'Cancel' button and then 'Continue' otherwise the exported audio might be out of synchrony

File | Export | HTML to Clipboard
Copies the HTML code for embedding the .swf file to the Clipboard. If you wish to insert your Flash Movie into an existing web page, just paste the code in the Clipboard into your existing web page. The HTML code does not include any scripting functions.

Display Export Options
Displays the 'Export' Panel allowing access to the Export options of each export file type.


Test

testplayer File | Test | In Player
Creates a temporary .swf file, launches the Flash Player and plays the current SWiSH Movie in the Flash Player.

Note:
· If the stand-alone Flash Player is not detected on your system, a projector executable is used installed with SWiSHmax
· You can also use this to create a stand-alone projector .exe file. Use File | Test | In Player, then select File | Create Projector from within the Flash Player

testbrowser File | Test | In Browser
Creates temporary .htm and .swf files, launches the default browser and displays the HTML page containing the Movie in the browser.

Note: You must have at least one browser associated with .htm files

File | Test | Report
Displays the details of the Movie to be exported.

details


Recent Files

Below the Test Menu item and above the Close Menu item, you will see a list of the four most recently used files. Select any of these Menu options to open the file.


Close

File | Close (Ctrl+F4)
Closes the current SWiSH Movie. The 'application' window for the current SWiSH Movie will be closed, unless it is the only 'SWiSH application' window left open, in which case this has the same effect as File | New. File | Close will never shut down the last 'SWiSH application' window.


Exit

File | Exit
Exits the SWiSH application. All 'SWiSH' windows will be closed.


Edit Menu

The Edit Menu enables you to make changes to a Movie.

The available options are as follows:

Undo or Redo changes
· undo Undo
· redo Redo

Copy, Paste and Delete Scene, Object, Effects, etc.
· cut Cut
· copy Copy
· paste Paste
· delete Delete

Object Selection
· Select All
· Deselect All

Search
· find Find

Create an Instance of a selected Sprite
· makeinstance Make Instance

For showing or hiding Objects
· Show
· Hide
· Lock
· Show All States
· Hide All Except
· Lock All Except

· Open Object
· Expand Object
· Close Object

Show the properties of an Object, Effect, etc.
· Properties

Preferences
· Preferences.


Undo

undo Edit | Undo (Ctrl+Z)
To Undo the last change made to the current SWiSH Movie. SWiSH supports unlimited Undo/Redo commands. Almost all changes can be undone.


Redo

redo Edit | Redo (Ctrl+Y)
To Redo the last change made to the current SWiSH Movie. SWiSH supports unlimited Undo/Redo commands. Almost all changes can be redone.


Cut

cut Edit | Cut (Ctrl+X)
Deletes the currently selected Object or Effect and copies it to the Clipboard. If no Effect is selected the Object will be copied.


Copy

copy Edit | Copy (Ctrl+C)
Copies the currently selected Object, Effect or Scene to the Clipboard. The selected Object, Effect or Scene is not deleted. If no Effect is selected, the Object will be copied.


Paste

paste Edit | Paste (Ctrl+V)
Pastes the Object, Effect or Scene in the Clipboard to the current SWiSH Movie. If an Object is being pasted, it is added to the current Scene/Sprite/Button State/Group in the center of the Movie at the top of the stacking order. If an Effect is being pasted, it is inserted at the current Frame of the selected Object or selected group of Objects. If a Scene is being pasted, it is inserted after the currently selected Scene in the Movie.


Delete

delete Edit | Delete (Delete)
Deletes the currently selected Object or Effect.


Select All

Edit | Select All (Ctrl+A)
Selects all Objects in the current Scene.


Deselect All

Edit | DeSelect All (Ctrl+A)
Deselects all Objects in the current Scene.


Find

find Edit | Find
Lets you search for text in your Movie including in all Actions, script, sounds image file and Effect file names.


Make Instance

makeinstance Edit | Make Instance
Creates an Instance of the selected Sprite. An Instance is a clone of a reference Sprite. The contents of the Instance and its reference Sprite are always consistent. Making changes to the Instance will also change the reference Sprite and vice versa.

Note: The selected Sprite must have a name or must itself be an instance of another Sprite


Show

Edit | Show
Shows the selected Object(s). The Object can also be selected from the Outline Panel.


Hide

Edit | Hide
Hides the selected Object(s). However, hidden Objects will still appear when the Movie is played. The Object can also be hidden via the Outline Panel.


Lock

Edit | Lock
Locks the selected Object(s) from being edited. The Objects will remain locked until the Lock option is reselected to unlock them.
The Object can also be locked via the Outline Panel.


Show All States

Edit | Show All States
Shows all states (Up, Over, Down and Hit) of a button translucently, to help you position and edit the Objects in those states. The state you have selected will appear darker.


Hide All Except

Edit | Hide All Except
Hides all Objects except the selected Object(s). However, hidden objects will still appear when the Movie is played.


Lock All Except

Edit | Lock All Except
Locks all Objects except the Object(s) selected to be edited. The Objects will remain locked until the Lock option is reselected to unlock them.


Open Object

Edit | Open Object
Opens a Sprite separately for editing in the Layout Panel.


Expand Object

Edit | Expand Object
Expands an Object so that its child Objects can be edited.


Close Object

Edit | Close Object
Closes an expanded or opened Object.


Properties

Edit | Properties (Alt+Enter)
Displays the properties of the selected Object or Tool in Object Panel.


Preferences

Edit | Preferences
Opens 'Preferences' dialog boxes for setting options in SWiSHmax.


View Menu

The View Menu enables you to show and hide windows and change the view of the Movie.

The available options are as follows:

Preview Frame mode
· fpview Preview Frame

Toolbars and Status Bar
· Toolbars
· Status bar

Zooming
· zoominicon Zoom in
· zoomouticon Zoom out
· view100 View at 100%
· fitscene Fit Scene in Window
· fitobjects Fit Objects in Window

Rulers, Grids, Guides and snapping
· showruler Show Rulers
· showgrid Show Grid
· showguides Show Guides
· lockguides Lock Guides
· clearguides Clear All Guides
· snapgrid Snap to Grid
· snappixel Snap to Pixel
· snaphandle Snap to Object Handles
· snapguides Snap to Guides

Display quality
· Show All Images
· Smooth Edges and Images.


Preview Frame

fpview View | Preview Frame
'Preview Frame' mode previews the current Frame in the Layout Panel.
In Preview Frame Mode, you can move, scale, rotate and skew Objects in Keyframes using the selecti Select Tool or reshapei Reshape Tool and the appropriate Tool Option.


Toolbars

View | Toolbars
Shows or hides a specific Toolbar. See the Toolbars topic for a list of Toolbars.


Status Bar

View | Status Bar
Shows or hides the Status Bar.

The Status Bar is at the bottom of the 'SWiSHmax' window and is used to display Help for the selected command or tool. The Status Bar also displays the estimated file size of the exported .swf file and the current x and y co-ordinates of the cursor in the Layout Panel.

statusbar

Note: The actual file size of the export .swf may be smaller depending on the optimizations selected on the Export Panel


View at 100%

view100 View | View at 100%
Views the Movie at its actual size in the Layout Panel.


Fit Scene in Window

fitscene View | Fit Scene in Window
To fit the entire Scene (stage area) into the Layout Panel.


Fit Objects in Window

fitobjects View | Fit Objects in Window
To fit all selected Objects into the Layout Panel. If no Object is selected, this function will fit all Objects in the Scene into the Layout Panel.


Show Rulers

ruler View | Show Rulers
Shows or hides Rulers in the Layout Panel.

rulers

The Rulers show the number of pixels from the top left hand corner of the Movie. The number of graduations displayed depends on the current magnification used.

Rulers are especially useful if Guides are used.


Show Grid

showgrid View | Show Grid
Displays or hides the Grid on the Layout Panel. The Grid is a network of evenly spaced horizontal and vertical lines that cover the canvas. It can help you to align your artwork and arrange Objects symmetrically. You can change the Grid settings on the Guides Panel.

See also: Show Grid, Snap to Grid, Guides, Guides Panel.


Snap to Grid

snapgrid View | Snap to Grid
Have Objects Snap to the Grid while moving or editing. It will automatically align Objects along your Grid when they come within a certain distance of it. You can change the Grid settings on the Guides Panel.

See also: Show Grid, Snap to Grid, Guides, Guides Panel.


Snap to Pixel

snappixel View | Snap to Pixel
Have Objects Snap to Pixels while moving or editing. A Pixel Grid will also be displayed when the Movie is viewed at >=500% zoom.


Snap to Object Handles

snaphandle View | Snap to Object Handles
To have an Object Snap to another Object's Handles while moving or editing. You can change the settings on the Guides Panel.


Show All Images

View | Show All Images
When this option is checked SWiSHmax will display all images in the Layout Panel. When this option is unchecked only selected images will be displayed.

Uncheck this option if SWiSHmax is taking a long time to redisplay the Layout Panel.


Smooth Edges and Images

View | Smooth Edges and Images
When this option is checked SWiSHmax will anti-alias the edges of shapes and text, and smooth images that have been resized. When this option is unchecked text and shapes may have jagged edges and resized images will appear to pixelate.

Uncheck this option if SWiSHmax is taking a long time to redisplay the Layout Panel.


Guides

Guides are a feature that allow the user to specify vertical and horizontal alignment points. They could be considered to be a 'custom grid'. The Guides need not align with the currently selected Grid and work independantly of the Grid and Snap to Grid system.

While moving or editing, Objects will automatically align with the Guide when they come within a certain distance of it. This applies if the Snap to Guides option is on.

guides

The following options are provided in the View Menu to allow viewing and setting of various Guide options:

· showguides Show Guides
· lockguides Lock Guides
· clearguides Clear All Guides
· snapguides Snap to Guides.

The options can also be altered in the Guides Panel.

Although Guides can be used without Rulers, they are easiest to use if the Show Rulers option is used.

Creating New Guides
With the Show Guides option on, Guides can be created in two ways:

· Dragging: move the Select tool over the horizontal or vertical Ruler (or over the corresponding edge if the Ruler is not displayed), then press and hold the left mouse button. You can now drag a new Guide line to the desired position on the Movie 'Layout' Panel. Holding down the Shift key while dragging will cause the Guide position to lie on the nearest ruler graduation
· Ruler Click: move the Select tool over the horizontal or vertical Ruler. Select the position where you want the guide to be created. Click and release the left mouse button. Clicking on the Horizontal ruler will create a vertical Guide line, while clicking on the Vertical ruler will create a horizontal Guide line. Holding down the Shift key while clicking the mouse button will cause the Guide line to be placed on the nearest ruler graduation.

Moving Guides
To move a Guide, hover the Select tool above the Guide until the cursor changes shape. Then press and hold the left mouse button. You can now drag the Guide to the desired position on the Movie 'Layout' Panel. Holding down the Shift key while dragging will cause the Guide position to lie on the nearest ruler graduation. If an Object is snapped to a Guide, then dragging the guide will drag the Object along with it (provided that Snap To Guides) is toggled on.

Note: It is only possible to move an existing Guide if the Lock Guides option is not set


Show Guides

showguides View | Show Guides
Shows or hides Guides in the Layout Panel.

See also: Show Grid, Snap to Grid, Guides, Guides Panel.


Lock Guides

lockguides View | Locks Guides
If set, prevents currently displayed Guide lines from being moved by the Select Tool in the Layout Panel.

Note: It is still possible to add new Guide lines


Clear All Guides

clearguides View | Clear Guides
Clears all existing Guides in the Layout Panel.


Snap to Guides

snapguides View | Snap to Guides
Have Objects Snap to the nearest Guide while moving or editing. If set, Objects will automatically align to the Guide when they come within a certain distance of it.

See also: Show Grid, Snap to Grid, Guides, Guides Panel.


Insert Menu

The Insert Menu enables you to add things to the Movie.

The available options are as follows:

Add Scenes
· newscene Scene

Add Objects
· newtext Text
· newbutton Button
· newsprite Sprite
· newimage Image...
· newcontent Content...
· newinstance Instance...

Effects and Scripts
· Effect
· Script

Frames
· Insert Frame
· Delete Frame.


Scene

newscene Insert | Scene
Inserts a new Scene into the Movie.


Text

newtext Insert | Text
Inserts text into the current Scene/Sprite/Group. You can edit the text in the Text Panel.


Button

newbutton Insert | Button
Inserts a button into the current Scene/Sprite/Group.


Sprite

newsprite Insert | Sprite
Inserts a Sprite into the current Scene/Sprite/Group.


Image...

newimage Insert | Image...
Inserts an image from an external file into the current Scene/Sprite/Group.

SWiSHmax currently supports the following image formats:

· Windows Bitmap (*.bmp; *.dib)
· GIF Image (*.gif)
· JPEG Image (*.jpg; *.jif, *.jpeg)
· PNG Image (*.png).


Content...

newcontent Insert | Content...
Inserts an external file into the current Scene/Sprite/Group.

This is the same as the File | Import command.


Instance...

newinstance Insert | Instance...
Inserts an Instance of a specific Sprite into the current Scene/Sprite/Group.

An Instance is a clone of a reference Sprite. The contents of the Instance and its reference Sprite are always consistent. Making changes to the Instance will also change the reference Sprite and vice versa.


Effect

Insert | Effect
Inserts an Effect to the selected Object or selected group of Objects at the current Frame. The Submenu has a list of the available Effects. Some of the Effects have a further submenu where you can select the basic Effect, or one of the preset Effects you have recently used (saved or loaded).


Script

Insert | Script
Adds a Script to the selected Object or the current Frame. You can either add Actions, Events or Define Functions. The Script can then be edited in the Script Panel. See the Scripting section for more information about general scripting concepts.


Insert Frame

Insert | Insert Frame (F5)
Inserts a new Frame before the current Frame in the Timeline.


Delete Frame

Insert | Delete Frame (Shift+F5)
Deletes the current Frame from the Timeline.


Modify Menu

The Modify Menu enables you to change the properties of the currently selected Object(s).

The available Submenus are as follows:

Grouping, Convert and Break
· Grouping
· Convert
· Break

Change layer and Transform
· Order
· Transform

Change Text Objects
· Alignment
· Justification
· Appearance.


Grouping

group Modify | Grouping | Group as Group (Ctrl+G)
To Group selected Objects together. Complex Effects can then be applied to the Group.

Note: Because a Group does not have its own Timeline, SWiSH converts any Objects with Effects into Sprites before grouping

groupasbutton Modify | Grouping | Group as Button
Groups the selected Objects together as a Button.

gsprite Modify | Grouping | Group as Sprite
Groups the selected Objects together as a Sprite.

gshape Modify | Grouping | Group as Shape
Groups the selected Objects together as a single shape.

Note:
· If you want to use multiple Text or Shape Objects as a mask, you should group them as a shape
· Objects with Effects/Events cannot be grouped as a single shape, as you will lose the Effects and Events. You should manually remove these before grouping, if desired
· When grouping as a single shape, you will be asked whether to 'Make the overlapped regions of objects with the same fill style empty?'. If you select yes, the overlapped regions of Objects with the same fill style will become empty. You can use this feature to punch a hole in a shape as shown below

bgshape agshape

· If you use the merged shape as a mask, any overlapping regions will be empty (see below left). If you want the overlapping regions to be filled, then check the 'Solid shape with overlap filled' option in the Shape Panel (see below right). If you use this setting on a shape that is not being used as a mask, then the shape will always have a solid fill with no outline, regardless of the fill and line styles specified

bos aos

· After grouping as a single shape, the edges of the Object behind are no longer covered by the object in front, as shown below

bgshape1 agshape1

ungroup Modify | Grouping | Ungroup (Ctrl+U)
Splits a Group or Sprite into separate Objects.


Convert

cbutton Modify | Convert | Convert to Button
Converts the selected Objects into individual Buttons.

csprite Modify | Convert | Convert to Sprite
Converts the selected Object into individual Sprites.


Break

Modify | Break | Break into Letters
Converts a Text Object into a Group Object containing separate individual Text Objects for each letter of the text. You can edit each letter Object individually (for example to change the font). You can apply an Effect to the Group Object to animate the component letters.

Modify | Break | Break into Shapes
Converts a complex shape into a Group Object containing separate individual Shape Objects for each simple component of the original complex shape.

Converts a Text Object into a Group Object containing separate individual Shape Objects for each letter of the text. You can edit each Shape Object individually (for example to change the fill etc). You can apply an Effect to the Group Object to animate the component shapes.

Modify | Break | Break into Pieces
Converts the selected Object into a Group Object of smaller shapes.

((need a sentence to dscribe categories. Why indented??))

Break Into
The type of shape to break the Object into. The available options are Regular Grid, Triangular Mesh, Random Triangles and Random Polygons.

Column
Defines the number of columns the Object is broken into when breaking into a Regular Grid or Triangular Mesh.

Row
Defines the number of rows the Object is broken into when breaking into a Regular Grid or Triangular Mesh.

Number
Defines the number of pieces the Object is broken into when breaking into a Random Triangles or Triangular Mesh.

Random Seed
Every distinct value for random seed will give a different result for the random arrangement. Although using the same random seed will produce the same arrangement each time.

Cascade Order
The order things will animate when using the Cascade options in an Effect.


Order

front Modify | Order | Bring to Front
Moves the selected Object in front of all other Objects.

back Modify | Order | Send to Back
Moves the selected Object behind all other Objects.

forward Modify | Order | Bring Forward
Moves the selected Object one step closer to the top of the stack of Objects.

backward Modify | Order | Send Backward
Moves the selected Object one step closer to the bottom of the stack of Objects.


Transform

Modify | Transform | Rotate 90
Rotates the selected Object by 90 degrees.

Modify | Transform | Rotate 180
Rotates the selected Object by 180 degrees.

Modify | Transform | Rotate 270
Rotates the selected Object by 270 degrees.

Modify | Transform | Flip Horizontal
Flips the selected Object horizontally.

Modify | Transform | Flip Vertical
Flips the selected Object vertically.

Modify | Transform | Reset
Resets the Transform to default settings, except for position.


Align

Align specifies what you mean by the 'position' of the Object. For example, when you talk about the position of the Object, you may be referring to where the center of the Object is. The alignment position can be one of nine preset positions on the corners, edges and center of the object. The alignment position is also the center for rotation and scaling of the Object. You can see the co-ordinates of the alignment position in the 'Transform' Panel.

Modify | Align | Left
Align selected Objects to the left.

Modify | Align| Center (Horizontally)
Align selected Objects to the center horizontally.

Modify | Align | Right
Align selected Objects to the right.

Modify | Align | Anchor (Horizontally)
Align selected Objects horizontally by anchor point.

Modify | Align | Top
Align selected Objects to the top.

Modify | Align | Center (Vertically)
Align selected Objects to the center vertically.

Modify | Align | Bottom
Align selected Objects to the bottom.

Modify | Align | Anchor (Vertically)
Align selected Objects vertically by anchor point.

Modify | Align | Distribute | Left
Distribute selected Objects horizontally by left side.

Modify | Align | Distribute | Center (Horizontally)
Distribute selected Objects horizontally by center point.

Modify | Align | Distribute | Right
Distribute selected Objects horizontally by right side.

Modify | Align | Distribute | Anchor (Horizontally)
Distribute selected Objects horizontally by anchor point.

Modify | Align | Distribute | Top
Distribute selected Objects vertically by top side.

Modify | Align | Distribute | Center (Vertically)
Distribute selected Objects vertically by center point.

Modify | Align | Distribute | Bottom
Distribute selected Objects vertically by bottom side.

Modify | Align | Distribute | Anchor (Vertically)
Distribute selected Objects vertically by anchor point.

Modify | Align | Space Evenly | Horizontally
Space selected Objects evenly horizontally.

Modify | Align | Space Evenly | Vertically
Space selected Objects evenly vertically.

Modify | Align | Space Evenly | Both
Space selected Objects evenly both horizontally and vertically.

Modify | Align | Make Same | Width
Make selected Objects the same width.

Modify | Align | Make Same | Height
Make selected Objects the same height.

Modify | Align | Make Same | Both
Make selected Objects the same height and width.

Modify | Align | Make Same | By Scaling
Scale selected Objects when changing size.

Modify | Align | Make Same | By Resizing
Resize selected Objects when changing size.

Modify | Align | Relative To All Selected
Makes all the alignment options align relative to all the selected Objects.

Modify | Align | Relative To Last Selected
Makes all the alignment options align relative to all the last selected Object.

Modify | Align | Relative To Parent
Makes all the alignment options align relative to selected the Object's parent. This is useful for positioning/aligning Objects within a Sprite.

Modify | Align | Relative To Stage
Makes all the alignment options align relative to the stage.


Justification

Modify | Justification | Align Left/Top
Aligns the lines of the selected text to the left/top with ragged right/bottom edge.

Modify | Justification | Center
Centers the lines of the selected text with ragged right and left edges.

Modify | Justification | Align Right/Bottom
Aligns the lines of the selected text to the right/bottom with ragged left/top edge.

Modify | Justification | Align Full
Aligns the lines of the selected text on both sides.


Appearance

Modify | Appearance | Bold (Ctrl+B)
Makes the selected text bold (toggle).

Modify | Appearance | Italic (Ctrl+I)
Makes the selected text italic (toggle).

Modify | Appearance | LR-TB Flow
Displays the selected text from left to right, top to bottom.

Modify | Appearance | TB-RL Flow
Displays the selected text from top to bottom, right to left.

Modify | Appearance | RL-TB Flow
Displays the selected text from right to left, top to bottom.

Modify | Appearance | TB-LR Flow
Displays the selected text from top to bottom, left to right.


Control Menu

The Control Menu enables you to control how the Movie is played and previewed.

The available options are as follows:

Play
· playmovie Play Movie
· playscene Play Scene
· playeffect Play Effect
· fpview Preview Frame

Stop
· stopmovie Stop

Move the play head
· stepforward Step Forward
· stepback Step Back
· gotoend Cue to End
· gostart Rewind to Start.


Play Movie

playmovie Control | Play Movie
Plays the Movie.


Play Scene

playscene Control | Play Scene
Plays the current Scene only.


Play Effect

playeffect Control | Play Effect
Plays the part of the Scene containing the currently selected Effects.


Preview Frame

fpview Control | Preview Frame
Switches to 'Preview Frame' mode to preview the current Frame in the 'Layout' window.

In Preview Frame Mode, you can move, scale, rotate and skew Objects in Keyframes using the selecti Select Tool or reshapei Reshape Tool and the appropriate Tool Option.


Stop

stopmovie Control | Stop
Stops playing the Movie, Scene or Effect.


Step Forward

stepforward Control | Step Forward
Steps forward to the next Frame in 'Preview Frame' mode.


Step Back

stepback Control | Step Back
Steps back to the previous Frame in 'Preview Frame' mode.


Cue to End

gotoend Control | Cue to End
Jumps to the last Frame in 'Preview Frame' mode.


Rewind to Start

gostart Control | Rewind to Start
Rewinds to the first Frame in 'Preview Frame' mode.


Tools Menu

The Tools Menu enables you to set application-wide preferences and add your own commands to the SWiSH User Interface.

The available options are as follows:

· Preferences
· Customize
· Keyboard Map.

You can add additional options to the Tools Menu by selecting the Customize option, and then choosing the Tools tab.


General

Startup options: Show startup menu
Opens the 'Startup' dialog box every time you startup SWiHmax, giving you the option to start a new empty Movie, start a new Movie from a Template, work on an existing Movie or work on the last Movie you saved.

Export options

Automatically export to SWF file when saving movie
Makes SWiSHmax automatically save a .swf file of your Movie whenever the Movie is saved.

Always use LAMEencoder to encode MP3 sounds
Automically encodes all sounds with the LAME MP3 encoder instead of the default system encoder.

Undo buffer size
Sets the maximum size of the buffer used for the Edit | Undo and Edit | Redo options.


Appearance

Color Options

Background color for Timeline and Layout panels
Sets the background color of the window for areas outside the Movie in the Layout Panel, and empty space in the Timeline Panel. This uses the Color Selector. Change this setting if you have difficulty seeing window outlines when you drag a Panel, or if your Movie background is the same color as the workspace area.

Highlight color for bounding-boxes, outlines and motion paths
Sets the color for all bounding-boxes, outlines and Motion Paths shown in the Layout Panel. This uses the Color Selector.

Thumbnail options: show image thumbnails and text fonts and colors in panels
Shows a thumbnail of all images in the Outline Panel and the color and font of Text Objects in the Outline, Timeline and Text Panels.


Editing

Select Objects By

Clicking Inside Object
An Object can only be selected by clicking inside the Object itself.

Clicking Inside Bounding-box
An Object can be selected by clicking anywhere inside its bounding-box. The bounding-box of an Object is a rectangle that completely encloses the Object. Selecting this option makes selecting small Text Objects make easier.

Drag Selects Objects

With Bounding-Box Overlapping the Drag Rectangle
When selecting a Drag Rectangle in the 'Layout' Panel an Object will be selected if any part of the Object's bounding-box is inside the Drag Rectangle.

Completely Within the Drag Rectangle
When selecting a Drag Rectangle in the 'Layout' Panel an Object will only be selected if the Object is completely inside the Drag Rectangle.

Double-Click Sprite To

Edit in Place
Double-clicking a Sprite will open it for editing in place. Sprites opened to edit in place are shown with a border around them.

Open Sprite
Double-clicking a Sprite will open it for editing.

On Closing Sprite: Reset Sprite to Initial State
Resets Sprites to Frame 0 after closing in Frame Preview Mode.

Motion Path Follows

Origin of Object
If selected, the motion path of the Object's origin is displayed in Frame Preview Mode.

Anchor Point
If selected, the motion path of the Object's anchor point is displayed in Frame Preview Mode.

Color Picker: Convert Colors to Nearest Web-Safe Color
Converts the selected color to the nearest websafe color. This may be a color selected from the Color Selector, the screen or the Windows Color picker.


Effects

Effect settings dialog: show dialog when inserting effect
Automatically opens the Effects Settings Dialog box when new Effects are inserted into your Movie.

Effect authoring: allow effect authoring
Makes the Author Mode option available in the Effects dialog box. See Authoring Effects for more details.

Effects folder

Use default effects folder
Uses SWiSHmax's default Effects folder for Authored Effects.

Specify folder
Selected your own folder for Authored Effects.


Player

Test/Load Movie folder
Sets the folder to search for .swf files when a Load Movie Action is executed while previewing in SWiSH or testing in the player or browser. You can choose to use:

· SWI folder: the folder where you last loaded or saved a .swi file
· SWF export folder: the folder where you last exported a .swf file
· HTML export folder: the folder where you last exported a .htm file
· Specify folder: a folder of your choice.

Infinite loop detection
Report an error message after the internal Flash Player has executed the specified number of instructions. In other words, it tells the internal player how long to wait until it detects an infinite loop in your script.

On executing getURL() Action: Launch browser and load URL
When playing a Movie using Play Movie or Play Timeline in SWiSHmax, this option specifies whether a getURL Action will launch the default browser and load the URL or not.


Script Editor

Tab size
Defines the tab size used in SWiSHmax's Script Editor.

Font size
Defines the font size used in SWiSHmax's Script Editor.


Customize

Tools | Customize...
Opens a dialog box to customize the Toolbars and Menus.

customize

The available tabs are as follows:

· Commands: to add/remove a command to/from a Toolbar
· Toolbars: to show/hide a Toolbar or add/rename/delete a custom Toolbar
· Tools: to add/edit/remove an external command to/in/from the Tools Menu
· Keyboard: to add/remove a shortcut key to/from a command
· Menu: to add/remove a command to/from a Menu
· Options: to configure the 'look' of Menus and Toolbars.


Commands

commands

To add a command to a Toolbar
1. Make a selection from the Menu in the 'Categories' box
2. Drag the command you want from the 'Commands' box to the displayed Toolbar

To remove a command from a Toolbar
Simply drag the icon off the Toolbar.


Toolbars

custoolbar

To show/hide a Toolbar
1. Select an option from the 'Toolbars' box
2. Tick/Untick the check box to show/hide the selected Toolbar

To add a custom Toolbar
1. Click the 'New...' button, and in the 'Toolbar Name' box, type a name for the new Toolbar
2. Click the Commands tab
3. In the 'Categories' box, click the category that contains the command that you want to add to the new Toolbar
4. From the 'Commands' options, drag the command to the new Toolbar

To rename a custom Toolbar
1. In the 'Toolbars' box, click the Toolbar you want to rename
2. Click the 'Rename...' button and type the new name in the 'Toolbar Name' box

To delete a custom Toolbar
1. In the 'Toolbars box', click the Toolbar you want to delete
2. Click the 'Delete' button

To reset a Toolbar to the default settings
1. In the 'Toolbars' box, click on the Toolbar you want to reset
2. Click the 'Reset' button

To reset all Toolbars to the default settings
Click the 'Reset All' button.

To display text labels on Toolbars
1. In the 'Toolbars' box, click the Toolbar you want the text labels be displayed on
2. Check the 'Show text labels' checkbox


Tools

custools

To add a command to the Tools Menu
1. Click the newtool 'New' button or double-click the blank area of the 'Menu contents' box
2. Type the name of the Tool as you want it to appear on the Tools Menu. To specify a letter in the Menu title as an access key, precede that letter in the 'Menu contents' box with an ampersand (@). The first letter in the title is the keyboard access key by default
3. Highlight the name of the tool you just entered in the 'Menu contents' box
4. In the 'Command' box, browse using the browse 'Browse' button or type the path and name of the program
5. In the 'Arguments' text box, browse or type any arguments to be passed to the program
6. In the 'Initial directory' box, type the file directory where the command is located

To remove a command from the Tools Menu
1. In the 'Menu contents' box, select the command you want to delete
2. Click the deltool 'Delete' button or press the Delete key

To edit a command in the Tools Menu
1. In the 'Menu contents' box, select the command you want to edit
2. To move the command up/down one position in the Menu, click the uptool 'Move Up' or downtool 'Move Down' buttons, respectively. To change the Menu text, 'Command' line (tool path and file name), command-line 'Arguments', or the 'Initial directory', type the new information in the appropriate text box


Keyboard

keyboard

To assign a shortcut key
1. In the 'Category' list, select the Menu that contains the command that you wish to assign a shortcut key
2. In the 'Commands' list, select the command that you wish to assign a shortcut key
3. In the 'Press New Shortcut Key' box, press the shortcut key or key combination that you want and click the 'Assign' button. If you press a key or key combination that is currently assigned to another command, an 'Assigned To' section will appear under the 'Press New Shortcut Key' box

To delete a shortcut key
1. In the 'Category' list, select the Menu that contains the command you wish to delete the shortcut key to
2. From the 'Commands' list, select the command you wish to delete the shortcut key to and click the 'Remove' button

To reset all shortcut keys to their default values
Click the 'Reset All' button.


Menu

cusmenu

To add a command to an Application Frame Menu
1. Use the 'Show Menus for' drop-down list to select the Menu you want to customize
2. Click the Commands tab and drag the commands into the Menu

Note: To remove items, just drag them off the Menu

To reset the Menus to their original configuration
Click the 'Reset' button.

To add a command to a context Menu
1. Use the 'Select context menu' drop-down list to select the pop-up Menu you want to customize
2. Click the Commands tab and drag the commands into the Menu

Note: To remove items from the pop-up Menu, just drag them off

To select the type of Menu animations
Use the 'Menu animations' drop-down list to select the type of Menu animations. The available options are None, Unfold, Slide and Fade.

To display shadows under open Menus
Tick the 'Menu shadows' box.


Options

options

Show ScreenTips on Toolbars
Select the 'Show ScreenTips on toolbars' checkbox to display short help text when the mouse pointer is positioned over a 'Toolbar' button.

Show shortcut keys in ScreenTips
Select the 'Show shortcut keys in ScreenTips' checkbox to see the possible keyboard shortcut displayed in addition to the short help text.

Large Icons
Select the 'Large Icons' checkbox to display big Toolbar icons.

Look 2000
Select the 'Look 2000' checkbox to enable Windows-2000-style features in the User Interface. This option has only minimal Effects, mainly affecting the style of Toolbar handles.

Menus show recently used commands first
Select the 'Menus show recently used commands first' checkbox to show only basic and frequently used commands on Menus.

Show full Menus after a short delay
Select the 'Show full menus after a short delay' checkbox to show all commands on the Menu after you rest the mouse pointer over the open Menu for a brief period of time.

Reset my usage data
Click the 'Reset my usage data' button to clear the list of recently used commands saved by SWiSHmax.


Keyboard Map

Tools | Keyboard Map
Displays a map of the current keyboard shortcuts and a brief description of functions.

You can modify your keyboard shortcuts at the Keyboard tab on the Customize dialog box.

keyboardmap


Panels Menu

panelsmenu

##screenshots needs to be redone after next beta as "color panel" is now called the "tint panel".

This Menu shows which of the current Panels are displayed. A Panel can be enabled or disabled via the checkbox.

Panel | Layout
Shows or hides the Layout Panel.

Panel | Timeline
Shows or hides the Timeline Panel.

Panel | Outline
Shows or hides the Outline Panel.

Panel | Movie
Shows or hides the Movie Panel.

Panel | Object
Shows or hides the Object Panel.

Panel | Actions
Shows or hides the Actions Panel.

Panel | Transform
Shows or hides the Transform Panel.

Panel | Tint
Shows or hides the Color Tint.

Panel | Content
Shows or hides the Content Panel.

Panel | Export
Shows or hides the Export Panel.

Panel | Reset to Defaults
Resets all panels to their default position.


Help Menu

helptopic Help | SWiSH Help Topics
Opens the SWiSH Help file and lists help topics.

Help | SWiSH Tutorials
Opens the SWiSH Help file and shows a list of tutorials.

Help | Go to SWiSH web site
Launches the browser and goes to the SWiSH web site at http://www.swishzone.com.

Help | Go to SWiSH Support Forums
Launches the browser and goes to the SWiSH support forums at http://www.swishzone.com/support_forums.html.

Help | About Macromedia Flash
Launches the browser and goes to the Flash Player web site.

Help | About LAME MP3 Encoder
Displays information about the LAME MP3 encoder.

Help | Purchase SWiSH...
To purchase a copy of SWiSH.

Help | Check for Update
Launches the browser and goes to the SWiSH web site at http://www.swishzone.com to check if there is an updated build of SWiSHmax.

about Help | About SWiSH...
Displays application information, version number and copyright information.


Start Up Menu

This Menu is displayed when SWiSHmax is started. It allows quick selection of common SWiSHmax tasks.

You can disable this Menu from the 'Show this prompt at startup' checkbox, as shown below.

menu-startup

You can disable or re-enable this Menu from the Tools | Preferences Menu item.


Toolbars

The Toolbars provide you with quick access to Menu commands and settings. Each Toolbar has a number of icons on it. These same icons appear with the corresponding Menu item.

Toolbars can be:
· floated over the 'SWiSH application' window
· docked around the edges of the 'SWiSH application' window.

When floated, each Toolbar has a panels-closebutton 'Close' button, which hides the Toolbar.

There are a number of ways to rearrange Toolbars.

You can move a Toolbar around by dragging it by its title bar or gripper. You can drag it to another edge to dock it, or drag it elsewhere to have it float over the 'application' window. You can force a Toolbar to float by holding the Control key while dragging it. You can change the alignment of the Toolbar from horizontal to vertical, or vice versa, by holding the Shift key while dragging. You can double-click on the gripper of a docked Toolbar to float it, or double-click on the title of a floating Toolbar to dock it.

You can customize the appearance and content of Toolbars using the Toolbar Submenu and the Customize command on the View Menu.

The SWiSHmax Toolbars are:
· Standard
· Insert
· Control
· Grouping
· Export
· Customize??.


Standard

stdtoolbar

newmovie New (Ctrl+N)
Creates a new SWiSH Movie.

openmovie Open (Ctrl+O)
Opens a .swi (SWiSH Movie) file.

savemovie Save (Ctrl+S)
Saves the current SWiSH Movie.

find Find
Lets you search for text in your Movie.

cut Cut (Ctrl+X)
Deletes the currently selected Object or Effect and copies it to the Clipboard.

copy Copy (Ctrl+C)
Copies the currently selected Object or Effect to the Clipboard.

paste Paste (Ctrl+V)
Pastes the Object or Effect on the Clipboard to the current SWiSH Movie.

delete Delete (Delete)
Deletes the currently selected Object or Effect.

forward Bring Forward
Moves the selected Object one step closer to the top of the stack of Objects.

backward Send Backward
Moves the selected Object one step closer to the bottom of the stack of Objects.

front Bring to Front
Moves the selected Object in front of all other Objects.

back Send to Back
Moves the selected Object to the back of all other Objects.

undo Undo (Ctrl+Z)
To undo the last change made to the current SWiSH Movie.

redo Redo (Ctrl+Y)
To redo the last change made to the current SWiSH Movie.

helptopic Help Topics (F1)
Lists help topics.

help Context-sensitive Help (Shift + F1)
Provides help related to a specific topic. Click this button, then click the Object you require help with.


Insert

instoolbar

newscene Insert Scene
Inserts a new Scene into the Movie.

newtext Insert Text
Inserts a Text Object into the current Scene/Sprite/Group.

newimage Insert Image
Inserts an image from an external file into the current Scene/Sprite/Group.

newcontent Insert Content
Inserts an external file into the current Scene/Sprite/Group.

newbutton Insert Button
Inserts a button into the current Scene/Sprite/Group.

newsprite Insert Sprite
Inserts a Sprite into the current Scene/Sprite/Group.


Control

ctrltoolbar

stopmovie Stop
Stops playing.

playmovie Play
Plays the Movie.

playscene Play Scene
Plays the current Scene only.

playeffect Play Effect
Plays the current Effect only.

gostart Rewind
Rewinds to the first Frame in Preview Frame mode.

stepback Step Back
Steps back to the previous Frame in Preview Frame mode.

fpview Preview Frame
Switches to Preview Frame mode to preview the current Frame in the Layout Panel.

stepforward Step Forward
Steps forward to the next Frame in Preview Frame mode.

gotoend Go to End
Jumps to the last Frame in Preview Frame mode.


Grouping

grptoolbar

group Group as Group (Ctrl+G)
Groups the selected Objects together.

groupasbutton Group as Button
Groups the selected Objects together as a Button.

gsprite Group as Sprite
Groups the selected Objects together as a Sprite.

gshape Group as Shape
Groups the selected texts and shapes together as a single Shape.

ungroup Ungroup (Ctrl+U)
Splits a Group/Sprite/merged-shape into separate Objects.

cbutton Convert to Button
Converts the selected Object into a Button.

csprite Convert to Sprite
Converts the selected Object into a Sprite.

cshape Convert to Shapes
Converts the selected Object into a group of shapes.

cletter Convert to Letters
Converts the selected text into a group of letters.

Break into Trangles
Converts the selected Object into a group of triangles.

Break into Polygons
Converts the selected Object into a group of polygons.


Export

exptoolbar

exportswf Export to SWF (Ctrl+E)
Exports the current SWiSH Movie to a .swf file.

exporthtml Export to HTML (Ctrl+P)
Exports the current SWiSH Movie to a .swf file and an .htm file

exportexe Export to EXE (projector)
Exports the current Movie to a .exe file, known as a Projector. A Projector does not require the Flash Player to be installed to play the Movie.

exportavi Export to AVI (Ctrl+D)
Exports the current SWiSH Movie to a .avi file.

testbrowser Test In Browser
Creates temporary .htm and .swf files, launches the default browser and displays the HTML page containing the Movie in the browser.

testplayer Test In Player
Creates a temporary .swf file, launches the Flash Player and plays the Movie in the Flash Player.


Customize

Enter topic text and screen grab here.


Tools

Tools are modal commands that determine what SWiSH does when you click and drag the mouse on the workspace. You can select a tool by clicking one of the options in the Toolbox, which is located in the top-left of the Layout Panel. You can only select one tool at a time.

After use, the Select tool will be automatically re-selected. Double clicking on the tool will leave that tool selected until another tool is selected.

The grab handles and cursors that appear around an Object and when the Object is altered will depend on the tool and tool options selected.

tbtoolbar

The available tools are:

· selecti Select
· reshapei Reshape
· mpathi Motion Path
· ftransi Fill Transform
· linei Line
· pencili Pencil
· bezieri Bezier
· ellipsei Ellipse / Circle
· recti Rectangle / Square
· autoshapesi Auto Shapes
· pani Pan
· zoomi Zoom.


Select Tool

Selects, moves and transforms Objects on the stage by clicking and dragging.

When using the Select tool the Tool Options of Scale, Resize, Rotate/Skew and Perspective are available.

To Select Objects
Click on the Object.

selecto

Note:
· To select multiple Objects, press and hold the Shift key while clicking, or drag the cursor to select surrounded Objects (marquee selection)
· To toggle the selection status of an Object, press and hold the Control key down while clicking
· Double-click on the Object to display its properties in the Object Panel

To move Objects
1. Positon the mouse cursor over the Object and move over the Object until the cursor changes shape to the one shown below. See Cursors and Anchors for more information on the meaning of cursor shapes
2. Press and hold the left mouse button
3. Drag the Object to the new position and release the mouse

moveo

To move the Object Anchor Point
1. Positon the mouse cursor over the Object Anchor Handle. See Cursors and Anchors for more information on the meaning of cursor shapes. The cursor should change to the one shown below
2. Press and hold the Alt key and the left mouse button
3. Drag the Anchor Point to the new position and release the mouse

moveanchor


Reshape Tool

reshapei Reshape
Reshapes graphic Objects by clicking and dragging.

When using the reshape tool the Tool Options of Scale, Resize, Rotate/Skew and Perspective are available.

Note: When used on AutoShapes the Reshape tool activates the AutoShapes editing handles. See AutoShapes for more details

To Select an Object
Click on the Object. The vertices of the selected Object are indicated by white diamond anchors, and the control points by blue daimond anchors. Vertex anchors are always on the curve, whereas control-point anchors are usually off the curve. There are either zero, one or two control points associated with each edge, and these affect the curvature of the edge. The control points are shown joined to the adjacent vertices by a dotted line.

reshapes

To move the whole Object
1. Press and hold the left mouse button inside the Object, but not on any vertex or control-point anchor
2. Drag the Object to the new position and release the mouse

reshapem

To Reshape Objects by dragging an anchor
1. Press and hold the left mouse button on a vertex or control-point anchor
2. Drag the anchor to the new position and release the mouse

reshapea reshapeao

Note: To constrain the direction from the original position to the new position to multiples of 15°, press and hold the Shift key while dragging

To Reshape Objects by dragging an edge
1. Press and hold the left mouse button on an edge
2. Drag the edge to the new position and release the mouse

reshapee
Note: To constrain the direction from the original position to the new position to multiples of 15°, press and hold Shift key while dragging

To delete or change the type of a vertex anchor
1. Move mouse pointer to the vertex anchor
2. Right-click and select the command from the pop-up Menu

reshapeca
· Cusp: lets you adjust the adjacent control points independently. When the vertex is a cusp, the edges are still curved, but the corner is not smooth
· Smooth: the adjacent control points are always in the same direction, but can be different distances from the vertex. The corner at the vertex is smooth
· Symmetrical: the adjacent control points are always in the same direction and are both the same distance from the vertex
· Sharpen: the edges on either side of the vertex are made straight, thereby removing the associated control points. This makes the corner sharp
· Remove Vertex: removes the vertex anchor completely

To change the type of an edge, or insert a vertex
1. Move mouse pointer to the edge
2. Right click and select the command from the pop-up Menu

reshapece
· Linear: the edge is straight and does not have any control points
· Quadratic: the edge is curved and has one control point
· Cubic: the edge is curved and has two control points
· Insert Vertex: adds a new vertex anchor at the mouse position

To Reshape an Object in Preview Frame mode
In 'Preview Frame' mode, if you reshape an object at a Keyframe, the change is not only applied to the current Frame. The shape of the Object in all other Frames will be changed as well.

To Slice a Shape Object
1. Move mouse pointer to the edge of the Object
2. Right click and select the Slice command from the pop-up Menu

reshape-slice

3. Move the mouse pointer to another point at the edge of the Object
4. Right click and select the Slice command from the pop-up Menu

reshape-slice2

Your Shape should now be sliced as shown below.

reshape-slice3

Note: Cannot be used for AutoShapes


Motion Path Tool

mpathi Motion Path
Plots a Motion Path for the selected Object by clicking and dragging.

To draw a Motion Path for an Object
1. Select the Object

mpaths
2. Click at the new position where the Object will be displayed for the next Keyframe. In this step, a new Move Effect will be added into the Object's Timeline automatically

mpathko
3. Repeat step 2 to add more Move Effects

mpathko2
Note:
· To constrain the direction from the current position to the new position to multiples of 15°, press and hold the Shift key while clicking
· To draw a sharp corner path for the next Keyframe, press and hold the Control key while clicking
· Frame Preview mode is automically selected whenever you click on the 'Layout' window

Specifiying the rate of movement
The rate of movement used for the Motion Tool is specified in the Tool Options Panel. Increasing the pixels per second will decrease the number of Frames used while decreasing its value will increase the number of Frames used.

Note: Motion Path now creates Move Effects with absolute Transforms, so changing a Move Effect in the middle of a Motion Path won't affect subsequent Effects


Fill Transform Tool

ftransi Fill Transform
Transforms an Object's gradient or image fill without transforming the Object.

When using the Fill Transform tool the Tool Options of Scale and Rotate/Skew are available. The handles shown depend upon the tool option selected.

To move the filled gradient or image
1. Select the Fill Transform tool
2. Select the Object you wish to transform

ftransos

3. Follow the same procedures mentioned in Select tool to move the filled gradient or image

ftransom

To Scale the filled gradient or image
1. Ensure the Fill Transform tool is selected
2. Select the Object and the Scale tool option

ftransos

3. Follow the same procedures mentioned in Scale tool option to scale the filled gradient or image

filltransform-scale

To Rotate/Skew the filled gradient or image
1. Ensure the Fill Transform tool is selected
2. Select the object and the Roate/Skew tool option

ftransrs
3. Follow the same procedures mentioned in Rotate/Skew tool option to rotate/skew the filled gradient or image

ftransrr


Line Tool

linei Line
Draws a line.

To draw a Line
1. Position the mouse pointer to where you want the line to begin
2. Press and hold the left mouse button
3. Drag the mouse pointer to where you want to end the line, and release the mouse

Note: To constrain the line direction to multiples of 15°, press and hold the Shift key while dragging


Pencil Tool

pencili Pencil
Draws a freehand line object.

To draw a freehand line
1. Position the mouse pointer to where you want the line to begin
2. Press and hold the left mouse button
3. Drag the mouse pointer on the path you want the line to take
4. Release the mouse button to end the drawing

Note: To draw a closed shape, release the mouse button at the starting point


Bezier Tool

bezieri Bezier
Draws a set of connected Bezier curves or line segments.

To draw a set of connected Bezier curves
1. Position the mouse pointer to where you want the curve to begin
2. Press and hold the left mouse button to place the on-curve anchor
3. Drag the mouse pointer in the tangent direction of the curve to be drawn
4. Release the mouse button to place the off-curve anchors
5. Repeat steps 1-4 to draw additional curves
6. Double-click left mouse button to end the drawing

Note:
· To constrain the tangent direction to multiples of 15°, press and hold the Shift key while dragging
· To draw a closed shape, double-click the left mouse button at the starting point on completion of the drawing

To draw a set of connected line segments
1. Press and release the left mouse button at the position you want the line segment to begin
2. Continue pressing and releasing the left mouse button at the position you want to end the current line segment and begin the next line segment
3. Double-click left mouse button to end the drawing

Note:
· To constrain the direction of the line segment to multiples of 15°, press and hold the Shift key while moving the mouse pointer
· To draw a polygon, double-click the left mouse button at the starting point on completion of the drawing


Text Tool

text Text
Draws a Text Object.

To draw a Text Object
1. Select the Text tool
2. Position the mouse cursor where you wish to place the text
3. Press the left mouse button. The word "Text" will be inserted into the Movie
4. Alter the text, font size, color, Object type, etc. in the Text Panel

Note:
· Initially the Text Object type is Static. The text box will automatically resize itself to contain the text that is typed into the 'Text' Panel
· Static text without margins only allows the tool options Scale and Rotate. Dragging the text box by the handles while in 'Scale' mode will stretch the text within the text box as opposed to resize the text box
· The 'Has Margins' button in the Text Panel can be used to enable margins for the Text Object. Margins are automatically enabled for Dynamic and Input Text Objects. If margins are enabled, the text box will display additional handles when selected


Margin and Width Handles

These handles apply to Text Objects that have Margins. The 'Has Margins' button in the Text Panel is used to enable margins.

When the text box is selected, additional drag handles are shown as green dots. The digram below shows the handles.

texttool

The numbers 1, 2 and 3 are used to identify the handles and do not appear in SWiSHmax.

Handle 1 is used to adjust the left margin of the first line of a parragraph.
Handle 2 is used to adjust the left margin of the remainder of the parragraph.
Handle 3 is used to adjust the width of the text box. This handle only appears if the Tool option is Scale or Rotate

Note:
· To obtain word wrapping within the text box, it is necessary to select Wrap lines at word Breaks in theAdvanced Options of the Text Panel. Without setting this option, handles 1 and 2 will affect the text in a similar way
· Margin handles only really apply to left justified text. They have limited use when applied to right or center justified text

Editing Text Object margins
1. Press and hold the left mouse button on one of the green text margin handles
2. Drag the selected text margin handle to the desired position
3. Release the mouse button


Ellipse / Circle Tool

ellipsei Ellipse
Draws an ellipse or circle.

To draw an Ellipse
1. Press and hold the left mouse button where you wish to position the ellipse
2. Drag the mouse pointer diagonally to adjusting the size of the ellipse
3. Release the mouse button to end the drawing

Note: To draw a circle, press and hold the Shift key while drawing with the Ellipse tool


Rectangle & Square Tool

recti Rectangle
Draws a rectangle or square.

To draw a Rectangle
1. Press and hold the left mouse button down (or click and release) at the position you wish to draw a corner of the rectangle
2. Drag the pointer diagonally to adjust the size of the rectangle
3. Release the mouse button (or click and release) to end the drawing

Note: To draw a square, press and hold the Shift key while dragging

To draw a Rectangle with rounded corners
1. Press and release the left mouse button at the position you wish to draw a corner of the rectangle
2. Move the mouse pointer diagonally adjust the size of the rectangle
3. Press and hold the left mouse button to finish positioning the other corner of the rectangle
4. Drag the mouse pointer back into the rectangle to adjust the rounded edge of the corners
5. Release the mouse button to end the drawing

Note:
· To draw a rounded square, press and hold the Shift key while drawing with the Rectangle tool
· To constrain the rounded corners of squares to circles, press and hold the Shift key while adjusting the rounded edge of the corners
· To constrain the rounded corners of rectangles to ellipses, press and hold the Shift key while adjusting the rounded edge of the corners


AutoShapes

autoshapesi AutoShapes
Allows you to draw a number of predetermined shapes. AutoShapes have an additional set of handles for editing. The additional handles allow you to modify properties specific to the individual AutoShape (e.g. the number of vertices in a polygon shape).

To access the different shapes, press and hold the left mouse button over the AutoShape tool to display the Menu below.

autoshapeselection

Note: Once an AutoShape is selected, the AutoShape tool will retain that symbol until a different shape is selected

The following AutoShapes are available:

· autoshape-roundedrectanglei Round rectangle
· autoshape-hearti Heart
· autoshape-arrowi Arrow
· autoshape-notchedarrowi Notched arrow
· autoshape-doublearrowi Double arrow
· autoshape-stari Star
· autoshape-polygoni Polygon
· autoshape-cubei Cube
· autoshape-buttoni Beveled button
· autoshape-roundedbuttoni Rounded button.

Selecting an AutoShape
1. Double click the AutoShape tool
2. Select the desired AutoShape

To draw an AutoShape
1. Press and hold the left mouse button where you wish to position the AutoShape
2. Drag the mouse pointer diagonally to adjusting the size of the AutoShape
3. Release the mouse button to end the drawing

Note: To constrain the AutoShape to have equal width and height, press and hold the Shift key while dragging

To Reshape AutoShapes
Drag the moveable handles, or right/left click on the fixed handles to change the feature of an AutoShape.

Rounded rectangle
· Press and drag to adjust the size of rounded corners

autoshape-roundedrectangle

Heart/Arrow/Notched arrow/Two-way arrow
· Press and drag to adjust the shape

Star
· Press and drag the hande on the convex vertex to adjust the convex vertices' orientation
· Press and drag the hande on the concave vertex to adjust the concave vertices' position
· Left/right click to increase/decrease the number of convex/concave vertices

autoshape-star

Regular polygon
· Press and drag to adjust the orientation
· Left/right click to increase/decrease the number of sides

autoshape-polygon

Cube
· Press and drag the handle on the plane to adjust the lighting direction and contrast of the shade
· Press and drag the two handles on the corners to adjust the perspective 'look' of the cube

autoshape-cube

Beveled Button
· Press and drag the handle on the slope to adjust the lighting direction and contrast of the shade
· Press and drag another handle to adjust the widths of beveled edges

autoshape-beveledbutton

Rounded Button
· Press and drag the handle on the slope to adjust the lighting direction and contrast of the shade
· Press and drag another handle to adjust the size of rounded corners

autoshape-roundedbutton

Converting to Shapes
AutoShapes can be converted into simple shapes by using the Convert to Shapes function. Once converted into shapes the AutoShape looses its additional editing handles.


Pan Tool

pani Pan
Pans around the workspace in the Layout Panel by clicking and dragging.

To Pan the 'Layout' Panel
1. Press and hold the left mouse button on the workspace
2. Drag the mouse to pan the 'Layout' window
3. Release the mouse button to finish panning


Zoom Tool

zoomi Zoom
Zooms in/out of the workspace in the Layout Panel using the mouse.

To Zoom in/out
Click the left mouse button at the position you want to zoom in on.

Note: To zoom out, press and hold the Shift key

To Zoom to an area
1. Press and hold the left mouse button at one corner of the area
2. Drag the mouse pointer diagonally to position the other corner of the area
3. Release the mouse button to zoom in


Tool Options

The Tool options are addional options for the Tools provided in the Toolbox. The Tool options shown (if any) depend on the Tool selected. You can only select one Tool option at a time.

tooloptions

The available tool options are:

· scalei Scale
· resizei Resize
· rotatei Rotate / Skew
· perspectivei Perspective
· Speed.


Scale

scalei Dragging the handles provided changes the Scale of the Object. Scaling an Object enlarges or reduces the Object horizontally, vertically or both. If the Object contains lines or text elements their widths will be unchanged.

This Tool option causes the Object size to change via the Scale properties (_xscale, _yscale) of the Object.
When applied to text, (Static, Input and Dynamic) it will resize the text as well as the surrounding text box.

To Scale Objects
1. Press and hold the left mouse button on a scale handle
2. Drag the handle to the new position and release the mouse

transo

Note: To maintain the aspect ratio of the Object, press and hold Shift key while dragging


Resize

resizei Dragging the handles provided resizes the Object. Resizing an Object enlarges or reduces the object horizontally, vertically or both. If the Object contains lines or text elements, their widths will also be resized proportionally to the object's size.

This Tool option causes the Object size to change via the width and height properties (_width, _height) of the Object. This option cannot be applied to static text. When applied to Dynamic or Input text, it resizes the text box without changing the size of the text.

To Resize Objects
1. Press and hold the left mouse button on a resize handle
2. Drag the handle to the new position and release the mouse

resize-example

Note: To maintain the aspect ratio of the Object, press and hold Shift key while dragging


Rotate / Skew

rotatei An Object can be rotated around its Anchor Point using the corner handles provided. Dragging the Object side handles provided slants the Object along either the x or y axes.

To Rotate/Skew Objects
1. Press and hold the left mouse button on a rotation/skew handle
2. Drag the handle to the new angle and release the mouse

rotater skew
Note:
· To constrain the Rotation/Skew angle to multiples of 15°, press and hold Shift key while dragging
· To round the Rotation/Skew angle to an integer, press and hold Control key while dragging
· To change the point about which the Object rotates, either select and drag the Anchor Point as indicated by a small cross (x) in the 'Layout' Panel, change the alignment using the Transform Panel or the Alignment Submenu of the Modify Menu

To Rotate/Skew an Object at a Keyframe
1. Click on the Object
2. Either click on the truler Timeline ruler or the fpview 'Preview Frame' button to enter Preview Frame mode. The Motion Path of the Object will be displayed in 'Preview Frame' mode
3. Click on a Keyframe handle. Follow the same procedures mentioned above to Rotate/Skew the Object at the Keyframe

mpathr mpathrk

Note: In 'Preview Frame' mode, double-clicking on the Scene's background in the 'Layout' window will add a Move Effect to the selected object. A Motion Path is created from the object's current position to the position where the double-click occurred


Perspective

perspectivei Dragging the handles provided modifies the Perspective of the Object. Modifing the Perspective of an Object moves the Object's corner towards the point the perspective handle is moved to.

This option cannot be applied to Text Objects.

To Modify an Object's Perspective
1. Press and hold the left mouse button on a perspective handle
2. Drag the handle to the new position and release the mouse

perspective-example


Speed

Speed is defined as the rate of movement used for the Motion Path Tool. Increasing the pixels per second will decrease the number of Frames used while decreasing it's value will increase the number of Frames used.

Note: The Speed Tool option is only available when the Motion Path Tool is selected


Panels

Panels are windows that let you control various options and settings.

Panels can be:
· floated over the 'SWiSH application' window
· docked around the edges of the 'SWiSH application' window
· in the center of the 'SWiSH application' window
· grouped together into a combined tabbed Panel.

Each Panel has a panels-closebutton 'Close' button and an panels-minmaxbutton 'Expand/Contract' button. The 'Close' button will hide the Panel. The 'Expand/Contract' button is only active when you have two Panels docked side by side on an edge of the 'application' window. Click on it to expand the Panel to occupy as much space as it can by shrinking the Panels next to it to their minimum size. If you click on it again, the Panel will contract to its smallest size allowing room for the other Panels to expand.

There are a number of ways to rearrange Panels.

You can move a Panel around by dragging it by its title bar or by its tab when grouped into a combined Panel. You can drag it to another edge to dock it, or drag it onto the title bar or tab bar of another Panel to form or join a combined Panel, or drag it elsewhere to have it float over the application window. You can force a Panel to float by holding the Control key while dragging it. You can change the alignment of the Panel from horizontal to vertical, or vice versa, by holding the Shift key while dragging. You can double-click on the title or tab of a docked Panel to float it, or double-click on the title of a floating Panel to dock it.

You can turn Panels on and off using the Panel Menu. Some Panels will appear automatically when they are needed. For example, if you add an Action, the Script Panel will appear, even if you had previously turned it off.

By default, the Layout Panel is in the center of the 'SWiSH application' window. The Outline and Timeline Panels are docked separately and the remainder of the Panels are grouped together and docked.

You can restore Panels to their default layout using the 'Reset to Defaults' option on the Panels Menu. Also see the FAQ.

The SWiSH Panels are as follows:

· Layout
· Outline
· Timeline
· Movie
· Object
· Script
· Transform
· Tint
· Content
· Align
· Guides
· Export.


Layout Panel

The 'Layout' Panel shows how Objects are arranged in the workspace. You can arrange and edit Objects, as well as preview Movies, Scenes or Effects in this Panel.

panels-layout

The title on the 'Layout' Panel will be the name of the Scene or Sprite you are currently working on.

The 'Layout' Panel has four components:

· the workspace
· the Toolbox
· the Tool Options
· the View Options.

When Objects are selected and altered, different cursor and object anchors will appear depending on the Tool and Tool options currently selected.

The Workspace and Stage
The main area of the 'Layout' Panel is the workspace. The area within the workspace that corresponds to the viewable area of your Movie is called the stage.

Scroll bars automatically appear on the right and bottom of the workspace when the entire stage area does not fit within the 'Layout' Panel. In the picture above, the stage is too wide to fit in the 'Layout' Panel, so a scroll bar is displayed at the bottom. You can pan the workspace by moving the scroll bars or by using the Pan tool.

You can choose to display a Ruler at the top and left edges of the workspace. This helps you see x and y positions in pixels. Use the Rulers option on the View Menu or Movie Panel to turn the Rulers on or off. You can also choose to display a Grid over the workspace. Use the Show Grid option on the View Menu or Movie Panel to turn the Grid display on or off.

The Toolbox
The Toolbox is located along the the top-left edge of the workspace and contains the Tools that operate on the stage/workspace. The selected Tool determines what SWiSH does when you click and drag the mouse on the workspace.

Tool Options
The Tool Options Panel provides addional options for the Tools provided in the Toolbox. The Tool options shown (if any) depend on the Tool selected.

View Options
The Zoom controls are fixed to the bottom left of the workspace and allow you to change the Scale of the stage/workspace. You can increase the amount of Movie visible by zooming out, or see more detail by zooming in. You can also use the Zoom In or Zoom Out functions or the Zoom Tools on the View Menu.

The 'Layout' Panel has three modes of operation:
· editing mode
· 'Preview Frame' mode
· play mode.

Editing Mode
While in editing mode, you can arrange and edit Objects for the current Scene. You can show a context Menu by right-clicking on an Object or an unused area of the workspace. From this Menu you can perform various operations on the Scene or Object. You can also use the Main Menus and Toolbars.

When you are using the Select, Rotate or Reshape Tool, you can select an Object in the 'Layout' Panel by clicking on it. To select multiple Objects use Shift+Click or Control+Click. You can select an Object within a Group or Sprite using Shift+Control+Click. You can move an Object by dragging it. This changes the reference position of the Object.

The Object you have selected is displayed with 'handles' around it. Handles are small squares, or circles, at the bounding edges of the Object. You can change the Object or its Transform by dragging the handles that appear around it.

When a drawing Tool is active, clicking and dragging will perform whatever Action is appropriate for the selected drawing Tool.

Preview Frame Mode
You can select 'Preview Frame' mode by selecting the Preview Frame option from the Control Menu or the Control Toolbar, by clicking on the Frame Ruler in the Timeline Panel, or by selecting the Motion Path Tool. You can return to editing mode by turning off the 'Preview Frame' option, or by clicking on the Frame Ruler in the Timeline Panel.

When in 'Preview Frame' mode, the handles around the currently selected Object are red and a red play head appears on the Timeline Panel. Any Motion Path for the currently selected Object is indicated by a dotted line. Each dot on the Motion Path line corresponds to the position of the Object at a given Frame. The motion is made up of one of more Effects. The last Frame of each Effect is called a Keyframe, and is indicated by a larger blue dot in the Motion Path.

Most of the things you can do in editing mode you can also do while in 'Preview Frame' mode. However, you can only make changes to the current Transform for an Object (i.e. position, scale, angle, skew, color or alpha) when a Keyframe is selected in the Timeline Panel. When in 'Preview Frame' mode, you can edit the motion settings for the current Effect, rather than the reference position. This means you can directly edit the Transforms for a given Effect.

If you are using the Motion Path Tool, you can add Move Effects to the Motion Path by simply clicking the mouse. If you are using the Select, Rotate or Reshape Tools, you can double-click to add to the Motion Path.

Play Mode
You can view play mode by selecting Play Movie, Play Scene or Play Effect from the Control Menu or Control Toolbar. This previews the Movie inside the 'Layout' Panel as it would appear on a web page or in the Flash Player. Play Movie plays all the Scenes of the Movie in sequence. Play Scene plays only the current Scene. Play Effect starts at the first Frame of the first selected Effect and plays until the last Frame of the last selected Effect. If you have selected only one Effect, it will play the Frames for that Effect only. You can also select Play Effect from the 'Effect Settings' dialog box.

If you have checked the 'Loop preview animation' checkbox in the Movie Panel, then the preview will repeat until you stop it, otherwise it will play once and stop.

You can return to editing or 'Preview Frame' mode by selecting Stop from the Control Menu or Control Toolbar.

When in play mode, the currently selected Object does not show its handles. Right-clicking on the 'Layout' Panel shows a context Menu with information about the Flash Player, rather than the usual right-click context Menu. In this case, the 'Layout' Panel effectively become a 'Flash Player' window. Also, you cannot select Objects or drag them about in the 'Layout' Panel.


The Toolbox

The Toolbox is fixed to the top-left of the Layout Panel and contains the tools that operate on the workspace. The selected tool determines what SWiSH does when you click and drag the mouse on the workspace. For example, when the 'Line' tool is selected, a click and drag will create a line object, but when the 'Rectangle' tool is selected, a rectangular object will be created.

Double-clicking on a Toolbox tool locks them in until another tool is selected.

tbtoolbar

For more information see the Tools section.


Tool Options

The Tool Options panel provides addional options for the tools provided in the Toolbox. The Tool Options shown (if any) are dependant upon the tool selected.

tooloptions

See Tool Options for more information about the use of the options.


View Options

The View Options are fixed to the bottom-left corner of the Layout Panel. The view options allow you to quickly adjust the scale of the workspace and modify grid settings.

viewtoolbar

zoommenu Zoom Menu
Displays a pop-up Menu of common zoom factors (25%, 33%, 50%, 66%, 75%, 100%, 150%, 200%, 300%, 400%, 500%)

zoomfitscene Fit Scene In Window
Fits the entire Scene (stage area) into the 'Layout' window.

zoom100 View at 100%
Views the Movie at its actual size.

zoomin Zoom In
Zooms in on the stage by a factor of 1.5.

zoomout Zoom Out
Zooms out on the stage by a factor of 2/3.

showhidegrid Show Grid
Shows or hides the grid lines in the 'Layout' window.

snaptogrid Snap to Grid
Snaps to the nearest grid line or intersection in the 'Layout' window.


Cursors and Anchors

While working with the drawing tools and objects, various icons and cursors are used to define grab / drag points (anchors) and cursor context.

The meaning of those shapes and icons is defined below.

Anchors appear on and around the object. Anchors can be moved to alter the size / shape or proprties of a drawing object.

Anchor | Tool Option | Use
 | All | Shows the Anchor Point of the drawing object. When rotated, the object is rotated about the anchor point. The Anchor point is displayed in the Transform Panel. The anchor point can be moved by pressing and holding the Alt key (Alt) and the left mouse button and dragging this handle.
 | Scale | When this anchor is dragged, the object is resized via the scaling properties.
 | Resize, Perspective | When this anchor is dragged, the object is resize via the width and height properties.
 | Rotate / Skew | Then these anchor are dragged, the object is either rotated (corner anchor) or skewed (middle anchor).
 | All | This anchor appears in the text and autoshape objects. For autoshape objects, it changes the shape of the object. For text objects, it changes the margins.
 | All | This anchor appears when the Reshape tool has been selected. This anchor indicates a control anchor.
 | All | This anchor appears when the Reshape tool has been selected. This anchor indicates a vertex anchor.

Cursors appear at the current mouse location. The cursor icon changes to indicate when the object and anchors can be selected by pressing the left mouse button.

Cursor | Tools | Meaning
 | Select, Reshape | No object / anchor is currently selected.
 | Select, Reshape | The object Anchor Point can be selected
 | Select, Reshape | A scale or resize anchor can be selected.
 | Select, Reshape | The drawing object can be selected for moving.
 | Select, Reshape | An autoshape anchor (auto shape object) or a margin anchor (text object) can be selected.
 | Select, Reshape with Rotate option | The object has been selected for rotation around the defined Anchor Point. See Rotate option for more information.
 | Select, Reshape with Rotate option | The object has been selected for Skewing. See Rotate option for more information.
 | Select | Used to drag and re-position the guides.
 | Reshape | The item displayed by the cursor can be selected for reshaping.
'?' is an icon to indicate the chosen tool. | Motion Path, Line, Pencil, Bezier, Text, Ellipse, Rectangle, Autoshapes | Used for initial placement and sizing of drawing object.
 | Pan | Pans the workspace.


Outline Panel

The 'Outline' Panel shows an overview of the structure of the entire Movie.

panels-outline

The 'Outline' Panel has a row of buttons at the top. Below this is the 'Outline' tree. The order of Scenes in the tree determines the order in which the Scenes are played. The order of objects within a Scene or Sprite determines the stacking order. Objects higher up in the stacking order appear in front of objects further down, within the same Scene or Sprite.

panels-outline-insert Insert
You can insert Scenes and objects using the 'Insert' button. When you click on the button, you are given a Menu of things you can insert. You can also use the Insert Menu or the Insert Toolbar.

panels-outline-delete Delete
You can delete the currently selected object(s) or Scene by clicking on the 'Delete' button. If you try to delete a Scene, SWiSH will ask you to confirm that you want to delete the entire Scene.

panels-outline-moveup Move Up and panels-outline-movedown Move Down
You can change the order of Scenes, or the stacking order of objects, by using the 'Up' and 'Down' buttons. You can also reorder by dragging with the mouse, using the Ctrl+Up and Ctrl+Down keys, or using the Order options on the Modify Menu or the Standard Toolbar.

Outline Tree
The 'Outline' Tree show the Scenes and objects within the Movie.

panels-outline-outlinetree

Note:
· Scenes are on the root level of the tree
· objects are shown as children of Scenes
· Group, Sprite and Button Objects can have their own object children
· each item in the tree has an icon indicating the type of object
· all objects have an eye or padlock icon that controls visibility and edit state of the object during editing.

You can select Scenes or objects by clicking on them in the 'Outline' tree. You can also use Shift-Click and Ctrl-Click for multiple selections.

You can copy Scenes by using Ctrl-C and paste them with Ctrl-V.

You can edit the name of the selected Scene or object by clicking on its name or by pressing the F2 key. For text objects that do not have the 'Has Name' option checked, this will also change the text itself.

You can change the playing order of Scenes or the stacking order of objects by dragging them up and down within the 'Outline' tree.

You can expand the branch for a Scene, Group or Sprite by clicking on the small plus sign next to its name.

You can display the appropriate Object Panel for an object or Scene by double-clicking on it in the 'Outline' tree. For Sprites, the Timeline Panel is displayed when you double-click on the Sprite name.

You can display a context Menu of options appropriate for an object or Scene by right-clicking on it in the 'Outline' tree.

You can hide objects in the Layout Panel while in edit or 'Preview Frame' mode by turning off the eye icon next to its name. Click on the eye icon to toggle between on or off. For Button Objects, you can also choose to show all the button states simultaneously. Click on the eye icon until it changes to the multiple-eye icon. You can also use the corresponding commands on the Edit Menu.


Object Edit State

In order to assist with the selection of overlapping objects, each object can have its edit state set to Visible ( [image] ), Invisible ( [image] ) or Locked ( [image] ). The edit state is toggled between the 3 states by clicking on the Icon.

Visible
The object is visible and can be selected for editing from the layout panel. This object will obscure objects that are behind it and will prevent them from being edited.

Invisible
The object is invisible and can not be selected for editing from the layout panel. Objects normally obscured by this object can be edited. The object still will be visible during movie playback.

Locked
The object is visible but can not be selected for editing from the layout panel. This state is useful to prevent individual objects from being involved in a select all statement.


Timeline Panel

The 'Timeline' Panel contains time-based properties for the current Scene. The Scene is made up of a series of Frames, in the same way that a motion picture is made up of Frames. The Timeline is a visual representation of the Frames with the first Frame at the left and last Frame at the right

The top row shows the Frame Events and corresponding Actions for the Scene. These Actions are executed when the Movie reaches the Frame that the Action is located. Frame Actions always have a duration of one Frame, but you can execute more than one Action in a single Frame.

The rows below the Scene row represent the objects in the Scene. The rows are displayed in stacking order, with the object that is in front of all other objects displayed at the top (just below the scene row), and the object that is behind all other objects is displayed at the bottom.

Each object row shows the Effects that are applied to that object. Effects may have a duration of one or more Frames, but only one Effect can be applied to an object at any given Frame.

Seconds are marked in the timeline with black lines. The number or Frames shown between seconds is controlled by your Movies Frame Rate.

Note:
· A Scene contains zero Frames until you add an Effect or Action
· If you are editing a Sprite, the 'Timeline' Panel displays the Timeline for the Sprite

panels-timeline

Scene Navigation
You can navigate through your movies Scenes using the Scene Navigation arrows. The arrows appear only when there is more than one Scene in your Movie.

timeline-forwardarrow Forward Arrow
Moves to the Scene in your Movie.

timeline-backarrow Backward Arrow
Moves to the previous Scene in your Movie.

panels-timeline-addeffect panels-timeline-addaction Add Effect / Add Script
You can add a Script to a Scene Frame or add an Effect to an object using these buttons. You can display a Menu of Effects or Scripts by clicking on the 'Add Effect' or 'Add Script' buttons, respectively.

panels-timeline-delobject panels-timeline-deleffect panels-timeline-delaction Delete Object / Effect / Action
Deletes the currently selected object, Effect or Script. If no Script or Effect is selected the object will be deleted.

Options
Allows you to modify the timeline display options. The available options are:
· Narrow: makes the timeline frame width narrow.
· Standard width: makes the timeline frame width the standard width.
· Wide: makes the timeline frame with wide.
· Short: makes the timeline row height short.
· Standard Height: makes the timeline row height the standard height.
· Tall: makes the timeline row height tall.
· Show Seconds: seconds are marked in the timeline with black lines.

panels-timeline-minmax Minimize/Maximize
This button toggles the Timeline buttons between maximized (text and icon displayed) and minimized (icon-only displayed) states.

Timeline control
This is the most complex control in SWiSH, and is the key to combining and co-ordinating animations. The basic components of the Timeline control are listed below.

Frame Ruler
The Frame Ruler is located at the top of the Timeline and shows the Frame number. It also has markers for each one-second interval.

Play Head
The Play head also appears on the Frame Ruler when in Preview Frame mode.

Object Labels
Object Labels are used for selecting objects or the Scene or Sprite itself. When Show Formatting is turned on, the label shows the actual text color and font.

panels-timeline-upperlevel 'Up' Button
An 'Up' button will appear above the object list when you are editing the Timeline for a Sprite. It selects the Sprite or Scene the next level up in the stacking order.

Scene/Sprite Row
The Scene or Srite row is always the top row in the Timeline, although it may not be visible if you have scrolled down the Timeline control. This is where you can add or edit Frame Events. The corresponding Frame Action is automatically executed when the Movie reaches the Frame it is placed in.

Object Rows
Objects rows appear are under the Scene Row. They appear in stacking order, the same as in the Outline Panel. That is, objects at the top of the list will obscure objects at the bottom of the list in the Layout Panel. This is where Effects can be added, moved or edited.

Current Frame
The current Frame is highlighted. In Preview Frame mode, the red Play head also indicates the current Frame.

Using Frame Actions:

Adding Frame Actions
You can add Frame Actions by either clicking on the 'Add Action' button (while the Scene/Sprite row is selected) or by right-clicking on an empty Frame in the Scene/Sprite row. Any of the available Actions can be placed as a Frame Action. After you have added the Action, SWiSH displays a small icon in the Frame indicating the type of Action. When you move the mouse over the Action Frame, a ScreeTip indicates which Actions are executed at this Frame.

Note: A Frame Action is automatically executed when the Movie reaches the Frame in which it is placed

Moving Frame Actions
You can move Frame Actions by clicking and dragging the Frame to a new position. You can select multiple Actions and drag them together.

Editing Frame Actions
You can edit Frame Actions by clicking on the Frame. The Actions Panel will show the selected Action. If the 'Actions' Panel was not visible, then double-clicking on an Action Frame, or right-clicking and choosing Properties from the context Menu, will display the 'Actions' Panel.

Copying and Pasting Scripts
You can copy Scripts by right-clicking on a Script and choosing Copy from the context Menu or by pressing the Ctrl+C key. Similarly you can paste a copied Scripts by right-clicking on an empty Frame in an object row and choosing Paste from the context Menu or by using selecting a Frame and pressing the Ctrl+V key.

Deleting Frame Actions
You can delete Frame Actions by selecting the desired Action and then clicking the 'Delete Script' button, or by right-clicking on the Action and selecting Delete from the context Menu.

Using Object Effects:

Adding Effects
You can add Effects either by clicking on the 'Add Effect' button (while an object row is selected) or by right-clicking on an empty frame in an object row. You can select an Effect to add from the Menu. After you have added the Effect, SWiSH displays a rectangle with the Effect title and duration in the Timeline and also displays the Effect Properties dialog box. When you move the mouse over the Action Frame, a ScreenTip will show you the name of the Effect if it is partially obscured.

Moving Effects
You can move Effects by clicking and dragging the Effect to a new position on the Timeline. You can select multiple Effects in a single object row and drag them together.

Resizing Effects
Most Effects can be lengthened and shortened by dragging the ends of the Effect in the Timeline.

Note: Some Effects (such as Place and Hide) always only a single Frame in length. Others, like Typewriter, have their length determined by the Effect settings and the object to which they are applied. In these cases, the Effect cannot be resized directly on the Timeline.

Editing Effect Properties
You can edit the settings for an Effect by double-clicking on the Effect in the Timeline or right-clicking on the Effect and selecting 'Properties' from the context Menu. You can also edit the setting from the Effect Properties dialog box. The pages on the Effect Properties dialog box is different for each type of Effect.

Deleting Effects
You can delete Effects either by selecting them and then pressing the 'Delete Effect' button, or by right-clicking on an Effect and choosing Delete from the context Menu.

Copying and Pasting Effects
You can copy Effects by right-clicking on an Effect and choosing Copy from the context Menu or by pressing the Ctrl+C key. Similarly you can paste a copied Effect by right-clicking on an empty Frame in an object row and choosing Paste from the context Menu or by using selecting a Frame and pressing the Ctrl+V key.

Previewing Effects
You can preview Effects by right-clicking on the Effect and selecting Play Effect from the context Menu, or by using the Control Menu or Toolbar, or by clicking on the Play Effect button on the top of the Effect Properties dialog box. You can stop the preview by selecting the Stop option on the Control menu or Toolbar.

Inserting, Deleting and Playing Frames
Right-clicking a Frame in the Timline gives you the option of inserting, deleting or playing frames. To insert, delete or play multiple frames right-click and drag over a number of frames in the Timeline. If you right-click on an individual object Frames are only inserted or deleted from that object. The available options are:
· Insert Frame(s): Inserts the selected number of frames at the current frame.
· Delete Frame(s): Deletes the selected frames.
· Play Frame(s): Plays the selected frames.


Movie Panel

The 'Movie' Panel contains properties that are common to the entire Movie.

panels-movie

Background Color
Lets you change the background color of the Movie using the Color Selector. There is no alpha value for this color selection. This color is also used as the player background color when you export to HTML (unless you manually edit the HTML code). The default colour is white.

Width and Height
Lets you change the size of the stage of the Movie in pixels. This size is also used when you export to HTML, unless you use the Size 100% option, or manually edit the HTML code. The default setting is 400x300 pixels. The maximum size for the movie is 3277x3277 pixels. This is due to the limitations of the SWF format.

Frame Rate
Lets you change the speed of the Movie in Frames per second. The greater the number of Frames per second, the faster the animation will play. The default setting is 12 Frames per second.

Variable frame rate
When selected the Variable option will show every Frame of the movie. The movie may be slowed down inorder to show each frame.

Constant frame rate
When selected the Constant option will skip frames if necessary to keep the specified frame rate. This makes it possible to synchronise sounds and animation.

Stop playing at end of movie
Checking this option automatically adds a Stop Movie Action at the end of the Movie.
Note: This checkbox will only stop the movie in the main timeline, it will not stop any sprites that are currently playing. This is a Flash limitation. If necessary, use the stop() action to stop any sprites.


Object Panel

The 'Object' Panel shows the properties of a selected object.

The content and title of this Panel change depending on what object (if any) you have selected.

The different 'Object' Panels available are as follows:

· Button Object Panel
· Group Object Panel
· Scene Object Panel
· Shape Object Panel
· Sprite Object Panel
· Text Object Panel.


Button Object Panel

The 'Button' Panel shows the properties for the current button.

panels-object-button

Name
This is the name of the button that appears in the Outline Panel.

Target
If set, allows the object to be treated as a script object. The target option is only displayed if the object is named.

Track as menu
Button tracking refers to how a button behaves as it tracks the movement of the mouse. A Button Object can track the mouse in one of two modes:
· as a push button
· as a Menu.

The default setting to track as a push button (i.e. Track as menu turned off).

If the button is tracking as a push button (i.e. Track as Menu is turned off) and, while playing a Scene or Sprite, you click the button, all mouse movement Events are directed to the push button until the mouse button is released. This is called 'capturing' the mouse. For example, if you click a push button and drag outside the button (without releasing) the button changes to the Over state, and the pointer remains a hand cursor.

If the button is tracking as a Menu, then the mouse is not captured when you click on the button. If you click on a Menu button and drag outside, the button changes to the Up state, and the pointer reverts to an arrow cursor.

Has Seperate Over State
When selected adds the buttons over state to the Outline Panel . Editing the buttons over state allows you to modify the object show when the mouse is over the button. For example and different coloured version of the original button object may be shown when the button is scrolled over.

Has Seperate Down State
When selected adds the buttons over state to the Outline Panel . Editing the buttons down state allows you to modify the object show when the mouse clicks the button. For example and different coloured version of the original button object may be shown when the the button is selected.

Has Seperate Hit State
When selected adds the buttons over hit to the Outline Panel . Editing the buttons hit state allows you to modify the bounds for selecting the button. For example a larger version of the original button object may be used as the buttons hit state which would make the clicks just outside of the button be counted as a button click.

Use bounding box for hit-state
When checked, uses the bounding box as the hit area, otherwise uses the actual shape or letters themselves.


Group Object Panel

The 'Group' Panel shows properties for the current Group.

panels-object-group

Note: You will also see the 'Group' Panel when you select one of the button states. In this case, you cannot change the name of the button state

Name
This is the name of the Group that appears in the Outline Panel.

Target
If set, allows the object to be treated as a script object. The target option is only displayed if the object is named.


Scene Object Panel

The 'Scene' Panel shows properties for the current Scene.

panels-object-scene

Name
This is the name of the Scene that appears in the Outline Panel. It can also be used to identify the Scene in Goto Frame Actions

Color
This lets you change the background color for the current Scene using the Color Selector. If you use an alpha value of less than 100%, you can tint the Movie background color. If you use an alpha value of 0% (transparent is the default setting), the Scene will have the same color as the Movie default.

On click
Sets the following Actions for mouse clicks during the scene:
· Do nothing: No Action
· Go to Next Scene: Advance to next Scene
· Go to Link (URL): Lets you set an URL for the entire Scene. If the Scene is clicked while the Movie is playing the browser will display this URL in the specified HTML Target Frame. This is not the same as a Frame in the SWiSH Movie, but rather a HTML Frame.

Note: If you click on an object in the Scene that has an event handler for On Release, this will override the On click Action.

Label Scene
Labels the first frame of the Scene with the Label Scene name.

Use as anchor
Specifies the Scenes to be used as web page anchors, allowing the Forward and Back buttons in a web browser to be used to navigate through your Movie.

Use this scene as a background
Sets the scene to be displayed behind all subsequent scenes. On setting the 'Stop at End' and the 'Go to Next Scene' On click Actions are disabled.

Stop playing at end of scene
Automatically stops the Movie at the end of the Scene.

Apply these settings to all scenes
Automically applies the properties of the current Scene to all the Movies Scences except for those with the 'Use this scene as a background' selected.


Shape Object Panel

The 'Shape' Panel shows properties for the current shape.

panels-object-shape

Name
This is the name of the shape that appears in the Outline Panel.

Target
If set, allows the object to be treated as a script object. The target option is only displayed if the object is named.

Line style
You can select from a number of line styles for the line around the outside of the shape. The default style is solid. If you do not want a line around the outside of the shape, select None from the Menu.
panels-object-scene-linestyle
If you choose the custom option, then you can directly define the line style using the 'Custom Line Style' dialog box. This allows you to define the line style by a combination of minus signs and spaces. The window at the bottom of the dialog box shows you a preview of what the line style looks like. When you have the line style you want, press the 'OK' button.

panels-object-shape-customlinestyle

panels-object-shape-linethickness Line thickness
You can change the thickness of the line around the outside of the shape (if any). The default thickness is 1.

Line color
You can change the color of the line around the outside of the shape (if any) using the Color Selector. The default col our is black.

Fill style
You can select the fill style of a shape from a number of styles. The default setting is solid, though if you want the interior to be hollow, select 'None' from the Menu.
panels-object-shape-fillstyle
· Solid: uses a single color, which may have a degree of transparency (alpha value). Click on the 'Fill Control' or colored button to change the color using the Color Selector
· Linear gradient: uses a smooth change in colors in straight bands across the shape. The Fill Control lets you change the colors in the gradient (see below)
· Radial gradient: uses a smooth change in colors in circular bands across the shape. The Fill Control lets you change the colors in the gradient (see below)
· Tiled image: uses a bitmap image to fill the shape. If the image is too small to fill the shape completely, then the image is tiled. Click on the Fill Control to select an image
· Clipped image: uses a bitmap image to fill the shape. If the image is too small to fill the shape completely, then the outside pixels are stretched. Click on the Fill Control to select an image

Fill Properties Button
When you select a gradient or image fill style, the 'Properties' button is displayed. If you press the 'Properties' button, you can directly edit the fill Transform in a dialog box. For image fills, you can also change the compression (image quality).

The 'Gradient Properties' dialog box is represented below.

The controls are the same as for the Transform Panel. However, in this case, the Transform applies to the fill pattern within the shape, rather than the shape within the Scene. You can also visually edit the fill Transform using the Fill Transform tool.

For image fills the title bar shows you the size in pixels and color depth of the image. The dialog box looks like this:

panels-object-shape-fillproperties

There are several extra controls at the bottom right hand corner of the 'Image Fill' dialog box:
· When the 'No Smooth' setting is checked, the bitmap that have been resized will never be smoothed. This can result in a clearer image in some cases, as smoothing can blur images.
· The 'Preload image' function lets you select where you want the image definition to appear in the .swf file. See the Export Panel for more information.
· A preview of the image is provided along with it's Width, Height, Bits/Pixels and Size in bytes.
· The Contrast controls allow you to adjust the overall contrast of the image.
· The Brightness controls allow you to adjust the overall brightness of the image.
· The Saturation controls allow you to adjust the colour saturation of the image.
· The Hue controls allow you to adjust the hue of the image. Changing the hue can add a tint to the whole image.
· The Resolution setting allows you to adjust the images pixel resolution to a percentage of the original resolution.
· There are two types of image compression for SWF files. ZIP compression is 'lossless' compression, which means compression does not change the image quality or alter the image content. It uses the same compression as .zip files. You cannot control the compression ratio. It gives similar results to .gif or .png compression. JPEG compression is 'lossy' compression, which means image quality is reduced during compression. You can control the compression indirectly using the Quality setting. This is the same compression that JPEG files use
· If you have selected ZIP compression and the image was originally imported at 16-bit colour or higher you can choose to save the image in 8 or 16 bit/pixel format.
· If you have selected JPEG compression, you can decide whether to use the existing JPEG compression of your imported image, or have SWiSH recompress the image itself to the quality level you select. Some images must be recompressed because they use progressive JPEG encoding, which will crash the Flash Player if not recompressed, or because the original file is not JPEG compressed
· If you have selected JPEG compression and have selected to recompress the JPEG image, you can specify the image quality. The higher the value, the better the image quality, the larger the files size and the less compression. The quality is not directly related to the compression ratio
· The 'Transparency' checkbox is only available for opaque images. When the 'Transparency' setting is checked, you can make the specific color from the image transparent. The 'Tolerance' setting controls how similar to the specified color the pixel must be before it is changed to transparent. The valid tolerance setting is between 0 and 255. At low settings, the colors must be close. At higher settings the tolerance is greater, so more pixels are made transparent

Fill control
The fill control changes depending on the fill style you have selected.

For solid fills, the control shows you the fill color. Click on the colored 'Fill control' button to select a different color.

panels-object-shape-fillcontrol-solid

For gradient and image fills a list of predefined images and gradients is available by clicking on the dropdown arrow next to the fill control.

For gradient fills, the control shows you the gradient. Click to place new colors onto the gradient. Click on a triangular colored handle to change the corresponding color using the Color Selector. Drag the handles along the gradient to adjust their positions. Hold the shift key while dragging to snap the handle to the grid marks provided. Drag the triangular colored handles completely off the bar to delete them.

panels-object-shape-fillcontrol-gradient

For image fills, the control shows you the image. Click on the control to select and load a new image file. Double click on the image to reload the current image file.

panels-object-shape-fillcontrol-image

Solid shape with overlap filled
This function forces the shape to have no border and to be filled with a single solid color. Any areas where the shape has overlaps will be filled. This is different to the usual behavior of shapes, where overlapping areas are left hollow. You may find this setting useful when setting up masks for Sprites. The default setting is to have this function turned off.

Note: There is a bug in Flash, such that it will crash when trying to import a .swf file that has the 'Solid shape with overlap filled' option turned on for any shape

Always fit fill to shape
Lets you automatically set up the fill Transform so that the fill will always fit the shape while reshaping.


Sprite Object Panel

The 'Sprite' Panel shows properties for the currently selected Sprite.
Once named, a sprite can be treated as a script object.

panels-object-sprite

Name
The name of the Sprite appears in the Outline Panel. It can also be used to identify the Sprite when making or inserting a new Instance or in various scripting commands such as isNearTarget(), nextFrameAndPlay() etc.

Instance of
An Instance is a clone of a reference Sprite. Whenever you make a change to either the reference Sprite or the Instance, the other is automatically updated so that they remain the same. The Instance and reference Sprite can have their own independent settings for name, background and so on, and have their own Effects and Events.

Background
This property lets you select how you would like the background image of the Sprite to appear when you expand it for editing. This option reminds you that you are editing the contents of a Sprite, rather than the content of a main Movie Scene. The settings do not affect the appearance of the Sprite when it is not being edited. The default setting for this function is a single color.

Background Color
This lets you change the background color for the Sprite using the Color Selector. If you use an alpha value of less than 100%, you can tint the Movie background color. If you use an alpha value of 0% (the default), the Scene will have the same color as the Movie default.

Track as menu item
Sets whether or not the Sprite can receive mouse release events. This option is typically used when using Sprites as menu items.

Loop
When checked, the Sprite will play continuously as long as it is placed. Otherwise it will play once and stop at the last Frame. The default setting is to have the loop option turned on.

Masked
When checked, the object in the bottom-most layer of the Sprite becomes the mask shape. The rest of the Sprite content will only be visible where the mask shape is filled. Any Sprite content outside the mask shape is invisible. The default setting is to have the masking option turned off.

Note: The masking shape must be a single shape or text object. The masking shape cannot be a Scripting Object. Masking will not work if these conditions are not met. If Scripting is added to the mask object, it will convert that object to a Scripting Object and the mask will no longer work.

Show icon while editing
When checked, an icon is displayed for the Sprite instead of its contents, unless you are playing the Movie. You may want to check this option if the Sprite contents are complicated and this slows down the program while you are editing. The default setting is to have the icon option turned off.

Only show 1st frame if it's closed
When checked, only the child objects shown in the 1st frame of the sprite are displayed, unless the sprite is expanded or the movie is played. You may want to check this option if the Sprite contents are complicated and this slows down the program while you are editing. The default setting is to have the icon option turned off.


Text Object Panel

The 'Text' Panel shows properties for the current Text Object.

panels-object-text

Note: You can only specify a single font, style and color for a Text Object. You cannot mix colors or styles in the one Text Object

Name
This is the name of the text object. It is also the name that appears in the Outline Panel. If no name is specified, the outline panel will display the actual text. A name must be specified if the text object is a Scripting Object.

Target
If set, allows the object to be treated as a script object. The target option is only displayed if the object is named.

Font Selection
You are able to choose the font for the current Text Object. Only TrueType and Postscript fonts can be used with SWiSH. The pull-down Menu lists all the TrueType and Postscript fonts installed on your computer. When the pull-down list is activated, a window appears next to the current selection showing you what the font looks like.

Font Size
Lets you choose the size of the font (in points) for the current Text Object. You may select the size from the drop-down list of preset sizes, or type the size into the available space.

panels-object-text-color Text Color button
Lets you select the color of the Text Object using the Color Selector. You may select both color and transparency value (alpha). The default text colour is black.

panels-object-text-usedevicefonts Use Device Fonts
Specifies that the Flash Player uses device fonts to display the text. Using device fonts means no fonts will be embedded into the Movie, instead the Flash Player will use the font on the local machine that is the closest match. Using device fonts can decrease the Movie size and increase readability for text under 10 points.

panels-object-text-bold Bold and panels-object-text-italic Italic Buttons
Lets you set the style of the text to plain, bold, italic or a combination of both. The default settings are for plain text.

panels-object-text-left panels-object-text-center panels-object-text-right panels-object-text-full panels-object-text-top panels-object-text-centerv panels-object-text-bottom panels-object-text-fullv Justification
Lets you set the text justification to left/top, right/bottom, centered or both sides. This only applies when you have multiple lines of text. The default setting is centered text. For a single line of text, the text always fills the bounding box.

panels-object-text-flow Text Flow
Lets you select the direction of the text flow. The flow can only be deinfed for Static Text. The available directions are:
panels-object-text-lrtb from left to right, top to bottom. This is the default setting.
panels-object-text-tbrl from top to bottom, right to left.
panels-object-text-rltb from right to left, top to bottom.
panels-object-text-tblr from top to bottom, left to right.

panels-object-text-insertcharacter Insert Character
Allows you to selected special characters to be inserted from the drop-down menu provided.

Text Type Selection
Text objects can be defined as one of three types:
· Static: A standard text object.
· Dynamic: A text object that can be altered by a script while the Movie is running.
· Input: A text object that can be altered by the Movie viewer, typically used for input forms.

Hide Options/Dimensions/Formatting/Advanced
Displays the following text options dependant upon your selection:

· Hide Options
Hides the dimensions, formatting and advanced text options.

· Dimensions
Displays the following options for controlling your text fields dimensions:

panels-object-text-hasmargin Enable Margins and Indent
This option allows you to set Margins and an Ident for your text object. When selected you can set the following options:

Indent
Sets the amount to indent the first line of the Text Object.

Width
Sets the sizes of the right margin for the Text Object.

panels-object-text-autosizeheight Auto-Size Height
When selected defines the height of the text field to be the size of the text. When unselected you can define the height of the text field using the Height/Lines selection.

Height/Lines
When Height is selected you can define the height of the text field to be a set number of pixels. When Lines is selected you can define the height of the text field to be a set number of lines.

· Formatting
Displays the following formatting options:

panels-object-text-kerning Auto Kerning
When selected the Auto Kerning option uses the kerning settings in the font in use.

panels-object-text-htmltext Render Text as HTML
Preserves HTML text formatting options such as size and hyperlinks for input and dynamic text fields. HTML text formatting can only be seen externally from SWiSHmax, for example using File | Test | In Player. The HTML tags <A>, <B>, <FONT COLOR>, <FONT FACE>, <FONT SIZE>, <I>, <P>, and <U>. The HTML attributes supported are LEFTMARGIN, RIGHTMARGIN, ALIGN, INDENT, and LEADING.

panels-object-text-wraptext Wrap Text at Word Breaks
Wraps lines of text at the end of the text field, otherwise text is only wrapped at carriage returns.

Kerning
The Kerning control adjusts the horizontal distance between characters in a word. A negative number will move the characters closer together, while a positive number will move the characters further apart. A value of zero (the default setting) resets the kerning to the standard distances defined by the font.

Leading
The Leading control adjusts the vertical distance between lines in a multi-line Text Object. A negative number will move the lines closer together, while a positive number will move the lines further apart. A value of zero (the default setting) resets the leading to the standard distance defined by the font.

· Advanced
Displays the following advanced text options:

panels-object-text-blackborder Black Border with White Background
Shows the text field with a black border and a white background.

panels-object-text-textisselectable Text is Selectable
The user can select the text in the text field.

panels-object-text-passwordtext Password Text
The * character is displayed for each text character, useful for password input fields.

panels-object-text-multilinetextbmp Multiline Text
Allows users to use the enter key for newlines when entering text in an input text field.

panels-object-text-useparent Use Parent Name as Text
Uses the name of the partent group/sprite/button/scene as the text. Useful for text in button states, as the text that appears in the button has the same name as the button.

Text window
The text window is the large window in the middle of the Panel, where text is entered and edited. New lines can be added by pressing the Enter key. Changes in the text window are updated in the Layout Panel as you type. If you have the Show Formatting option enabled (in Tools Preferences), then the text in the windows will be displayed in the font and color you have chosen. However, the font size remains unchanged so that the text does not become too large or small to be legible. The word "text" is the default setting.

A text object with Margins has additonal handles that allow adjustment of the Margin and text box size.

Advanced
The advanced text options are enabled or diabled dependant on the type of text object. Most fields are disabled for Static text,
some fields are disabled for Dynamic text and all fields are enabled for Input text.

panels-text-advanced

Associate with variable
If the dynamic/input text field is a target, then setting this option lets you use a variable to access the text field contents, otherwise you need to use the ".text" property of the text field. If you do set this option, then the variable you specify MUST have a name different to the name of the text field itself. If the dynamic/input text field is NOT a target, then it is automatically associated with a variable of the same name (eg. for a simple text field called 'myfield' you would use the variable also called 'myfield' to access the text field contents via the scripting language. See Text Field Object for more information on scripting).

Input text
Options only available for input text:
· Maximum characters : The maximum number of character that can be entered.
·

Characters for embedded fonts
Defines which characters will be emebedded in the Movie:
· No embedded characters (use device font) : No characters embedded.
· All characters (ASCII) : All character embedded.
· Characters from these groups : A define set of characters will be embedded.
· Upper case letters (A..Z ) : Embed all upper case letters
· Lower case letters (a..z) : Embed all lower case letters
· Digits (0..9) : Embed all digits
· Punctuation : Embed all punctuation characters
· These characters : The inputed set of characters will be emebedded ( Note: No spaces or commas are required between the character list)


Script Panel

The 'Script' Panel contains all the Events and Actions for the currently selected Scene or object.

The top section of the panel displays the 'Script' tree. The 'Script' tree section of the panel can be used to select a specific event or action. The bottom section of the panel displays the 'Script Command Properties' of the currently selected event or action.

The exact layout of the bottom section will depend on the function/command that has been selected. In the example below, the bottom section of the Panel shows the properties of the currently selected Goto Frame Action.

panels-action

panels-script-addscript Add Script
This button adds a new Event Handling Function, Action or User Defined Function. Pressing the 'Add Script' Button displays the 'Script' tree as shown below:

panels-script-tree

The first section of the 'Script' tree contains the available Events as below:

panels-script-events

The second section of the 'Script' tree contains the available Actions. The third section contains only the 'Define function(...)' option which is used for create User Defined Functions.

panels-script-deletescript Delete Script
You can delete Events and Actions by selecting them in the 'Script' tree and then clicking on the 'Delete' button. If you delete an Event, its associated Actions will also be deleted. Similarly, if you delete a If Frame Loaded Action, its child Actions will also be deleted.

panels-script-up panels-script-down Up/Down
You can change the order of Events and Actions using the 'Up' and 'Down' arrow buttons. However, changing Event order has little practical use.

Script tree
This shows the Events and Actions for the currently selected Scene or object. Events are shown at the root of the tree, and Actions are shown as children of Events.

Current Script label bar
This bar show the currently selected Event or Action. The properties of the Event or Action appear below this bar.

panels-script-normal panels-script-expert Guided/Expert
Allows you to select an a 'Script' Panel view mode. In Guided mode all scripts are added through the 'Script' tree and the script properties provided. In Expert mode scripts can be typed directly into the 'Script' Panel. The 'Script' tree can still be used, but script properties need to be typed in manually.

Note: There is a dragable splitter between the 'Script' tree and the script properties section below allowing you to resize the panel as needed.

panels-script-e Expressions (Script Command Properties section).
Most actions and event functions accept parameters. In some cases string parameters are expected,
eg."frame_1".
The (e) button can be used to enter a forumla that results in the creation of the appropriate string. Once the (e) button is selected for a field:
· Expressions can be entered
· The field will be displayed in brackets
· The script entered will be display in a blue font
Right-clicking the field will display the Script Syntax menu

eg. If the variable fr contains 1, then the expression ("frame_" add fr) would evaluate to "frame_1" which would then be used as the action parameter.


Transform Panel

The 'Transform' Panel shows how the current object's position, size and angle of rotation of the X and Y axes can be altered.

panels-action-transform

When is Preview Frame mode some of the Tranform edit boxes are shown in red type if a Key Frame is selected. The red type indicates the options that will modify only that keyframe and not the object as a whole.

X and Y position
These boxes provide the X,Y coordinates of the object's alignment point. The alignment point can be the center (default) of the object or any corner or side.

Width and Height
These boxes provide the width and height of the object.

panels-transform-xscale X-scale and panels-transform-yscale Y-scale
These are the scale factors applied to the width and height of the object as a percentage.

Uniform scale checkbox
If you turn on the 'Uniform' checkbox, the x and y scale are always the same. If you turn it off, you can change the values independently.

panels-transform-xangle X-angle and panels-transform-yangle Y-angle
The is the angle of rotation of the object's x and y axes. If both values are the same, then the object is rotated by that amount. If they are different, then the object is skewed.

Uniform angle checkbox
If you turn on the 'Uniform' checkbox (the default setting), then the x and y angles are always the same and you rotate the object. If you turn it off, you can change the values independently and you can skew the object.

Anchor Point
This feature allows you to specify which part of the object will be the anchor point. For example, if you select Top left from the pull-down list, the X and Y position will refer to the top-left corner of the Text Object. The anchor point is indicated by a small cross (x) in the 'Layout' Panel. The anchor point also serves as the center of rotation when using the Rotate/Skew Tool. The default setting is for the center of the object to be the anchor point. If Custom is selected from the pull-down list you can specify the X and Y co-ordinates for the anchor point.

Mode
Determines whether an object will be Scaled or Reszied when it's transformed. If you select Resize, you can transform a shape without changing its line width. If you select Scale, the line width will be scaled with the object.

Copy
Copies all the Transform settings of an Object.

Paste
Pastes all the transformed settings of a copied Object onto to the current Object. The Paste option has no affect if a Transform Copy hasn't already been made.

Reset button
You can reset the scale factors to 100% and the angles of rotation to 0 degrees by pressing the 'Reset' button.


Tint Panel

The 'Tint' Panel lets you adjust the color Transform for a given object. This is especially useful when you are in 'Preview Frame' mode, as you can easily edit the color Transform for the currently selected Effect.

panels-color

There are two parts to the 'Tint' Panel:
· the 'Alpha' control
· the 'Color' control.

The options available depend on the selections you make from the pull-down lists.

When is Preview Frame mode some of the Tint edit boxes are shown in red type if a Key Frame is selected. The red type indicates the options that will modify only that keyframe and not the object as a whole.

Alpha control

There are four selections for the 'Alpha' control.

1. Unchanged: the alpha (transparency) value for the selected object is unchanged
2. Transparent: sets the alpha value to 0%, making the object completely transparent
3. Custom: you can specify the alpha value as a percentage of the current value.
panels-color-alpha-custom
A value of 0% will make the object transparent. A value of 100% will leave the alpha unchanged. A value higher than 100% will make any transparent areas of the object more opaque.
4. Advanced: you can specify the new alpha value by taking a percentage of the current alpha value and adding a value to the result.
panels-color-alpha-advanced
For example, setting the percentage to 0% and adding 100% will mlake the object 100% Opaque

Color control

There are five selections for 'Color' control.

1. Unchanged: the color of the selected object is unchanged
2. Black: the object appears completely black (even if the object had multiple colors before)
3. White: the object appears completely white (even if the object had multiple colors before)
4. Custom: you can specify the color for the object using the Color Selector.
panels-color-color-custom
The selected color is mixed with the original color of the object. The alpha value of the selected color gives the proportion of the selected color to mix. If the alpha value of the selected color is 0%, then the color of the object is unchanged; if the alpha is 100%, then the colour of the object is completely replaced by the selected color; if, for example, you select a color with an alpha of 30%, then the new color will be a mix of 30% of the selected colour with 70% of the original color. Select the color by clicking on the color button to the right of the 'Color' Panel
5. Advanced: you specify the red, green and blue components individually.
panels-color-color-advanced
For each one, you specify the new value by taking a percentage of the current value and adding a value to the result. For example, you might set the red component to 255, reduce the green component to 50%, and leave the blue component unchanged


Content Panel

The Content Panel shows all the content available for use in your Movie. The content is divided up into Sounds, Images and Sprites.

panels-content

· Import: Imports new content into the Movie. See the File | Import option for more details.
· Reload: Reloads the content from disk into the Movie.
· Delete: Deletes the selected content from the Movie.
· Properties: Access Properties used for the content throughout the Movie.
· Add to Scene: Adds the content to the current Movie Scene.

You can drag and drop an content item from the Content Panel onto the Layout Panel, which will add the item to the currently selected Scene in the Movie.


Align Panel

The Align Panel allows multiple objects to be aligned, distributed, spaced and resized.

panels-align

The button images indicate the type of alignment, distribution, spacing or resizing to be performed.

Align

Align Left
Align selected objects to the left.

Align Horivontal Center
Align selected objects to the center horizontally.

Align Right
Align selected objects to the right.

Align Horizontal Anchor
Align selected objects horizontally by anchor point.

Align Top
Align selected objects to the top.

Align Vertical Center
Align selected objects to the center vertically.

Align Vertical Bottom
Align selected objects to the bottom.

Align Vertical Anchor
Align selected objects vertically by anchor point.

Distribute

Distribute Left
Distribute selected objects horizontally by left side.

Distribute Horizontal Center
Distribute selected objects horizontally by center point.

Distribute Right
Distribute selected objects horizontally by right side.

Distribute Horizontal Anchor
Distribute selected objects horizontally by anchor point.

Distribute Top
Distribute selected objects vertically by top side.

Distribute Vertical Center
Distribute selected objects vertically by center point.

Distribute Bottom
Distribute selected objects vertically by bottom side.

Distribute Vertical Anchor
Distribute selected objects vertically by anchor point.

Space Evenly

Space Horizontally
Space selected objects evenly horizontally.

Space Vertically
Space selected objects evenly vertically.

Space Both
Space selected objects evenly both horizontally and vertically.

Make Same

Same Width
Make selected objects the same width.

Same Height
Make selected objects the same height.

Same Size
Make selected objects the same height and width.

Align relative to:
All Selected | Makes all the alignment options align relative to all the selected objects.
Last Selected | Makes all the alignment options align relative to all the last selected object.
Parent | Makes all the alignment options align relative to selected the objects parent. This is useful for positioning / aligning objects within a sprite.
Stage | Makes all the alignment options align relative to the stage.

Size by:
Scaling | Scale selected objects when changing size.
Resizing | Resize selected objects when changing size.


Guides Panel

The Guides Panel allows you to alter settings associated with the placement Grids, Guides and Rulers.

panels-guide

Guides

showguides Show Guides
Enables / disables the display of guide lines.

snapguides Snap to Guides
Enables / disables the snapping to guide lines.

colorselector-button Color
Allows you select the color for the Guide lines when displayed using the Color Selector. There is no alpha value available for this color selection.

ruler Show/Hide Rulers
Shows (or hides) Rulers along top and left sides of the stage. The default setting is to have Rulers hidden.

lockguides Lock Guides
If set, prevents existing guide lines from being moved.

clearguides Clear All Guides
Clears all existing guide lines.

See the Guides section for more information on placing and moving guide lines.

Grids

showgrid Show/Hide Grids
Shows or hides a Grid over the stage area. The colour of the Grid can be specified along with the Grid spacing. The default setting is to have no Grid.

snapgrid Snap to Grid
Snaps object handles and locations to the nearest Grid line. This helps you obtain consistent sizes for and positions of objects. The snapping occurs regardless of whether the Grid is visible or not. The default setting is to have Snap to Grid turned off.

colorselector-button Color
Allows you select the color for the Grid lines when displayed using the Color Selector. There is no alpha value available for this color selection. The default colour is grey.

Spacing - Horizontal and Vertical
Lets you specify the Grid size as pixels. The Grid can be used for display and for snapping object handles to the Grid. The default setting is 20x20 pixels.

Snap

Tolerence
The number of pixels from a snap location that'll will still cause an object to snap.

snappixel Snap to Pixel
Snaps object handles and locations to the nearest Pixel. A Pixel Grid will also be displayed when the movie is viewed at >=500% zoom.

snaphandle Snap to Object Handles
Snaps object handles so they align with neighboring objects. The default setting is to have Snap to Object Handles turned off.


Export Panel

The 'Export' Panel allows you to control the generation of the .swf file for the Test in Player and Export SWF commands, and both the .swf and .htm files for the Test in Player and Export HTML commands.

panels-export

The content of the 'Export' Panel changes depending on what you select in the 'Show export options for' box. The image above shows the Movie export options.

The export options available are as follows:
· Movie export options
· This Scene export options
· Selected Object export options
· SWF (Flash) export options
· Script export options
· HTML (Tags) export options
· AVI (Video) export options


Movie Export Options

The Movie option of the 'Export' Panel allows you to control the generation of the .swf file for the Test in Player, Export SWF and Export HTML commands.

panels-export-movie

When you export a Movie using File | Export | SWF, SWiSH generates a .swf file. When you export a Movie using File | Export | HTML, SWiSH generates both .swf and .htm files. The options shown above pertain to the .swf file.

Preload Content
This is the value for Preload Content that all Scenes in the Movie will use. You can override the value for individual Scenes or objects. The default setting is At Preload Action. See the Selected Object Export Options for more information about Preload Content options.

Share Fonts
This sets the default value for Share Fonts for all Scenes in the Movie. However, individual Scenes or Text Objects can override these defaults. The default setting is Across Movie. See the Selected Object Export Options for more information about Share Font options.

Text Defined As
This sets the default value for whether Text will be exported as Text or as individual shapes for each letter in the Movie. This sets the default value for Text for all Scenes in the Movie. However, individual Scenes or Text Objects can override these defaults. See the Selected Object Export Options for more information about Text Defined As options.

Text Effects Use
When Complex Effects are applied to Text Objects, SWiSHmax needs to break the text into individual objects for each character within the .swf file itself. This option specifies what sort of objects SWiSHmax will break the text into. Changing this setting can affect the overall .swf file size. The default setting is have colored and scaled objects.

Use Bounds As Text Hit-Area
When a button has a mouse or self event, uses the overall bounds of the text as the active hit areas instead of the individual letter shapes.

Image Quality
Only applicable to JPEG compressed images that specify image quality, specifies image quality up to 100%. 0% would reduce the quality of the affected images to 0% resulting in a small file size but very poor quality. 100% would not change the quality for the images, and would use the settings for each individual image. This sets the default value for the Image Quality setting for the Movie. However, individual Scenes or Objects can override these defaults.

Image Resolution
Specifies an images resolution up to 100%. Reducing an images resolution will reduces the images file size but add a mosaic effect to it. For an 100x100 pixel image, rsetting the resolution to 50% will make it export as a 50x50 pixel image scaled by 200% to mantain the original image size. This sets the default value for the Image Resolution setting for the Movie. However, individual Scenes or Objects can override these defaults.

Shape Quality
Specifies the shape quality up to 100%. Reducing a shapes quality will shift the vertices and control points in a shape to allow for smaller file size. Reducing quality will reduce the detail in the shape and change curvature of curved edges. Setting a shape quality of 0% will reduce the shape quality of all affected shapes to 0%, so they will become a single simple shape. Setting a shape quality of 100% would not change the quality for the shapes, and would use the settings for each individual shape. This sets the default value for the Shape Quality setting for the Movie. However, individual Scenes or Objects can override these defaults.


This Scene Export Options

The Scene option of the 'Export' Panel allows you to control the default Export SWF settings for objects in the Scene for the Test in Player, Export SWF and Export HTML commands.

panels-export-scene

Preload Content
This sets the default value for Preload content for all objects in the Scene. However, individual objects can override these defaults. The default setting is Movie default. See the Object Export Options for more information about Preload Content options.

Share Fonts
This sets the default value for Share Fonts for all objects in the Scene. However, individual objects can override these defaults. The default setting is Movie default. See the Object Export Options for more information about Share Font options.

Text Defined As
This sets the default value for whether Text will be exported as Text or as individual shapes for each letter in the Scene. However, individual Text Objects can override these defaults. See the Selected Object Export Options for more information about Text Defined As options.

Image Quality
Only applicable to JPEG compressed images that specify image quality, specifies image quality up to 100%. 0% would reduce the quality of the affected images to 0% resulting in a small file size but very poor quality. 100% would not change the quality for the images, and would use the settings for each individual image. This sets the default value for the Image Quality setting for the Scene. However, individual Objects can override these defaults.

Image Resolution
Specifies an images resolution up to 100%. Reducing an images resolution will reduces the images file size but add a mosaic effect to it. For an 100x100 pixel image, rsetting the resolution to 50% will make it export as a 50x50 pixel image scaled by 200% to mantain the original image size. This sets the default value for the Image Resolution setting for the Scene. However, individual Objects can override these defaults.

Shape Quality
Specifies the shape quality up to 100%. Reducing a shapes quality will shift the vertices and control points in a shape to allow for smaller file size. Reducing quality will reduce the detail in the shape and change curvature of curved edges. Setting a shape quality of 0% will reduce the shape quality of all affected shapes to 0%, so they will become a single simple shape. Setting a shape quality of 100% would not change the quality for the shapes, and would use the settings for each individual shape. This sets the default value for the Shape Quality setting for the Scene. However, individual Objects can override these defaults.


Selected Object Export Options

The Object option of the 'Export' Panel allows you to control the generation of the .swf file for the Test in Player, Export SWF and Export HTML commands.

panels-export-object

Preload content
This option determines where object definitions are written to the .swf file. By grouping definitions, you can avoid delays or jerkiness while the Movie is playing. The Preload content options are as follows:
· Disabled: definitions are written out at the Frame where the object is first placed. If the definition is large because you have a large object or block of text, or if the connection speed is slow, this could introduce a short delay or jerk in the playback
· Before Scene: definitions are grouped together at the start of the Scene. This may mean a short delay before the Scene starts playing, but such delays are generally less noticeable than those that occur while the Scene is playing
· Before Movie: definitions are grouped together before the first Frame of the Movie. This can mean a delay before the Movie begins to play
· At Preload Action: you can add a Preload Content Action as a Scene Event. This acts as a marker for where you would like definitions to appear. Any objects before the first Preload Content option are treated as though Preload content was disabled
· Scene default: the value for this setting is taken from the default defined for the Scene, and is not overridden here. This is the default and unless you change Scene and Movie settings the effective value will be the same as the At Preload Action setting.

Share Fonts
Font definitions in a .swf file define the shapes for characters. To save space, only the actual characters used appear in font definitions. This setting lets you specify where font definitions are written out and what they contain. Unless you particularly want to override the default setting for the Scene, you should leave the setting as 'Scene Default'. The possible values for this setting are:
· Disabled: a separate font definition is written out for each Text Object for the characters used in that text object only
· Across Scene: font definitions are written out at the start of the Scene that include all the characters used in the Scene. This saves space by combining multiple fonts
· Across Movie: font definitions are written out at the start of the first Scene found that has any Text Objects with Share fonts set to Across Movie. These definitions include all the characters used in the Movie
· Scene default: The value for this setting is taken from the default defined for the Scene, and is not overridden here. This is the default and unless you change Scene and Movie settings the effective value will be the same as the Across Movie setting.

However, in all cases, if a font has already been defined that includes all the necessary characters, the existing font definition is used. In general, an effective value for the Across Movie setting will result in the smallest .swf size. However, it may mean that there is a delay at the start of the Movie when fonts are defined. This can be a problem if you are using a preloader. In this case, it is common to use Across Scene as the default for the preloader Scene, and Across Movie as the default for subsequent Scenes.

Text Defined As
This option lets you export the characters of the Text Object as individual shapes rather than as fonts and text. This should make no difference visually. However, if you later import the .swf file, you cannot edit any text that has Text as shapes enabled. You may also need to use this option if your text does not appear in the correct font when importing it into another application, such as Flash. The possible values for this setting are:
· Text: text is not exported as shapes, but rather is exported as font definitions and text records. If Complex Effects are used, then SWiSH will automatically define the text as individual objects for each character, so the characters can be animated individually
· Shape: text is converted into shapes. SWiSHmax generates separate shape definitions for each combination of font size or color.
· Scene default: the value for this setting is taken from the default defined for the Scene, and is not overridden here. This is the default and unless you change Scene and Movie settings the effective value will be the same as the Disabled setting.

If you need to define text as shape, the most efficient setting will depend on the variety of letters, fonts, font sizes and colors that you use. You should experiment with the settings for each individual Movie to get the smallest possible .swf size.

Uses Physics Properties
Lets you control the motion of the Object, including spin, velcoity, acceleration and friction using special physics properties. You also need to turn on the physics support in the 'Script' section of the 'Export Panel'.

Shape Quality
Specifies the shape quality up to 100%. Reducing a shapes quality will shift the vertices and control points in a shape to allow for smaller file size. Reducing quality will reduce the detail in the shape and change curvature of curved edges. Setting a shape quality of 0% will reduce the shape quality to 0%, so it will become a single simple shape. Setting a shape quality of 100% would not change the quality of the shape.


SWF (Flash) Export Options

The SWF (Flash) option of the 'Export' Panel allows you to control the generation of the .swf file for the Test in Player, Export SWF and Export HTML commands.

panels-export-swf

SWF version to export
Specifies the version of SWF file to export. If you select higher versions, then more efficient and accurate SWF files can be made due to additional low-level scripting support and options such as compressed SWF files. Lower versions are sometimes required for some platforms (like PocketPC's), or to reach a wider audience (eg more people have players that can play SWF4 files than those that can play SWF6 files).

Compress SWF Movie
This option is only available if 'SWF version to export' is set to 'SWF6'. Check this option if we want to generate a compressed Flash Movie to reduce the file size and download time. Compressed Flash files only play in the Flash 6 Player.

Offset to suit use as a Movie Clip
Check this option if you want to export your SWiSH animation to a Flash Movie clip, otherwise your animation will be shifted down and to the right when you import it into the Movie clip. The default setting is to have this option turned off. See Importing a Swish Movie into Flash.

Hide Off-Stage Objects
Check this option if you do not want to animate objects when they are completely outside the defined Movie area (or stage). Checking this option may result in a smaller .swf file size for some Effects because the SWF file will not contain any instructions for animating objects that are outside the stage area. However, if you intend to import the .swf file into Flash (or back into SWiSH) or if areas outside the stage will be visible, you may want to uncheck this option. Otherwise letters will appear to 'stick' when they reach the edge of the 'Movie' window. However, you can use the "Mask Off-Stage Rectangle" option to ensure that off-stage objects are not visible anyway, in which case you could leave the "Hide Off-Stage Objects" option checked. The default setting is to have this option turned on.

Mask Off-Stage Rectangle
Check this option to mask objects if they are completely outside the defined Movie area (or Stage). Checking this option will add a few bytes to the filesize of the SWF and may result in a slight decrease in performance. However, if areas outside the stage are going to be visible, then this will neatly clip objects that move offstage so you don't see unexpected objets. You will probably want to combine this option with the "Hide Off-Stage Objects" option. The default setting is to have this option turned on.

Note: There is a bug in the import option in Flash that will resut in errors in SWF publishing from Flash if you import a SWF file from SWISH with the "Mask Off-Stage Rectangle" option turned on. If you intend to import a SWF into Flash, then leave this option off. This does not apply if you are using Load Movie to load a SWF into another SWF.

Allow import of text as text object
Check this option if you want to import the resultant .swf file into Flash (or back into SWiSH) and you also want to be able to edit any text. If you uncheck this option, SWiSH will remove the information required to edit text. Unchecking this option may result in smaller and more secure .swf files. The default setting is to have this option turned on.

Note: There is a bug in Flash where it will crash when trying to import a SWF files with this information removed. This acts as some protection for your SWF file.


Script Export Options

The Script option of the 'Export' Panel allows you to control the generation of the .swf file for the Test in Player, Export SWF and Export HTML commands.

panels-export-script

SWF version to export
Specifies the version of SWF file to export. If you select higher versions, then more efficient and accurate SWF files can be made due to additional low-level scripting support and options such as compressed SWF files. Lower versions are sometimes required for some platforms (like PocketPC's), or to reach a wider audience (eg more people have players that can play SWF4 files than those that can play SWF6 files).

Support mouse properties
Check this option if you you want to track the current x and y coordinates of the cursor in pixels through the _xmouseglobal and _ymouseglobal properties in your scripts.

Shared advanced math library
Only available when exporting SWF4 movies. If selected SWiSHmax generates an extra Sprite with all the math methods in it. The extra Sprite adds approximately 9K to the SWF file produced, but means that calls to math methods are shorter. If you use a lot of math methods, then you can end up with a smaller SWF file. If you load this SWF movie into a sprite in another SWF Movie, then you need to ensure that the other SWF Movie ALSO has this option checked. If you load the SWF into a clip in a non-SWiSHmax Movie, then the math functions will not work.

If not selected then the math functions are still all available, but SWiSHmax generates the code for calculating them directly where they are used (inline). That means you only get code for the math methods you use. It also means that you can load this SWF movie into any other SWF move without the other movie needing this option checked, or into a non-SWiSHmax movie.

Fix Flash rotate and shrink bug
Only available when exporting SWF4 movies. There is a bug in all versions of Flash player when playing SWF4 movies, where every time you change the _rotation property using script, the objects will shrink slightly. Selecting this option will make SWiSHmax generate additional code that works around this Flash Player bug. If you do not use script to rotate objects, then you do not need this option.

Support Physics Properties
Only available when exporting SWF4 movies. Adds the shared script necessary for physics properties for objects in the Movie. Each Object that you want to use physics properties on must ALSO have the 'Uses phyiscs properties' option turned on in the 'Selected Object' section of the Export Panel. If you don't use physics properties for any objects in your movie, then you do not need this option.


HTML (Tags) Export Options

The HTML option of the 'Export' Panel allows you to control the generation of the .htm file for the Test in Player and Export HTML commands.

panels-export-html

When you export a Movie using File | Export | HTML, SWiSH generates both .swf and .htm files. The options displayed above pertain to the .htm file.

Size 100%
Scales the Movie scale to occupy the entire html page. It sets the width and height values of the Object and Embed tags to 100%. When turned off (the default setting), the width and height are set from the Movie size (or stage).

Loop
Repeats the Movie from the beginning when it reaches the last Frame. It sets the Loop value of the Object and Embed tags to True. Deselecting this option stops the Movie when it reaches the last Frame. Loop is checked by default.

Menu
This option makes a shortcut Menu available to users when they right-click (Windows) or Command-click (Macintosh) on the Movie. It sets the Menu value of the Object and Embed tags to True. Deselect the Show Menu option if you want About Flash to be the only available option in the shortcut Menu. The Menu option is checked by default.

Base
Specifies the Base directory or URL to resolve any relative path names in your Movie. It sets the Base value of the Object and Embed tags.

Quality
Sets the level of anti-aliasing performed, and hence the smoothness of objects when playing a Movie. It sets the Quality value of the Object and Embed tags. Because anti-aliasing requires a faster processor to smooth each Frame of the Movie before it is rendered on the viewer's screen, the Quality parameter assigns priorities to appearance and playback speed. The priority options are as follows:
· Low: prioritizes playback speed over appearance. With this setting, anti-aliasing is never used
· Autolow: emphasizes speed at first, but improves appearance whenever possible. Playback begins with anti-aliasing turned off. If the Flash player detects that the processor can handle it, anti-aliasing is turned on
· Autohigh: emphasizes playback speed and appearance equally at first, but sacrifices appearance for the sake of playback speed if necessary. Playback begins with anti-aliasing turned on. If the actual Frame Rate drops below the specified Frame Rate, anti-aliasing is turned off to improve playback speed. Use this setting to emulate the 'View > Antialias' setting in Flash
· High: prioritizes appearance over playback speed. With this setting, anti-aliasing is always used. If the Movie does not contain animation, bitmaps are smoothed; if there is animation, bitmaps are not smoothed. High is the default setting
· Best: provides the best display quality and does not consider playback speed. All output is anti-aliased and all bitmaps are smoothed.

Scale
Defines how the Movie is placed within the boundaries of the 'Browser' window. It sets the Scale value of the Object and Embed tags.

These settings are used if you use a width and height that are different from the Movie's original size (for example, if you choose the Size 100% option). The available settings are as follows:
· Show all: makes the entire Movie visible in the specified area. The original aspect ratio of the Movie is maintained, and no distortion occurs. Borders may appear on two sides of the movie. This is the default setting
· No Border: scales the Movie to fill the specified area. The original aspect ratio of the Movie is maintained, and no distortion occurs. Portions of the Movie may be cropped
· Exact Fit: makes the entire Movie visible in the specified area. However, no attempt is made to preserve the original aspect ratio, and distortion may occur.

Align Movie
Determines how the Movie is placed within the 'Movie' window and, if it must be cropped to fit that window, how it is cropped. It sets the Salign value of the Object and Embed tags. The 'Salign Movie' options are as follows:
· Default: displays the Movie centered in the 'Movie' window. All edges might be cropped if the 'Movie' window is smaller than the Movie
· Left: aligns the Movie along the left edge of the 'Movie' window and crops the top, bottom, and right sides as necessary
· Right: aligns the Movie along the right edge of the 'Movie' window and crops the top, bottom, and left sides as necessary
· Top: aligns the Movie along the top edge of the 'Movie' window and crops the bottom, left, and right sides as necessary
· Bottom: aligns the Movie along the bottom edge of the 'Movie' window and crops the top, left, and right sides as necessary
· Top Left: aligns the Movie along the top and left edges of the 'Movie' window and crops the bottom and right sides as necessary
· Top Right: aligns the Movie along the top and right edges of the 'Movie' window and crops the top and left sides as necessary
· Bottom Left: aligns the Movie along the bottom and left edges of the 'Movie' window and crops the top and right sides as necessary
· Bottom Right: aligns the Movie along the bottom and right edges of the 'Movie' window and crops the top and left sides as necessary.

Align Window
Determines how the Flash Player 'Movie' window is positioned within the 'Browser' window. It sets the Align value of the Object and Embed tags. The 'Align Window' options are as follows:
· Default: centers the Movie along within the 'Browser' window and crops the top, bottom, left, and right sides as necessary
· Left: aligns the Movie along the left edge of the 'Browser' window and crops the top, bottom, and right sides as necessary
· Right: aligns the Movie along the right edge of the 'Browser' window and crops the top, bottom, and left sides as necessary
· Top: aligns the Movie along the top edge of the 'Browser' window and crops the bottom, left, and right sides as necessary
· Bottom: aligns the Movie along the bottom edge of the 'Browser' window and crops the top, left, and right sides as necessary.

Window Mode
Lets you take advantage of the transparent Movie, absolute positioning, and layering capabilities available in Internet Explorer 4.0 (or later). This option works only in the Windows version of Internet Explorer with the Flash Active X control. It sets the WMode value of the Object and Embed tags. The settings are as follows:
· Window: plays the Movie in its own rectangular window on a web page. This setting normally provides the fastest animation performance and is the default setting
· Opaque: use this setting if you want to move elements behind Flash movies (for example, with dynamic HTML) and don't want them to show through
· Transparent: use this setting to make the background of the HTML page on which the Movie is embedded show through all the transparent portions of the Movie. Animation performance might be slower when you use this setting.

Copy HTML to Clipboard
Exports the HTML to your systems Clipboard. This option is useful if you wish to use the HTML required to display your Movie into an existing HTML page without having to use File | Export | HTML and copy the contents of the HTML file produced.


AVI (Video) Export Options

The AVI option of the 'Export' Panel allows you to control the generation of the .avi file for the Export AVI commands.

panels-export-avi

AVI export automatically rounds up the width to the closest number divisible by four. This is required for most types of compression. All action script in the scene will be disabled.

Setup Compression
Click this button to open up the 'Setup Compressor for AVI Export' dialog box to choose the available compression types and their attributes.

export-panel-avi-codec

Width
Sets the width of the exported .avi file. This value will be neglected if you choose to use Movie size.

Height
Sets the height of the exported .avi file. This value will be neglected if you choose to use Movie size. Height will automatically be calculated from Width if you choose Lock Aspect Ratio.

Lock Aspect Ratio
Automatically calculates the width to maintain the aspect ratio of the exported .avi file.The default setting is to have this option turned on.

Use Movie size
Check this option if you want to use the Movie size for the exported .avi file. The default setting is to have this option turned on.

Compressor
Choose your desired compression type here. Different compression types will produce different .avi file quality and size. When choosing compression type, make sure the people who are going to view your .avi file also have that compression type available. The most common one is Cinepak Codec by Radius, which is selected by default. If this is not available, the default changes to Uncompressed.

Some compression types are not available for a certain color depth. If you can't find your desired compression type, try changing your screen color depth before clicking on this button.

Compression Quality
Set this value to adjust the image quality of your .avi file. The better the quality, the bigger the file size. The default setting is 50%. Some compression types do not let you adjust Compression Quality.

Key Frame
This sets how many frames appart the AVI exporter needs to set Keyframes. Smaller gaps between Keyframes will produce better, but bigger .avi files. Some compression types do not let you adjust Key Frame. The default setting is to have this option turned on with a Keyframe inserted every 15 Frames. Uncheck this to use a compression-type-specific default value for Data Rate.

Data Rate
This sets the Data Rate of your .avi file. Smaller values will produce smaller .avi files, but worse quality than higher values. Some compression types do not let you adjust Data Rate. The default setting is to have this option turned on with a Data Rate figure of 10 KB/sec. Uncheck this option to use a compression-type-specific default value for Data Rate.

Configure
Click this button to adjust a compression-type-specific setting. Different compression types will have different settings.

Make movie longer by
Enter number of frames to add at the end of the movie. The default setting is 0.
If this number is 0, the exported AVI will be as long as the total frames within the main timeline of all scenes.


Debug Panel

The 'Debug' Panel is used to help you see what's happening in your Movie's scripts. When you Play your Movie in SWiSHmax the 'Debug' Panel can display the script being exected and the value of your variables.

panels-debug

Echo Script
Outputs all script executed by your Movie to the 'Debug' Panel.

Echo Bytecodes
Displays the Flash Bytecodes executed by your Movie to the 'Debug' Panel in one of the following formats:
· Summary: Displays the bytecodes that make actual changes, such as setting a variable, or stoping a move.
· Detailed: Also displays bytecodes for doing calculations, including getting variable values, performing arithmetics and testing conditions.

Stop/Restart Output
Stops or restarts the debug output being displayed in the 'Debug' Panel.

Clear
Clears all current output from the 'Debug' Panel.


Effect Settings Dialog

Effect Settings Dialog Box

The 'Effect Settings' dialog box is displayed when you first create an Effect. It can also be displayed by double-clicking on an Effect in the Timeline, or right-clicking on an Effect and choosing Properties from the context Menu. Below is part of the 'Effect Settings' dialog box, which is common to all Effects.

effectdlg

You can save and reuse Effect Settings. See Saving Effects for more information.

Name
Specifies the name of the Effect. This name appears on the Timeline.

openeffect Load
Loads predefined Effect Settings from the corresponding Effect folder on disk.

saveeffect Save
Saves the current Effect Settings to the corresponding Effect folder on disk. See Saving Effects for more information.

explorer Organize
To Organize/Remove/Rename the saved Effect Settings. This option starts Windows Explorer and shows the contents of the folder where the current Effect is filed.

playeffectb Preview Effect
Previews the current Effect.

stopeffect Stop
Stops previewing the current Effect.

moreoptions lessoptions More/Less Options
Selecting this option lets you define whether to show the 'Start At', 'Motion' and 'Easing' tabs and the Reset components and Continue from previous effect options. By default Less Options is slected, meaning these tabs and options will not be shown.

Duration
Specifies the duration of the Effect as a number of Frames. For some Effects, the duration is either preset (e.g. the Remove Effect is always a single Frame), or calculated depending on the Effect Settings (e.g. the Typewriter Effect). In these cases, you cannot directly edit the duration.

Continue from previous effect
This option tells SWiSH to apply the Effect starting with the Object as it was at the end of the previous Effect. If you want to specify a different starting condition for the Effect (or want to reset the components of the Object to their initial positions), turn this option off. SWiSH will then add the Start At tab that lets you change the starting Transforms for the Effect.

Author
This option allows you to access the Effects Authoring options. These additional options allow you to build your own SWiSH Effects.
See Effects Authoring for more details.

There are a number of Effect sheet tabs that are common to two or more Effects. These are as follows:

· Motion
· Easing
· Start At
· Cascade
· Camera
· Transforms.

The other tabs are described in the corresponding Effects.


Saving Effects

Effect Settings are written to the Effects sub-folder of the SWiSHmax folder on your hard disk.

The Effects folder contains multiple sub-folders for each main Effect category. Within each category folder, multiple Effect Settings files (.sfx extension) can be stored. This provides convenient categorization and grouping of Effects.

effectssavedir

When creating and authoring Effects, you may decide to create your own categories. Simply create a folder within the Effects folder and save your Effects to that folder.

As the Effect Settings are stored within the .sfx file, you can exchange .sfx files with your friends to allow them to use the Effects you have created.


Color Selector

The Color Selector pops up whenever you click on the 'Color fill' button to select a color.

colorselector

colorselector-swatch Swatch
This box shows you the old color on the left hand side and the new color selection on the right. If you click on the left hand side of the button (or press escape), the color is left unchanged. If you click on the right hand side (or press enter) the color you have selected is used.

colorselector-eyedropper Eyedropper
Click on this button to select a color from elsewhere on the screen. Move the eyedropper cursor over the color you want and click. If you don't want to select a color, click on the 'Eyedropper' button again to deselect this function.

colorselector-websafe Websafe Colors
Turns websafe colors on or off. When turned on, any color you select will be replaced by the nearest websafe color. Websafe colors have red, green and blue components that are multiples of #33 (hex) and should display correctly in all browsers. The default setting is off.

colorselector-morecolors More Colors
Displays an enhanced Windows Color Selector, which gives a wider selection of colors.

colorselector-morecolors-dialog

You can adjust the color by either RGB (red, green, blue) component, by HSL (hue, saturation, luminance).

RGB and Alpha Values
You can directly enter hex values for the Red, Green, or Blue components of the color. If an Alpha value (transparency) is appropriate for the selection, you can enter this as a percentage, with 0% being completely transparent and 100% being completely opaque. These edit boxes also show the RGB and alpha values for the currently selected color.

The Alpha % is indicated by the cross hatching and color in the color swatch.

alpha100 | Solid color (Alpha = 100%)
alpha50 | Opaque color (Alpha = 50%)
alpha0 | Transparent color (Alpha = 0%)

Note:
· The Alpha value will initially be set to the last used value
· Transparent colors (Alpha = 0%) cannot be seen

Color Palette
Move the mouse cursor over the palette and click to select a color.

colorselector-palette

The palette includes sixteen levels of grey scale at the top, primary colors on the left and all the websafe colors in the center area.

MRU Colors
These buttons represent a selection of the Most Recently Used (MRU) colors. The colors in these boxes are updated every time you make a color selection.

colorselector-mru

Done
Closes the Color Selector with your current settings saved.


Status Bar

The Status Bar is at the bottom of the 'SWiSHmax application' window and is used to display help for the selected command or tool.

The Status Bar also displays the file size of the exported .swf file and the current x and y co-ordinates of the cursor in the Layout Panel. The size is calculated whenever you export a .swf file, or use the Test in Player, Test in Browser or Test Report commands. Until you first export, the indicator says 'Unknown Size'.

You can show or hide the status bar using View | Status Bar.

statusbar


Tutorials

This chapter gives worked examples of how you can use SWiSHmax.

· Creating Your First SWiSH Movie takes you through the basic steps of creating a simple Movie. It also covers sound, interactivity, preloaders and preparing your Movie for the web
· Using Actions to Control your Movie is a short example of how to use Events and Actions. The Creating Your First SWiSH Movie tutorial also has topics covering this area
· How to make an Animated Button explains how to make a button that animates when you move the mouse over the button
· Scripting Tutorials are a series of tutorials designed to help you become familiar with the scripting language. You should also refer to Scripting for an introduction to basic scripting concepts
· Using SWiSH with other programs shows you how you can use your .swf Movie with other applications, namely Flash, Dreamweaver, FrontPage and Powerpoint


Creating Your First SWiSH Movie

This section is broken into step-by-step tutorials that will take you through the process of creating a basic animated web site. The final web site is saved as "first.swi" in the Samples Menu, you may want to view it before beginning this tutorial to get an idea of what you will be creating.

Each section is a stand-alone tutorial which will help you create the individual components of the website. The tutorials are:

· Creating your first SWiSH Movie
· Importing and Working with Images and Vector Graphics
· Adding Music and Sounds
· Creating Buttons
· Creating a Menu
· Creating a Sprite
· Adding Interactivity to your Movie
· Creating a Preloader
· Exporting your Movie and getting it ready for the Web.


Creating Your First SWiSH Movie

This is a step-by-step tutorial on how to create your first SWiSH Movie. This tutorial illustrates some of the Text Effects seen in the "first.swi" file in the Samples Menu.

1. Start the SWiSH application

2. From the File Menu select Samples | "first.swi"

3. From the File Menu select Test | testplayer In Player

When you are ready to begin creating your Movie, you can close the player window or minimize it to view the Movie as a reference while you work on the following tutorials.

1. From the File Menu select newmovie New

2. Define your Movie's properties by select the Movie Panel and changing the Width to 700, Height to 450, and Frame Rate to 15. Make sure that the Background color is set to white

The 'Movie' Panel should look like this:

3. In the Zoom Controls of the Layout Panel, click on the zoom100 Zoom 100% button. This will center the stage area within the 'Layout' Panel

4. Ensure Scene 1 is selected in the Outline Panel, and press the inserttext Insert Text button on the Insert Toolbar. You should see the word 'Text' appear in the center of the stage in the Layout Panel

5. Select the Text Panel and change the word 'Text' to the word 'THIS' in the text window. Change the font size to 48 point from the drop-down font size Menu, or by or entering 48 in the font size box of the 'Text' Panel

The 'Layout' Panel should look like this:

Note: The Anchor Point (small cross) is in the middle of the Text Object. This is defined by the last used setting of the Transform Panel. The anchor point should be set to 'Origin', otherwise the following Effects will appear different to those shown in the sample
6. In the Timeline Panel, click on Frame 1 in the row for 'THIS'. Press the addeffect 'Add Effect' button, which is on the left of the 'Timeline' Panel. Select Fade | Fade In from the drop-down Menu. Double click on the last Frame of the Fade In Effect in the Timeline, the Fade In Settings dialog box will appear. From the 'Fade In Settings' dialog box, uncheck the Continue from previous Effect checkbox to access the Start At tab. From the Start At tab, select X Scale | Scale Factor, and enter the value 20 in the % edit box and press enter. Select the Motion tab, and select X Scale | Resize to 100%. Press the 'Close' button, at the bottom right of the dialog, to close the dialog box

The Timeline should look like this:

7. Press the playmovie Play Movie button on the Control Toolbar. You should see the word 'THIS' increase in scale as it fades in. This will continue to loop. Press the stopmovie Stop button
8. Click on Frame 14 in the row for 'THIS'. Press the addeffect 'Add Effect' button, and select Fade | Fade Out from the Menu.

Now the Timeline should look like this:

9. Press the playmovie 'Play Movie' button. You should see the word 'THIS' fade in, and then fade out. Press the stopmovie 'Stop' button

10. Right-click on the Fade Out Effect in the Timeline, and select Properties from the context Menu to display the 'Fade Out Settings' dialog box. Change the Duration from 10 to 4

11. Press the playmovie 'Play Movie' button again. You should now see the word 'THIS' fade out faster than before, because you have shortened its duration. Press the stopmovie 'Stop' button

12. Press the inserttext 'Insert Text' button. The word 'Text' will appear directly over your first word on the stage, it will also appear in the Timeline and the Outline Panel. In the Text Panel , change the word 'Text' to the word 'IS', the font size should be set to 48 point

13. Press the inserttext 'Insert Text' button to create a third word. Change this word to 'MY' and leave the font size at 48 point

14. Press the inserttext 'Insert Text' button again to create a fourth word, change this word to 'MESSAGE' and leave the font size at 48 point

15. From the Timeline, click on the Fade In Effect you created for the word 'THIS' and while holding the Shift key down, click on the Fade Out Effect next to it. Both the Fade In and the Fade Out Effects should be highlighted. Right-click and select Copy Effect from the context Menu. You may need to resize or scroll the Timeline so you can see the rows you want to work on

16. On the Timeline, right-click at Frame 17 next to the word 'IS' and select Paste Effect. Paste these Effects at Frame 34 next to the word 'MY' and at Frame 51 next to the word 'MESSAGE'

The Timeline should now look like this:

17. Click on the Fade Out Effect for the word 'MESSAGE' to select the Effect, then Right-click on it and select Properties from the context Menu. The 'Fade Out Settings' dialog box should appear. Select the Motion Tab, and select X Scale | Resize to Scale and enter the value 400 in the % edit box, press enter and the click on the 'Close' button

18. Press the playmovie 'Play Movie' button on the Toolbar. You should now see the sequence of words 'THIS', 'IS', 'MY', fade in while increasing in scale and then fade out. The Word 'Message' will fade in while increasing in scale and then fade out while increasing in scale. Press the stopmovie 'Stop' button

19. Now press the savemovie Save Movie button on the Toolbar. You should now see the 'Save As' dialog box. Type 'myfirst' into the File name edit box and press Save. Your Movie has now been saved as a .swi file and can be opened at a later time

You are ready to continue with the Importing and Working with Images and Vector Graphics tutorial.


Importing and Working with Images and Vector Graphics

This is a step-by-step tutorial on importing and working with bitmap images and vector graphics. This tutorial illustrates some of the features seen in the "first.swi" file in the Samples Menu.

Note:
· You can import bitmap images in .jpg, .jif, .jpeg, .gif, .png, .bmp, and .dib formats
· You can import vector graphics in .wmf and .emf formats, or as a static .swf file

Images

1. Open the Movie you began in the last tutorial "myfirst.swi"

2. Press the insertimage 'Insert Image' button on the Toolbar. From the 'Open' dialog box, select JPEG from the 'Files Types' list, then navigate to the Samples folder within your SWiSHmax application folder, select "first.jpg", and press Open

3. The image should be displayed in the center of the stage

4. Select the Shape Panel and edit the name of the image Object to be "Center Image". Select the solid line from the drop-down Menu. Change the width of the line from 1 to 2pt. Press the color swatch next to the 'Line' width selection box to display the color palette. Select a dark green from the palette.

The 'Shape' Panel should look like this:

5. Press the 'Properties' button located next to the 'Clipped image' button to display the 'Image Properties' dialog box. Within the 'Image' dialog box, check the 'Recompress JPEG' checkbox and change the value from 84% (the quality of the imported image) to 10%.

The 'Image Properties' dialog should like like this:

Press OK

6. From the File Menu, select Test | In Player. The image should display in the center of the stage, in front of the text and appear distorted.

7. Press the back 'Send to Back' button from the Standard Toolbar

8. Press the Shape (image) 'Properties' button again and change the value of the JPEG quality from 10% to 50%, then Press OK

9. From the File Menu, select Test | In Player again. This time the image should appear clear and behind the text

10. Select the "Center Image" Object from the left column of the Timeline, then right-click and select Copy Object from the context Menu. Press the paste 'Paste' button to paste a second image into your Scene. The copy will appear directly over the original

11. To help with aligning this image, select the Guides Panel, and check the 'Snap' and 'Show in the Grid' boxes. A Grid will appear in the Layout Panel. Change the horizontal and vertical values of the Grid in both the 'Horiz' and 'Vert' edit boxes to 5

The 'Layout' Panel should look something like this:

12. Select the Transform Panel to view the image's X and Y placement properties. With the image selected, drag the image over towards the left side of the window, and place the image at X:140 Y:225

The 'Transform' Panel should look like this:

13. Rename this image object to "Left Image" in the Shape Panel

14. With the "Left Image" selected, press the back 'Send to Back' button from the Toolbar, and then press the forward 'Bring Forward' button. This image should be in the second-from-the-bottom row in the Timeline, just above Center Image.

15. Press the paste 'Paste' button to create another copy of the image. Drag this one over to the right side of the window and place the image at X: 560, Y: 225

16. Rename this "Right Image" in the Shape Panel

17. Press the back 'Send to Back' button

18. In the Timeline Panel in the Left Image row, click on Frame 70. Press the addeffect 'Add Effect' button and select Fade | Fade In from the Menu. Open the 'Fade in settings' by double clicking on the last Frame of the Effect in the Timeline. Change this Effect's duration from 10 to 4 Frames. Press OK

19. Right-click on this Effect and select Copy Effect from the context Menu

20. In the Timeline Panel in the Center Image row, right-click on Frame 72 and select Paste Effect

21. In the Timeline Panel in the Right Image row, right-click on Frame 74 and select Paste Effect

22. Preview your Movie in the player by selecting File | Test | In Player. This time you will see the message and then, the images will fade in starting with the left image first and ending with the right image

23. Click on Frame 88 in the Left Image row. Press the addeffect 'Add Effect' button and select Move from the Menu. Display the 'Move settings' by double clicking on the last frame of the the effect in the timeline. From the Motion tab select X Position | Move to X and change the value from 0 to 350. Change the Effect's duration from 10 to 5 Frames, and press Close to accept the changes

24. Click on Frame 93 in the Center Image row. Press the addeffect 'Add Effect' button and select Move from the Menu. From the Motion tab, in the 'Move settings' dialog box, select X Position | Move to X and change the value from 0 to 560. Change the Effect's duration from 10 to 5 Frames, and press Close to accept these changes

25. Click on Frame 98 in the Right Image row. Press the addeffect 'Add Effect' button and select Place from the Menu. Display the 'Place settings' dialog box and Select X Position | Jump to X, change the value from 0 to 140, and press Close to accept the changes

26. Click on Frame 85 of any row in the Timeline and press the fpview Preview Frame button on the Control Toolbar. Drag the Play Head right and then left across the Timeline to preview the animation. "Left Image" should slide over to the center covering "Right Image"; then "Center Image" should slide right to cover "Right Image"; finally, "Right Image" will appear on the left

27. Save your Movie

Vector Graphics

1. Press the newcontent 'Insert Content' button from the Toolbar. From the 'Open' dialog box, select Flash Player Movie (*.swf) from the 'Files of Type' Menu . From the Samples Folder, select "logo.swf" and press Open. From the 'Import Frames' dialog box press Select All Frames, check the 'Import as Sprite' checkbox and uncheck the 'Masked' checkbox and press Import. Note that the composite image is within a Sprite, and that the Sprite has been named "logo"

tute30

2. The logo Sprite should appear in the center of the stage

3. Click at Frame 110 in the Timeline in the row for logo. Press the addeffect 'Add Effect' button, and select Fade | Fade In from the Menu. Change the Effect's duration in the 'Fade In Settings' dialog box from 10 to 4, and from the Motion tab select X Scale | Resize to Scale and type 60 in the % edit box. Leave the 'X=Y' box checked. Press Close to accept the changes

4. Click at Frame 120 in the Timeline in the row for the logo. Press the addeffect 'Add Effect' button, and select Fade | Fade Out from the Menu. In the 'Fade Out settings' dialog box, change the Effect's duration from 10 to 3, and press Close

5. Press the playmovie Play Movie button to preview your Movie. After your message has played and your images have faded out, the logo should fade in quickly and then fade out quickly. If the 'Stop playing at end of movie' check box in the Movie Panel is not checked, your Movie will continue to loop. Press the stopmovie Stop button. For the remainder of the tutorial, ensure that the 'Stop playing at end of movie' check box is checked

6. Press the playmovie Play Movie button to preview your Movie. This time your Movie will play through once. Press the stopmovie 'Stop' button

7. Save your Movie

You are ready to continue with the Adding Music and Sounds tutorial.


Adding Music and Sounds

This is a step-by-step tutorial for adding music and sounds to your Movie. This tutorial illustrates some of the features seen in the "first.swi" file in the Samples Menu.

With SWiSH you can import both .wav and .mp3 formats. You can control the overall volume of sounds and apply simple fade Effects. A sound can be played when a Movie reaches a selected Frame or in response to a Mouse Event. For a more detailed explanation on using sounds in your Movie please read Play Sound. This tutorial will be limited to adding sounds to the Timeline in response to a Frame Event; adding sounds in response to Mouse Events will be discussed in the Creating Buttons tutorial.

As sound files can significantly increase the overall file size of the Movie, it is best to select short tunes that can be looped as background music for a Movie that will be playing over the Web.

Note: If you are having problems importing .wav files, try downloading and installing the latest Windows Media Player from http://www.microsoft.com/windows/mediaplayer/en/default.asp

Adding Background Music

1. Open "myfirst.swi". Right-click on Frame 1 of the Scene row. From the context Menu select Sound | Play Sound. A scriptmarker Script Action marker will appear at that Frame on the Timeline

tute31

2. From the Actions Panel you should see the Play Sound Event highlighted in the 'Add Script' window. Note that the Action playSound is in red. This is because the statement is currently incomplete (it does not contain a sound to play). Press the 'Import' button to view the 'Import Sound' dialog box. From the Samples folder, select "88A.mp3" and press Open

Note: The "Files of Type input box" should be set to show MP3 or All Files. If not set to one of these settings, you will not be able to see the "88A.mp3" file

3. Left-click on the sound "88A.mp3" to select that as the sound to be played. The selected sound is now shown as the parameter to the playSound() Action. Note that the script marker changes to [image] in the Scene Timeline and the Action script turns black as it is now syntatically correct

tute32

4. Select the 'Layout' Panel and Press the playmovie Play Movie button on the 'Control' Toolbar. The tune will play once and then stop. Press the stopmovie 'Stop' button
5. From the Script Panel, below the 'Import' Button, press the soundpropertiesbutton 'Properties...' button to display the 'Properties for Sound' dialog box. This dialog box, displays the file's sample rate and the length of 1x loop in seconds and Frames. Note that the quoted length (41.5 Frames) is not long enough to allow sound to be played through the entire Movie

soundeffectproperties

6. From the Script Panel, below the 'Import' Button, press the soundeffectbutton 'Sound Effect...' button to display the 'Sound Effect Settings' dialog box

soundeffectsettings

7. In the 'Loop sound' edit box, enter 15 (this will ensure that the music will continue throughout the introduction). You can leave the Volume setting at 100%, and the 'Don't play sound if it is already playing' feature checked. Press OK to accept the changes. This will change the parameters of the playSound() Action to: "playSound("88A.mp3",true,100,15);"
8. Select the 'Layout' Panel and Press the playmovie 'Play Movie' button on the Toolbar. The tune will start as your Movie starts and will continue to play long after your animation has stopped

Sound Effects

You can add a Sound Effect in synchrony with the appearance of the logo.

1. Right-click on Frame 110 of the Scene row. From the context Menu select Sound | Play Sound. From the Script Panel press the 'Import' button and from the Samples folder, select "FX1001.wav" and press Open

Note: The "Files of Type input box" should be set to show Wave Sounds or All Files. If not set to one of these settings, you will not be able to see the "FX1001.wav" file

2. Press the soundpropertiesbutton button to display the 'Properties' dialog box. By default, the Compression for .wav files is set to MP3; leave this setting, as this will produce the smallest file size, compressing your .wav files up to 1/10 of their original size, press OK

3. Click on the soundeffectbutton button, as you do not want this sound to loop, leave the 'Loop sound' edit box value set to 1. Leave the Volume value set to 100%. Select Sound effect | Pan left to right. Leave the Preload sound set to Object or Scene default. Press OK

4. Select the 'Layout' Panel and Press the playmovie 'Play Movie' button on the Toolbar. The sound will begin playing when your logo appears. It will begin playing in the left speaker and end playing in the right speaker. Press the stopmovie 'Stop' button

Stopping Sounds

1. Right-click on Frame 111 and select Sound | Stop Sound from the context Menu. Select "88A.mp3" and press Enter on your keyboard

Note:
· If you need or want to stop your background music in the middle of a loop, rather than having it stop abruptly, it may be helpful to the flow of the Movie if you stop the music while another sound is playing, as you have done in this example
· There may be times when you will want to stop all sounds playing. This can be done within the Timeline by right-clicking on the Frame where you would like the sounds to stop and selecting Stop All Sounds from the context Menu

2. Select the 'Layout' Panel and Press the playmovie 'Play Movie' button on the Toolbar. Your background music will end just as "FX1001.wav" begins. Press the stopmovie 'Stop' button

3. Your introduction is complete. You may view it in your browser by pressing the testbrowser 'Test in Browser' button

4. Save your Movie

You are ready to continue with the Creating Buttons tutorial.


Creating Buttons

This is a step-by-step tutorial for creating a simple button. This tutorial illustrates some of the features seen in the "first.swi" file in the Samples Menu.

The Button Object makes it easy to add mouseover Effects to your Movie without interrupting the Movie's main Timeline.

You can create an empty button by pressing the newbutton Insert Button on the Insert Toolbar, or you can choose an existing Object and convert it into a button by selecting Modify | Convert | Convert to Button or by pressing the 'Convert to Button' icon from the Grouping Toolbar. The 'Grouping' Toolbar can be can be displayed by selecting 'View | Toolbars | Grouping Toolbar'.

Note: In most circumstances, it is best create your text or shape first and then use the 'Convert to Button' option (remove any Actions attached to a shape before converting it into a button). This will save you the time of adding the text or shape for each state; you need only to go into the Button Object's 'Outline' tree to make your adjustments to the different states

To Create a Button

1. Open "myfirst.swi". Your introduction has ended and the visitor will now enter your main site. This is a good time to create a new Scene

2. From the Main Menu, select Insert | Scene and a new Scene, named 'Scene 2', will be created. Check that Scene 2 appears in the Scene row on the Timeline Panel

3. Press the inserttext 'Insert Text' button on the Insert Toolbar. Change the word "Text" to "LINK 1", and the Font size to 12

4. Press the cbutton 'Convert to Button' button from the 'Grouping' Toolbar (Modify | Convert | Convert to Button). From the 'Button Object' Panel check the 'Has separate over state', 'Has separate hit state', 'Has separate down state' boxes. A button Button icon will appear in the Outline Panel with an 'Object' Tree, with four child buttons indicating the button's four states

The 'Outline' and 'Button Object' Panels should look like this:

The Up State represents the button's appearance when the mouse pointer is not over it. The Over State represents the button's appearance when the mouse pointer is over it. The Down State represents the button's appearance when the mouse is clicked. The Hit State represents the button's active region

5 From the button's 'Object' tree select LINK 1 from the button's Up State, and from the Text Panel, change the color from black to a dark green

6. Select LINK 1 from the button's Over State, and from the 'Text' Panel, change the color to a medium gray

7. Select LINK 1 from the button's Down State and change the color to a dark gray

8. Select LINK 1 from the button's Hit State. You should see a black rectangle. This rectangle represents the button's active region - the area that will respond to the mouse cursor. This state is not visible when the Movie is playing

9. Press the playscene Play Timeline button on the 'Control' Toolbar, and test your button. Your button should change to a gray when the mouse pointer is over it and to a dark gray when you press the button. Press the stopmovie 'Stop Movie' button to end your preview

10. Save your Movie

Adding Sounds to your Buttons

1. Open file "myfirst.swi"

2. From the Outline Panel, select Scene 2

3. Select your 'LINK 1' button from the Outline Panel. Click on the minus (-) symbol to the left of the button icon, so that the button's states are not visible

Note: Make sure that none of the button's states are selected when you add your Actions, as you cannot add Actions to the button's state. Objects inside button states are not allowed to have Actions and SWiSH will ignore them

The 'Outline' Panel should look like this:

4. Select the Script Panel and press the 'Add Script' button and select Events | Button | on (rollOver) from the drop-down Menu. The On (Roll Over) Event will appear and be highlighted in the 'Script' window

5. Press the 'Add Script' button (or right click on the 'on (rollOver)' function) and select Sound | Play Sound from the drop-down Menu. Press the 'Import...' button and the 'Import Sound' dialog box will appear. Navigate to the Samples folder within your SWiSH application folder, select "Beep1.wav" and press Open

The 'Script' Panel should look like this:

6. Select the 'Layout' Panel tab and press the playscene 'Play Timeline' button to test your button. When your mouse pointer rolls over the button, you should hear the sound. Press the stopmovie 'Stop Movie' button

7. From the Script Panel, press the 'Add Script' button and select Events | Button | on (press)
8. Press the [image] 'Add Script' button and select Sound | Play Sound from the drop-down Menu. Press the 'Import...' button, and select "Beep2.wav" from the Samples folder. Import, then select Beep2.wav so it is the parameter of the playSound() Action. The 'Script' Panel should be as shown below:

9. Select the Button Panel. In the 'Name' text entry box, type in LINK 1, and check the Track as Menu box

10. Press the playscene 'Play Scene' button to test your button. When your mouse pointer rolls over the button, you should hear the first sound you imported, and when you click the button, you should hear a second sound. Press the stopmovie 'Stop Movie' button to end your preview

11. Save your Movie

You are ready to continue with the Creating a Menu tutorial.


Creating a Menu

This is a step-by-step tutorial for creating a Menu. This tutorial illustrates some of the features seen in the "first.swi" file in the Samples Menu.

1. Open file "myfirst.swi"

2. Check that Scene 2 appears in the Scene row on the Timeline Panel. If Scene 2 does not appear in the 'Timeline' Panel, select Scene 2 from the Outline Panel

3. Press the [image] 'Fit in Window' Zoom button to see the complete stage

Note: You can also Zoom In or Zoom out on the stage at any time by pressing the zoomin Zoom In button or the zoomout Zoom Out button

4. Select the resizei resize tool option, if not already selected. This allows the Object dimensions to be altered in the Transform Panel without rescaling

5. Select the recti Rectangle/Square Tool from the Toolbox. Click near the top left corner of the stage and drag the mouse down and right to create a rectangle

6. Select the Transform Panel and change the width of this shape to W: 702 and the height of this shape to H: 40 (The 'X=Y' boxes should not be checked). At the top of this Panel there are 'X' and 'Y' co-ordinates indicating the Object's alignment. As the Movie's width is 702, the center of the object's X location should be 350. Change the value in the 'X:' box to 350, if necessary. As the object's height is 40, the center of its Y location should be 19. Change the value in the 'Y:' box to 19, if it is another value. This will ensure that there is no gap around the top or sides of the shape when played.The 'Transform' Panel should be as shown below:

7. Select the Shape Object Panel and change the Line color to a dark green and the Fill color to a light gray. The 'Shape Object' Panel should appear as shown below:

7. While the rectangle shape is selected, press copy to copy, and paste to paste your Object. It may paste directly over the original shape (depending on original location of the shape). Click on the new shape and drag it towards the bottom of the stage. Check the rectangle's X and Y position in the Transform Panel, and change to X: 350, Y: 431, if necessary

8. Select the recti Rectangle/Square Tool from the Toolbox. Click over the left corner of the rectangle at the top of the stage, and drag the mouse down and right to create a rectangle that will completely cover both rectangles

9. Select the Transform Panel and change the width of this shape to W: 700 and the height to H: 450 (the 'X=Y' boxes should not be checked). Center the Object on the stage by changing the value in the 'X:' box to 350, and the value in the 'Y:' box to 225

10. Select the Shape Panel and change the Line color to a dark green and the Fill to None

11. From the File Menu, select Test | Test in Player to check that your rectangles are placed correctly. Your introduction will play first and this Scene will follow. Close the 'Player' window

12. Select Scene 2 from the Outline Panel

13. Select the 'LINK 1' button and press the front 'Bring to Front' button on the Standard Toolbar, then drag it over towards the top-left corner of the stage, placing it over the gray rectangle where desired

The 'Layout' Panel should look like this:

Before making a Menu, you may want to consider whether you want your buttons to look more or less the same and whether you want them to have similar behaviors. If you want your buttons to look uniform, it can save a lot of time if you create one button and then copy and paste as many of those buttons as needed, and then go into the different states to change the text. This way, the buttons will be consistent in size and color. If you want the buttons to have similar behaviors as well, you should add any sounds and perhaps some or all of their Actions before copying and pasting. You can always go into the different states and change the specific Goto Scene or URL references.

For this tutorial, all buttons will have the same sounds attached to the On(rollover), and on(Press) Events, but the other Actions will be different. As these sounds have already been attached, you can begin copying and pasting the 7 additional buttons we will be using

14. From the Outline Panel make sure that your button's states are not visible, clicking the minus (-) symbol to the left of the main button's icon, if necessary

15. With the button selected, press the Control+C keys to copy your button, then select Scene 2 from the Timeline Panel

Note: It is important that the Scene (and not the button) is selected before you paste, as a button cannot be pasted inside of another button

16. Press paste to paste the copy of your button. Repeat this process until there are four buttons shown in the Outline column

17. Select and move the last copied button, so that it is in the top-right-hand corner of the top rectangle. The other two buttons will be aligned to be evenly placed between this and the first button

18. To align the buttons horizontally, select all four buttons in the 'Outline' Panel by holding the Ctrl key down and pressing the left mouse button. Once the four buttons are selected, use the Menu option Modify | Align | Relative to Selected. Then use the Menu option Modify | Align | Distribute | Center (Horizontally). This will distribute the four buttons betwen the first and the last pasted buttons

19. To Align the buttons vertically, use the Menu option Modify | Align | Top, to align them to the top-most button

20. Use the copy copy button to re-copy the four aligned buttons then press the paste paste button to re-paste the 4 aligned buttons. Move these buttons as a group to the bottom rectangle

The 'Layout' Panel should look something like this:

21. From the File Menu, select Test | Test in Player to check that your buttons are placed correctly

22. When you are happy with the placement of your buttons, select the button to the right of the original 'LINK 1' button, and from the Button Panel change the name from "LINK 1" to "LINK 2"

23. From the Outline Panel, click on the plus (+) symbol to access "LINK 2" button's states. Change the text for the Up, Over, and Down, states from "LINK 1" to "LINK 2"

24. Repeat steps 22 and 23, for the all but the button on the bottom right; increasing the number of each button by one, ie. LINK 3, LINK 4, LINK 5, LINK 6, LINK 7

25. For the bottom-right button, change the name from "LINK 1" to "E-MAIL"

The 'Layout' Panel should now look something like this:

26. From the File Menu, select Test | Test in Player to check that your buttons are placed correctly. Position the mouse over the button and click on the button to ensure that the text was altered for each of the button states

27. When you are satisfied with your Menu, save your Movie

You are ready to continue with the Creating a Sprite tutorial.


Creating a Sprite

This is a step-by-step tutorial for creating a Sprite. This tutorial illustrates some of the features seen in the "first.swi" file in the Samples Menu.

A Sprite is a Movie within a Movie. Perhaps the greatest advantage of using Sprites in your Movies is that their Timeline runs independently of the main Movie's Timeline, as you will see in the 'pop-up' Sprite you will be creating. Another advantage of using Sprites in your Movies is that you can easily reuse them throughout your Movie, saving time and with only a slight increase to the file size of the Movie.

1. Open "myfirst.swi"

2. Check that Scene 2 appears in the Scene row on the Timeline Panel. If Scene 2 does not appear in the 'Timeline Panel', select Scene 2 from the Outline Panel
3. Select the recti Rectangle/Square Tool from the Toolbox. Create a rectangle approximately 1/2 the height and width of the stage. From the Transform Panel, change the Width to 420 and the Height to 220, and center on the stage

4. From the Shape Panel select the solid line and change the line's width from 1 to 2. Change the line's color to a dark green. Select a solid fill in a light gray. Set the shape name to "window"

The Layout Panel should look something like this:

5. Select the new rectangle then from the Modify Menu, select Convert | Convert to Sprite. A Sprite icon sprite will appear in the Timeline. Select the Sprite Panel and type pop-up in the Name edit box. Leave the background color unchanged and check the 'Stop Playing At End of Sprite' box

6. Select the Outline Panel and click on the plus (+) symbol next to the pop-up Sprite to display the Sprite's 'Object' tree

Note: In this view, the rectangle you have just created is visible in the 'Layout' Panel. In the 'Timeline' Panel, only the 'pop-up' Sprite and the rectangle within this Sprite are present. Also note that the Sprite Object has its own Timeline. You can toggle this view at anytime by clicking on the plus (+) or minus (-) symbol in the 'Sprite Object' tree

7. With the pop-up Sprite selected, press the inserttext 'Insert Text' button. From the Text Object Panel, change this text to the letter X, change the font to Ariel and the size to 20, and change the color to a dark green. Use the handles on the Text Object in the 'Layout' Panel to adjust size

8. Drag the X Text Object over to the top-right corner of the rectangle

The Outline and Layout Panel should look something like this:

The pop-up Sprite Object's Timeline should look like this:

9. Select the window object from the Timeline Panel. Click on Frame 1 and press the addeffect 'Add Effect' button, select Fade | Fade In from the Menu. Double click on the last Frame of the Fade In Effect in the Timeline. From the 'Fade In Settings' dialog box, change the Effect's duration value from 10 to 3 Frames, and press the 'Close' button to accept the new value
10. Select the X Object row from the 'Timeline' Panel and click on Frame 4. Press the addeffect 'Add Effect' button, and select Place from the Menu

11. From the Insert Menu, select Content. In the 'Open' dialog box, from the 'Files of Type' drop-down Menu, select Plain Text (*.txt) and select "first.txt" from the Samples folder
12. From the Text Panel, change the font size to 11, and the paragraph alignment to panels-object-text-left left. Name this new Text Object "link 1" in the 'Text Object' Panel
13. On the Timeline Panel, click on Frame 4 in the link 1 Object row, press the addeffect 'Add Effect' button and select Place from the Menu
14. Click on Frame 5 in the pop-up Sprite Object row. The addeffect 'Add Effect' button will change to an panels-timeline-addaction 'Add Script' button. Press the panels-timeline-addaction 'Add Script' button and select Movie Control | Stop from the Menu

15. Press the playscene 'Play Timeline' button on the Control Toolbar. You should see your 'window' fade in quickly, and the 'X' and your imported text will show. Press the stopmovie 'Stop Movie' button on the Control Toolbar

16. Select the window Shape Object from the Timeline Panel and click on Frame 7. Press the addeffect 'Add Effect' button, and select Fade | Fade Out from the Menu. In the 'Fade Out Settings' dialog box change the Effect's duration value from 10 Frames to 3. Press Close to accept the new value
17. Select the X Text Object from the Timeline Panel and click on Frame 7 in the in the X Object row. Press the addeffect 'Add Effect' button and select Remove from the Menu

18. Select the link 1 Text Object from the Timeline Panel and click on Frame 7 in the in the link 1 Object row. Press the addeffect 'Add Effect' button and select Remove from the Menu
19. Select the X Text Object from the Timeline Panel, then select the Script Panel. From the 'Script' Panel, press the panels-timeline-addaction 'Add Script' button and select the Menu options Events | Button | on (press)

20. Press the panels-timeline-addaction 'Add Script' button and use the Menu options: Movie Control | gotoAndPlay(). Leave the 'Target' box blank (implies this Sprite) and enter 6 into the Frame field. The 'Script' Panel should now look like the one below:

21. On the 'Timeline' Panel, click on Frame 10 in the pop-up Sprite row. Press the panels-timeline-addaction 'Add Script' button and select Stop from the Menu
22. Click on Frame 1 in the pop-up Sprite row. Press the panels-timeline-addaction 'Add Script' button and select Stop from the Menu. This Action will hide the Sprite until it is played by the main Movie. This will be applied in the next tutorial.

The pop-up Sprite's Timeline should look like this:

23. To preview this Sprite from within the Sprite's Timeline, you will need to be in Preview Frame mode. Press the fpview 'Preview Frame' button on the Control Toolbar. Click on Frame 0 and drag the Play Head right across the Timeline to preview the animation, or use the arrow controls on the 'Control' Toolbar either side of the fpview 'Preview Frame' button

Advancing one Frame should show the window Object starting the fade in. Advancing to Frame 3 will show the link 1 Text Object and the X Object appear, and at Frame 6 the window Object should start to fade out as the link 1 Text Object and X Object disappear

Grouping a Sprite

1. The pop-up Sprite should be in the top row of the Outline Panel. All other Objects in this Scene belong to your Menu and should appear from the second row and down in the Outline Panel. Select the Object in the second row of the Outline Panel, press and hold the Shift key and select the rectangle shape on the bottom row. As pressing and holding the Shift key allows you to select multiple Objects, these two Objects and the Objects in the rows between them should all be highlighted.

The Outline Panel should look something like this:

2. With these Objects selected, select Group | Group as a Sprite from the Modify Menu. This will create a Sprite Object consisting of every Object in your Menu

Note: If a number of Objects are selected and you select Convert | Convert to Sprite from the Modify Menu, you will create a separate Sprite for each Object selected

3. Select the Sprite Panel and type the word "menu" in the 'Name' edit box.Check the 'Stop playing at end of Sprite' box

This Sprite will be controlled from the Movie's main Timeline, and our purpose for grouping and converting this Menu into a Sprite is twofold. Firstly, it will allow you to have this Menu fade in (rather than suddenly appearing after your intro/splash page) as a Sprite, so that you need only apply the Fade In Effect to the Sprite Object rather than applying this Effect to each Object within it. Secondly, this Sprite can be quickly copied and pasted and used later on in the Movie

4. Select Scene 2 from the top row of 'Timeline' Panel and select the Menu Sprite Object. Select Frame 1 and press the addeffect 'Add Effect' button, select Fade In from the Menu, and press Close to accept the default settings

5. Press the playmovie 'Play Movie' button on the Control Toolbar. Your Menu will fade in after your introduction and the Movie will stop. The pop-up Sprite will not show (we will use this Sprite later). Press the stopmovie 'Stop Movie' button on the Control Toolbar

6. Save your Movie

You are ready to continue with the Adding Interactivity to your Movie tutorial.


Adding Interactivity to Your Movie

This is a tutorial includes step-by-step instructions to creating links in your Movie. This tutorial illustrates some of the features seen in the "first.swi" file in the Samples Menu.

Linking to a Sprite and using the gotoAndPlay() Action

1. Open "myfirst.swi"

2. Check that Scene 2 appears in the Scene row on the Timeline Panel. If Scene 2 does not appear in the 'Timeline' Panel, select Scene 2 from the Outline Panel. In the 'Scene' Object Panel, check the 'Stop playing at end of scene' checkbox

3. From the Outline Panel click on the plus (+) symbol next to the Menu Sprite Object and select the 'LINK 1' button. Make sure that the plus (+) symbol appears next to this button's icon, and that this button's states are not visible

Note: Make sure that none of the button's states are selected when you add your Actions, as you cannot add Actions to the button's state. Objects inside button states are not allowed to have Actions and SWiSH will ignore them

The Outline Panel should look like this:

The gotoAndPlay() Action is used to communicate with a Sprite and the Movie's Main Timeline. In the following example, we will use the gotoAndPlay() Action to call the pop-up Sprite

4. From the Script Panel, select the playSound("beep2.wav") Action in the on(Press) Event function. Press the panels-timeline-addaction 'Add Script' button, and select Movie Control | gotoAndPlay from the Menu. Press the arrow to the right of the 'Target' name box and select "_parent.pop_up" from the Menu. Change the value from 1 to 2 in the 'Frame' box. Leave the 'Play' box checked.

The 'Script' Panel should look like this:

5. Select the Layout tab and Test your Action by pressing the playmovie 'Play' button to review the entire Movie. When the Movie ends, press the 'LINK 1' button. This should cause the text contained within the pop-up Sprite to be displayed. As this Scene will not loop, you can retest by pressing the X Text Object and the 'LINK 1' button again. Press the stopmovie 'Stop Movie' button

Note: The X Text Object can accept Actions, and behaves like a button without the different states

6. Select the pop-up Sprite from the Timeline then press the copy 'Copy' button. Select Scene 2 from the Timeline then press the paste 'Paste' button

Note:
· If you do not select Scene 2 on your 'Timeline' or 'Outline' Panels before pasting, you will paste the copy of your Sprite inside the original
· By copying and pasting your pop-up Sprite, you can save time using it as a Template. This can be done before you add your text, or you can change your text later using the original text as a guide for positioning your new text, then deleting the original

7. Select the Sprite Panel and in the 'Name' edit box. Change the name from "pop-up" to "pop-up2"

Note: Giving your Sprites unique names makes it easy to use the Tell Target Action; as SWiSH will add each Sprite to the 'Tell Target' list, which you can access from the 'Tell Target' edit box within the Actions Panel

8. From the 'Outline' Panel click on the plus (+) symbol next to the Menu Sprite Object and select the 'Link 2' button. Make sure that the plus (+) symbol appears next to this button's icon, and that this button's states are not visible

9. From the Script Panel, select the playSound("beep2.wav") Action in the on(Press) Event function. Press the panels-timeline-addaction 'Add Script' button, and select Movie Control | gotoAndPlay from the Menu. Press the arrow to the right of the 'Target' name box and select "_parent.pop_up2" from the Menu. Change the value from 1 to 2 in the 'Frame' box. Leave the 'Play' box checked. In a similar way, add the line "_parent.pop_up.gotoAndPlay(10);" above the current line. This will cause the Link 1 dialog box (if displayed) to close. Your script should now look like this:

10. From the 'Outline' Panel click on the plus (+) symbol next to the pop-up2 Sprite to access the Sprite's child objects. Select the link 1 Text Object, and from the 'Text' Panel, select all of the text within the text edit box and type "This is different text to show that the 'LINK 2' button is linked to a different Sprite." You may want to split this text onto a number of lines. Name the text "Link 2"

11. Test your scripts for the 'LINK 1' and 'LINK 2' buttons by selecting Scene_2 in the 'Outline' Panel and pressing the playscene 'Play Timeline' button and then pressing the 'Link 1' and 'Link 2' buttons. Press the stopmovie 'Stop Movie' button

12. Save your Movie

Linking to another Scene

1. Select Scene 2 from the Outline Panel. From the File Menu select copy Copy Scene and then File | paste Paste Scene. A new Scene will be created. Click on the Scene name to rename the new Scene Scene_3

2. From the Scene Panel, change the background color to a light green by clicking on the color swatch and selecting the color from the Color Palette. Note that you should select an alpha value greater than 0%, otherwise the colour will not be visible

3. Select Scene 2 from the Outline Panel

4. From the 'Outline' Panel click on the plus (+) symbol next to the Menu Sprite and select the 'Link 3' button. Make sure that the plus (+) symbol appears next to this button's icon, and that this button's states are not visible

5. From the 'Script' Panel select Play Sound "beep2.wav" under the On (Press) Event. Press the panels-timeline-addaction 'Add Script' button, and select Movie Control | gotoAndPlay etc from the Menu. Press the arrow to the right of the 'Target' name box and select Scene_3 from the Menu. Enter 1 into the 'Frame' field. Leave the 'Play' box checked. Your script should be as shown below:

6. Test your Action for the 'LINK 3' button by selecting File | Test | testplayer Test in Player and pressing the 'LINK 3' button. Close the Player window

7. Save your Movie

Linking to another Web page

1. From the 'Outline' Panel click on the plus (+) symbol next to the Menu Sprite to access the Sprite's child objects. Select the 'LINK 4' button. Make sure that the plus (+) symbol appears next to this button's icon, and that this button's states are not visible

2. From the 'Actions' Panel select Play Sound "beep2.wav" under the On (Press) Event. Press the panels-timeline-addaction 'Add Script' button, and select Browser/Network | Get URL from the Menu. In the 'URL' edit box, type "http://www.swishzone.com". For the 'Window' box select _blank from the pull-down Menu. Your script should be as shown below:

Note: When playing within SWiSH, Goto URL actions are not performed.

3. Test your Action for the 'LINK 4' button by selecting File | Test | testbrowser In Browser and pressing the 'LINK 4' button.

If you are online, you will be brought to the SWiSH web site. This page will open in a new window

4. Save your Movie

Linking to the Visitor's E-mail Client

1. From the 'Outline' Panel click on the plus (+) symbol next to the Menu Sprite to access the Sprite's child objects. Select the 'E-MAIL' button. Make sure that the plus (+) symbol appears next to the button's icon, and that the button's states are not visible

2. From the 'Actions' Panel select Play Sound "beep2.wav" under the On (Press) Event. Press the panels-timeline-addaction 'Add Action' button, and select Browser/Network | Mailto from the Menu. In the 'To' edit box, type your e-mail address e.g., me@myaccount.com

3. Leave the 'CC' field blank (this can be used to copy emails to other recipients)

4. In the 'Subject' edit box, type Your First SWiSH Movie

5. The window below the 'Subject' edit box is the message body area. Type "I really like your Movie, can't wait to see the next one you create." in the 'Field' edit box

When the Mailto Action is executed, the Flash Player will start the default e-mail client. The fields you have specified will be already filled in. The user can edit any of these or fill in any that you may leave blank before sending the message

6. Save your Movie

You are ready to continue with the Creating a Preloader tutorial.


Creating a Preloader

This is a step-by-step tutorial for creating a Preloader. This tutorial illustrates some of the features seen in the "first.swi" file in the Samples Menu.

A Preloader is a looping animation that plays while the rest of the Movie loads into your visitor's browser.

1. Open "myfirst.swi"

2. Press insertscene Insert Scene on the Insert Toolbar

3. Press the front 'Send to Front' button on the Standard Toolbar

4. Select the Scene Panel, and change the name to "Preloader" in the 'Scene Name' edit box

5. Press inserttext Insert Text on the Insert Toolbar

6. Select the Text Panel and change the word "Text" to the word "LOADING" in the 'text' window. Change the font size to 20, and the color to a dark green

7. In the Timeline Panel, click on Frame 1 in the Loading Text Object's row. Press Add Effect and choose Fade | Fade In from the Menu

8. Press the 'Add Effect' button and select Move from the Menu. Right-click on the Effect in the Timeline and select properties. From the Motion Tab in the Move Settings dialog box, select Color | Fade to Color, choose a medium gray from the Color Palette, and leave the value set to 100 in the '%' edit box. Press Close to accept the changes

9. Press the 'Add Effect' button again and select Move from the Menu. From the Motion Tab in the Move Settings dialog, select Color | Fade to Color. Choose any color you wish from the Color Palette and change the value to 0 in the 'color A %' edit box

Note: Entering the 0% value in the 'A' (Alpha) % edit box will cause the color to fade to the original dark green again. This can be very useful when you want to display an image or shape in its original color after having changed the color value to tint it

10. Click on Frame 35 in the Loading Text Object's row. Press Add Effect and choose Fade Out from the Menu

The 'Timeline' Panel should now look like this:

11. Press the playscene 'Play Scene' button. Your text should fade in then fade to gray and back to green again; then your text will fade out. The Scene will continue to loop. Press the stopmovie 'Stop Movie' button

12. Select the Preloader Scene row from the Timeline. Right-click on Frame 31 and select Movie Control | gotoAndPlay etc from the context Menu. A place marker for the Go to Frame Action will appear on the Timeline, and the Action will appear in the window of the Actions Panel. From the 'Actions' Panel, change the value in the 'Number' edit box from 0 to 11

The 'Actions' Panel will look like this:

13. Press the playscene 'Play Scene' button. Your text should fade in then fade to gray and back to green again. Your text will continue fading from gray to green and from green to gray until you press the stopmovie 'Stop Movie' button. Press the stopmovie 'Stop Movie' button

14. Press the playmovie 'Play Movie' button. Your "LOADING" text will continue to loop - it will not fade out and your introduction will not begin. Press the stopmovie 'Stop Movie' button

Note:
· You have created the looping animation for your Preloader. Now you need to instruct your Movie to loop this animation until your Movie, or a portion of it, has preloaded into the viewer's browser cache. The instructions that the Player needs can be added to your Movie with the If Frame Loaded and the Go to Frame etc Scripts
· If your Movie is in the viewers cache, there is no need to have them view this looping animation at all. You may instruct your Movie to go to Scene 1 rather than playing the Preloader Scene in the first Frame of the Preloader Scene as in this example

15. Select the Preloader Scene row from the Timeline. Right-click on Frame 1 and select Conditional | If Frame Loaded from the context Menu. This section will be added to and highlighted in the 'Actions' Panel window. By default it will add the 'If Frame 1 of current scene is Loaded' Event to the 'Actions' Panel. This Action will be highlighted. Change the value from 1 to 10 in the 'Frame number' edit box. From the Scene drop-down Menu, select Scene 3

16. Press the 'Add Script' button and select Movie Control | gotoAndPlay etc from the Menu. Leave the Frame value at 0. Select Scene 1 from the Scene drop-down Menu

The 'Actions' Panel should look like this:

You need to add one more Action for your Preloader to function properly

17. Right-click on Frame 30 in the Preloader Scene row and select Conditional | If Frame Loaded from the Menu. Change the value to -1 in the 'Number' edit box, and select Scene 3 from the drop-down Menu. Press Add Script again and select Movie Control | gotoAndPlay etc from the Menu. Change the value from 0 to 35 in the 'Number' edit box. Leave the Scene set to Preloader

Note: The -1 value refers to the last Frame of a Scene. You are instructing the player to download the entire Movie before playing

The 'Actions' Panel should look like this:

Note: For the Go to Frame Action Scene, you can select a Scene by name e.g., Scene 3 as in this example, or choose a relative Scene name such as _LAST_SCENE_ from the Menu

18. Press the playmovie 'Play Movie' button. You will not see the Preloader Scene; as this is a local file your entire Movie is loaded instantaneously. Press the stopmovie 'Stop Movie' button

19. Save your Movie

You are now ready to continue with the Exporting your movie and Getting it Ready for the Web tutorial.


Exporting your Movie and Getting it Ready for the Web

This is a step-by-step tutorial for exporting your Movie.

This tutorial is saved as "first.swi" in the Samples Menu.

1. Open "myfirst.swi"

2. From the File Menu, select Export | exporthtml HTML + SWF. From the 'Publish SWiSH Movie' dialog box, locate the folder you wish to save your files to, and press Save. This will export your Movie in the .swf file format (which the Flash Player will read) and the HTML page that your Movie will be embedded in

3. Upload the .swf and .htm files to your server. Your Movie is now ready to play on the Web

Note : You can find more information on the options available when publishing your Movies in the Export Panel section of this manual. You will also find that the section Using SWiSH with Other Programs covers the Export options and parameters in some detail, particularly in the tutorial Using SWiSH with Dreamweaver

To view your Movie as it will be seen on the Web, locate and open "myfirst.html". This will play your Movie in your default browser.


Using Actions to Control Your Movie

Actions Panel that is displayed, no longer exists.
This is a step-by-step tutorial on how to add Actions to your SWiSH Movie. This tutorial is saved as "Actions.swi" in the Samples Menu.

1. Open "first.swi" from the Samples Menu

2. On the 'Outline' Panel, select Scene 1 and copy to the Clipboard by holding down the Control while pressing the C key (Ctrl+C) on your keyboard

3. Select File | New and close "first.swi" without saving changes. Adjust your new Movie stage size to match "first.swi" by selecting the Movie Panel and changing the Width to 700, Height to 450

4. Paste in Scene 1 from the Clipboard by selecting Edit | Paste from the Main Menu or Control+V on your keyboard

Note: Remember to delete the Scene 1 created with your new Movie, so that you have only one Scene 1 in the Timeline. It should have a + symbol beside it

5. Add a new Text Object by pressing the 'Insert Text' button or by selecting Insert | Text from the Main Menu. Change the size to 36, and change the text to read "Go to Swishzone"

6. On the 'Timeline' Panel click on Frame 122 in the Timeline row labeled Go to Swishzone and add a Place Effect.

This will open the 'Place Settings' dialog box. As we are not changing anything about the Place Effect, simply close this panel. You will notice that a Place Effect marker [image] is now visible at Frame 122

Note: Simply closing the 'Place Settings' dialog box will place your Effect on the selected Object at the specified Fame on your Timeline

7. Select the 'Timeline' Panel tab and select Frame 10 in the row labeled Scene 1 ('Scene' is always the top row in the Timeline). Press Add Action and choose Stop from the Actions Menu

The Timeline should now look like this:

Note: When you move your mouse over the Action marker you should see a ToolTip indicating the Stop Action

8. Now select the THIS Text Object (bottom row of the Timeline) and click on the Actions Panel

9. Press Add Event and choose On Release from the Menu (the [image] 'Add Event' icon was chosen because Events are 'triggers' to Actions)

The 'Add Event' button will change to Add Action, and the selected Mouse Event will show in the window below the button, and also as a checked box on the right of the panel (you can change your chosen event easily here at any time)

10. Press Add Action and choose Play from the Menu.

The Action list should now look like this:

11. Press playmovie Play on the Control Toolbar. The THIS Text Object will fade in and grow onto the screen, then the Movie will stop because of the Stop Action at Frame 10. Now move your mouse over the THIS Text Object and click and release the mouse button. When the mouse is released the Movie continues playing because of the Play Action that is triggered On Release. Press stopmovie Stop on the Toolbar

12. Now go back to the Timeline Panel and select Frame 122 in the row labeled Scene 1

13. Press Add Action and choose Stop from the Actions Menu.
The Actions panel should now look something like this:
(note that the two Stop Actions have been artificially emphasized to clearly indicate what you have just done)

14. On the 'Timeline' Panel, select the Go to Swishzone Object and click on the Actions Panel

15. Press Add Event and choose On Press from the Menu

16. Press Add Action and select Goto Frame from the Menu. You should now see the Goto Frame Properties on the the right side of the Actions Panel

17. Scene 1 and Frame Number 0 (zero) are preselected in the Goto Frame properties. Make sure the 'Goto' and 'Play' options are checked.

The Actions tab should now look like this:

Note: The 'Goto Frame' dialog box will default to Frame 0 | Scene 1. If you wish to direct the Play Head to a different Frame or Scene, enter the Frame and Scene numbers in the dialog box

18. Press Add Action again and choose Goto URL from the Menu. You should now see the Goto URL properties on the the right side of the 'Actions' Panel

19. Enter "http://swishzone.com" into the URL text box.

The Actions tab should now look like this:

20. You will be able to test most of your Actions by pressing playmovie Play on the Control Toolbar. The THIS Text Object will fade in and grow onto the screen, then the Movie will stop. Click and release the mouse button over this Object. The Movie will continue playing and run the rest of your animation until "Go to swishzone" appears and then it will stop. Now move the mouse over the Go to swishzone Object and press the mouse button. The Movie will restart at Frame 0

21. To test the Goto URL Action, select File | Test | In Browser. Your default browser will open and your Movie will start and then stop when it reaches the first Stop Action you applied at Frame 10, click on the THIS Object to carry on playing your Movie. When it reaches "Go to Swishzone" it will stop (at the Stop Action you applied at Frame 122). Click on the Go to Swishzone Object. Your Movie will go back to the start and, at the same time, a new browser window is launched to display the URL http://swishzone.com

Note: Testing the Goto URL Action requires testing in a browser rather than using the 'Play' button on your 'Control' Toolbar

22. You will have noticed that there are other Actions already applied in this Scene. On the Scene line on the 'Timeline' Panel, select the Action marker in Frame 110, hold down the Shift key while you also select the marker in Frame 111 and then press the Delete key on your keyboard

23. On the Timeline in the Scene line, double-click on the sound Action marker on Frame 1. This will open the 'Actions' Panel where you can then select Play Sound to open the 'Import' dialog box

Your 'Actions' Panel should look like this:

24. Import a wave (.wav) file from your system and you will find that it is automatically added to the Play Sound Action list on the left. By double-clicking on the sound in the Content list you will open the 'Play Options' dialog box, where you can select the number of times you want your sound to loop, apply various Effects such as Fade and Pan and also define the length of time and number of Frames your sound will play for

25. Select File | Test in Player to test your Movie

26. Save you Movie


How to Make an Animated Button

Screen shots need to be re-done. Action panel no longer exists.
This is a step-by-step tutorial on how to create a simple animated button using a Sprite. The .swi file for this tutorial is "buttondemo.swi" in the Samples folder.

Buttons can be created using the 'Insert Button' icon on the 'Insert' Toolbar or by converting an existing object into a button by selecting Modify | Convert to Button on the main Menu. This second option is the method illustrated in this tutorial.

1. Create a red circle using the 'Ellipse' vector tool from the Toolbar on the 'Layout' Panel (hold down the Shift key on your keyboard while you drag out the shape to make a circle)

2. On the Main Menu bar, select Modify | Convert to Button

3. Open the 'Outline' Panel, it should look like this:

4. Select the ellipse in the Over State and press Control+C to copy, and Control+V to paste a duplicate into this Over State
Your 'Outline' Pane should now look like this:

5. Open the 'Shape' Panel and select "None" for the Fill type, and then right-click on the Ellipse in the 'Outline' Panel and select Convert | Convert to Sprite. Your 'Outline' Panel should now look like this:

6. Double-clicking on the Sprite in the 'Outline' Panel will open the 'Timeline' Panel showing the Timeline for the Sprite Object. Your Timeline should look like this:

7. On the Timeline, double-click on Frame 10 in the 'Ellipse' object row. This will insert a Move Effect.
Your Timeline should look like this:

8. Double-click on the Keyframe at the end of the Move Effect. This will open the 'Move Settings' dialog box. In this dialog box, select Scale | Resize to Scale | 300% and then Alpha | To Transparent. Press the [image] 'Play Scene' button on your 'Control' Toolbar to preview your Sprite

9. On the 'Timeline' Panel, select the Scene 1 row and press 'Play' to see how the mouseover works to this point. Move the mouse over your red circle. You should see a black circle radiating out from the red circle and fading out

10. Open your 'Outline' Panel to finish editing your button. Select the ellipse in the Over State, then open the 'Shape' Panel and change the color to a bright green. Then go back to the 'Outline' Panel and select the ellipse in the Down State, changing the color to blue in the 'Shape' Panel

11. You are finished. Press the 'Play' button on the 'Control' Toolbar to test your button

12. Save your Movie as "mybutton.swi"


Creating an Auto Run CD

Using the File | Export | EXE (projector)... option, it is possible to save your Movie as a .exe file. When the .exe file is run, your Movie will be displayed without any need to for internet connection or browser programs. This format is ideal for CD distribution.

To make your CD start automatically, it is necessary to create an autorun.inf file. This file can be made in a text editor such as notepad.

The following discussion assumes your exported Movie is called "mymovie.exe". You can name your Movie anything, but you should edit the autorin.inf file appropriately.

Open notepad and type the following:

[AutoRun]
open=mymovie.exe
icon=mymovie.exe,0

Save the file as autorun.inf. If using notepad, you will have to select All files for the Save as type option.

If you have a CD burner and appropriate software installed on your system, you can then create the autostart CD by saving the autorun.inf and mymovie.exe to the root directory of the CD.

You must create the CD using Joliet or ISO9660 file systems. Do not use the Universal Disk Format file system. Universal Disk Format is used by Roxio Direct CD.

Note: Although CDs created using the ISO9660 file system can be read on Apple and other computers, the compiled projector file will not run as it is designed for the Windows operating system and Intel processors. You could save exported .htm and .swf files to to the CD, which would allow your Movie to be viewed using a browser with the Flash Plugin installed. This would allow your Movie to be viewed on non-Windows systems

When the completed CD is inserted into the CD drive, the Movie should start playing automatically.


Scripting Tutorials

The following tutorials can be loaded from the Samples area (File | Samples | filename.swi).

.swi File | Tutorial Name | Purpose
helloworld.swi | Hello World | Demonstrate the use of the trace command and Debug Panel
flowcontrol.swi | Variables and Flow Control | Demonstrate the use of variables, if and while statements
button.swi | Button | Demonstrates the on(release) Button Event
button1.swi | Button with rollOver | Demonstrate the on(rollOver), on(rollOut) Button Events. Demonstrate the _xscale and _yscale properties
calculator.swi | Calculator | Introduces the Text Object with Input and Dynamic text properties. Introduces the Math Object
properties.swi | Object Properties | Introduce the Object properties: _X, _Y, _xscale, _yscale, _width, _height, _alpha, _rotation, _name and _visible
dragging.swi | Mouse Dragging | Introduces startDragUnlocked(), startDragLocked() and stopDrag() methods. Introduces onSelfEvent( press ) and onSelfEvent( release ) Events to start and stop dragging
droptarget.swi | Drop Target / Target | Demonstrates the use of the _target and _droptarget properties
collide.swi | Collision Detection | Introduces isNearTarget() and isNearThis() methods
game.swi | Simple Gaming | Introduces User defined functions, use of onLoad() Event Handling function to initialise variables and the use of the onEnterFrame() Event Handling function to aminate Objects

It is recommended that Normal mode be selected in the Script Panel for the entry of the following tutorials. The tutorials assume that you are familiar with the SWiSH drawing tools. If you are not familiar, please refer to these tutorials first.


Hello World

Description
This is a step-by-step tutorial for creating a Movie displaying the words "Hello World" in the Debug Panel.

Aim
This Movie introduces the method of entering scripts, explains use of the onLoad() Event and demonstrates the use of the trace command and Debug Panel.

.swi file
"helloworld.swi"

1. Start with a new project (File | New) and save the file as "myhelloworld.swi"

2. Select the 'Script' Panel, then enter an onLoad() Event for Scene 1, as shown below.

The 'Script' Panel should now look like this:

3. Add a trace command to the onLoad() Event by selecting the onLoad() function, as shown above. Use the following Menu options to enter the trace statement

Note: It is possible to append a Scripting command by right-clicking on the command you want the new command to appear after, then selecting the Add Script Menu item. Sections of script can also be duplicated and moved using the Cut and Paste Menu options

The 'Script' Panel should now look like this.

Note: The function and trace statement are shown in red. This is because the trace statement is currently incomplete

4. Complete the trace statement by adding the string "Hello World". Select the trace statement in the top half of the 'Script' Panel. The bottom half of the Panel should have the heading trace(); as shown in the image above. Click the bottom section of the Panel (the section with the "trace();" heading) and enter the text "Hello World". Once the second quotation mark has been entered, the text should turn blue. Click anywhere outside of the Panel you have just entered the text into. This will cause the script to be re-validated. The entire script function should turn black indicating that it contains syntactically correct script.

The Panels should now look like this:

Note: If you are confident in the use of command syntax, you can enter commands directly using the Statements | evaluate; Menu option, as shown below

This will result in the following window:

The semi colon ';' will be added for you ((what semi colon??))

5. Select the Debug tab amongst the panels displayed on the right hand side. Check your script by pressing the 'Play' button to run your Movie. The 'Debug' Panel should show the following:

6. Save your Movie

Analysis
When the 'Play' button is pressed, the Movie loads. This causes the script in the onLoad() Event Handling Function to be executed.
The trace statement containing the string "Hello World" is then executed, causing the string to be displayed in the Debug Panel.


Variables and Flow Control

Description
This step-by-step tutorial develops the previous tutorial by introducing variable calculations and flow control. After the Movie displays the words "Hello World" in the Debug Panel, it will calculate the results of y = x * x in the Debug Panel, where x has the values of 0 to 10.
When the result y is greater than 50, it will add the additional comment "wow that is big".

Aim
This Movie introduces the onFrame() Event, demonstrates the use of the trace command and Debug Panel and demonstrates the use of variables, if and while statements.

.swi file
"flowcontrol.swi"

1. Continue from the previous tutorial or, alternatively, load the .swi file "helloworld.swi". Ensure that the 'Play' button is not pressed and save the file as "myflowcontrol.swi".

2. Enter an onFrame Event. This Event will occur when the Movie reaches the specified Frame.

As Frame 1 is the currently selected Frame in the Timeline, the onFrame Event will be for Frame 1 of Scene_1. After inserting the Event, the 'Script' Panel should look like this:

Note:
· The Timeline now indicates via an 's' that a Scripting Event will occur in Frame 1 of Scene 1. If needed, this onFrame Event can be moved to a different Frame by altering the number in the bottom half of the 'Scripting' Panel. The Event can also be moved to a different Frame by dragging the 's' in the Timeline
· The onLoad() event was entered in the previous tutorial

2. Add the following statements to the onFrame (1) Event. Note that script can also be added by selecting the area where you want the script to be placed and then pressing the right moust button to access the Add Script option. The Menu commands used to enter the script are shown under the Comments heading

Statement
Comments.
x = 0;
Enter using Add Script | Statements | name = expr;
Use the down arrow next to Property: to select Variable:. This will cause the value to be treated as a variable. In this case the Target: option can be left blank. This option is used to define the name of the Object that contains the property or variable. Leaving this value blank is the same as entering the value this
y = 0;
Enter using Add Script | Statements | name = expr;
Another way to enter this statement is to use copy and paste to copy the x=0 statement, then change to parameters to make this statement y = 0;
while (x <= 10) {
Enter using Add Script | Conditional | while (...) {
Enter x <= 10 into the lower dialog box
y = x * x;
Enter using Add Script | Statements | name = expr; or copy and modify previous statement
trace("y = " add y add " x = " add x);
Enter using Add Script | Debugging | trace(...)
Note that the add command is used to join multiple strings
if (y > 50) {
Enter using Add Script | Conditional | if (...) {
trace("wow that is big");
Enter using Add Script | Debugging | trace(...)
This command is only executed if the value of y is greater than 50
}
Entered as part of the if statement. Shows the end of the if statement
x = x + 1;
Enter using Add Script | Statements | name = expr;
If this statement is missing, x will never increase and loop will continue indefinitely.
Note that x++ or x += 1 statements could have also been used
}
Entered as part of the while statement. Shows the end of the while loop

Once you have entered the above script commands, your 'Script' Panel should look like this:

3. To check your script, select the Debug tab among the Panels displayed on the right hand side and press the 'Play' button to run your Movie. The 'Debug' Panel should show the following:

Analysis
When the 'Play' button is pressed, the Movie loads. This causes the script in the onLoad() Event Handling function to be executed.
The trace statement containing the string "Hello World" is then executed causing the string to be displayed in the Debug Panel.

Once the Movie has been loaded it starts playing. On frame 1 of Scene_1 the onFrame(1) Event Handling function containing thefollowing script is executed:

x = 0;
y = 0;
while (x <= 10) {
y = x * x;
trace("y = " add y add " x = " add x);
if (y > 50) {
trace("wow that is big");
}
x = x + 1;
}

x and y are both Variables. All variables should be defined a value before use. For this reason, the statement x=0 should be included as the subsequent statement x = x + 1 assumes that x already has a value. As the variable y is only assigned values, the y=0 statement is not strictly necessary, but it is always good practice to set up initial values.

The while loop will continue to execute the contained statements until the value of x exceeds 10. As the last statement of the while loop is x = x + 1, the loop will execute with the values of x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and terminate when x = 11.

The trace statement trace("y = " add y add " x = " add x); is used to display the values for both y and x. The add operator is used to join multiple strings into a single string. Note that the variables x and y are converted to strings for display in the Debug Panel.

On each iteration of the while loop, the value of y is compaired to 50 by the if (y > 50) statement. If the variable y is greater than 50 then the statement contained by the if statement, trace("wow that is big"); is executed. This causes the line "wow that is big" statement to be displayed each time y is bigger than 50.


Button

Description
This is a step-by-step tutorial for creating a button that executes script when pressed.

Aim
This tutorial introduces the procedure for making a simple button and demonstrates the on(release) Button Event.

.swi file
"button.swi"

1. Start with a new project (File | New) and save the file as "mybutton.swi"

2. Create a button.

Select the Layout Panel and use the Rectangle tool to create a small rectangle or square.

Use the Text Tool to create the static text "=".

Move the static text over the rectangle, then select both the text and the shape. Use the right mouse button to Group the two items as a button.

Name the button b1 and select the checkboxes as shown below

3. Add some script to indicate when the button is pressed and when the mouse is positioned over the button. Ensure the 'b1' button is selected in the 'Outline' Panel. Select the 'Script' Panel and use the 'Add Script' button to add an on(release) Button Event for the button. This is entered via the Menu items Events | Button | on(release).

The resulting script should be displayed:

Add the trace statement trace("Button"); using the Menu commands Add Script | Debugging | trace(...). The resulting script should look like:

4. Test the button by selecting the Debug tab among the Panels displayed on the right hand side of the 'Layout' Panel. Press the 'Play' button to run your Movie. Each time the left mouse button is released while over the button, the word Button should appear in the 'Debug' Panel

Analysis
Two Objects, a shape and a static Text Object, were grouped and made into a button using the Group as button command.

Once the button was created, an on(release) Button Event was added. The statements contained within this Event routine execute each time the left mouse button is released while the mouse is positioned over the button.

A trace statement was added to the on(release) Button Event to demonstrate the button Action in the 'Debug' Panel.


Button with rollOver

Description
This is a step-by-step tutorial for creating an animated button that changes size when the mouse is positioned over it.

Aim
This tutorial demonstrates the on(rollOver), on(rollOut) Button Events as well as the _xscale and _yscale properties.

.swi file
"button1.swi"

1. Continue from previous button tutorial, or load the "button.swi" file and save the file as "mybutton1.swi".

2. Check the 'Target' checkbox in the Button Panel. This makes the button a Scripting Object, which allows us to access and manipulate the properties associated with it

3. Select the 'b1' button in the 'Outline' Panel, if not already selected. Select the 'Script' Panel and add a on(rollOver) Button Event for the button by selecting the Menu items Add Script | Events | Button | on(rollOver)

4. Use the right mouse button to click on the on (rollOver) function then add the script _root.b1._xscale = 150;
This is added via the menu items Add Script | Statements | name = expr;
In the 'Target' field, enter _root.b1
In the 'Property' field, select _xscale
Leave the 'Operator' field as =
In the bottom section enter the number 150.

The resulting script should look like this:

Use a similar procedure (or use right click, Copy and Paste then modify parameters) to enter the statement:
_root.b1._yscale = 150;

The resulting script should look like this:

5. Create a on(rollOut) Button Event to return the button to its original size when the mouse moves away from the button. This Event can be created by repeating Step 4 using the on(rollOut) Event function. A quicker way to create the new Event is to copy the existing one and modify it appropriately, as shown below:

Use the right mouse button to right-click on the on (rollOver) { function definition. Use the Copy and Paste options to duplicate the existing function. The resulting script should look like this:

Uncheck the 'Roll over' checkbox and check the 'Roll out' checkbox.
The resulting script should look like this:

Now modify the statements contained in the on (rollOut) Event function so that they are:
_root.b1._xscale = 100;
_root.b1._yscale = 100;
The resulting script should look like this:

6. Test the button by select the Debug tab among the Panels displayed on the right hand side of the 'Layout' Panel. Press the 'Play' button to run your Movie. Moving the mouse over the button, should cause the button to become larger. Once the mouse moves away from the button, the button should return to its normal size. Releasing the left mouse button while the mouse is positioned over the button will cause the word "Button" to be displayed in the 'Debug' Panel

Analysis
Additional Event Handling routines were added to the button to handle the on(rollOver) and on(rollOut) Button Events. When the on(rollOver) Event occurs, the button is scaled to 150% of its original size. When the on(rollOut) Event occurs, the button is scaled to 100% of its original size.

The scaling is achieved by changing the _xscale and _yscale properties. As the button is an Object that occurs in the main Movie, its properties can be referenced via _root.b1.<property>.

By design, Button Events are designed to work on the containing Object. Consequently, if the commands in the Button Event routines were entered as this._xscale = ... or simply _xscale = ..., the Effect would be to scale the main Movie, not the button. In contrast, the onSelfEvent() routine works on the current Object.


Calculator

Description
This is a step-by-step tutorial for creating a simple calculator that calculates the area of a circle, given the radius of the circle (pi * r * r).

Aim
This tutorial introduces the Text Object with Input and Dynamic text properties and the Math Object. It also uses the on(release) Button Event developed in the previous tutorial.

.swi file
"calculator.swi"

1. Continue from the previous tutorial or load the file "button1.swi" and save as as "mycalculator.swi"

2. Insert a Text Object using the Text Tool or the Menu items Insert | Text. Name the new Text Object radius, tick the 'Target' checkbox and set to the text type to Input in the Text Panel

3. Select the 'Advanced...' button and set the options as shown in the diagram below:

Note: The handles around the Text Object change once the type is changed to an Input Text Object

4. Clear the 'Text' field, so the Object appears as an empty input field. Select right justification, as shown below:

5. Create a Dynamic Text Object to display the result of the calculation by using the Text Tool or Insert | Text to insert a Text Object. Name the new Text Object area, tick the 'Target' checkbox and set to the text type to Dynamic in the Text Panel. Clear the text so that an empty text field is displayed and select right justification. Use the Selection Tool to stretch the text field using the cross-shaped handles, as shown below. The advanced settings will be the same as those selected for the previous Text Object and do not need to be altered at this stage

6. Use the Text Tool or Insert | Text to insert some Static text ("area" and "radius") to be used as headings

Note:
· If the text has a line border around it, use the 'Advanced...' button to turn the border off
· Although the new Text Objects appear in the 'Outline' Panel with the same names as the previously inserted Text Objects, a conflict will not occur at the Scripting level as the new Text Objects are not Scripting Objects (they are unnamed and do not have the 'Target' checkbox set)

7. Use the Select Tool to re-arrange the Objects as shown below:

8. Modify the on(release) Button Event function to calculate the area of the circle when the button is released. Select the button then select the 'Script' Panel. Right-click on the trace statement within the on (release) function and select the name = expr statement.

For the 'Target:' parameter, select area (the Dynamic Text Object added in step 5) from the pull-down list.
For the 'Property:' parameter, select text from the pull-down list.
Leave the operator as "=".
Enter the forumula "Math.PI * radius.text * radius.text" in the formula area

Note: "Math.PI" is case sensitive. "PI" could also have been used

9. Test the calculator by reselecting the 'Layout' Panel and press the 'Play' button (fonts may appear to change because system fonts are used). Enter the number 2 into the 'radius' text field and click the '=' button. The following should be displayed in the 'Layout' Panel.

Analysis
The input Text Object radius is a Scripting Object. It is used to allow the entry of the input parameter, radius, the radius of a circle.
Within the script, the input value can be accessed via the name "radius.text". "radius" is the name of the Object, "text" is the property that contains the entered value.

When the button is released, the script contained within the button on(release) Event Handler is executed. This results in the calculation Math.PI * radius.text * radius.text being placed into "area.text", the text property of a Dynamic Text Object named "area". This results in the display of the calculated value.

Note: The area of a circle is given by the formula "pi * r * r" ((I thought the PI was case sensitive see note under point 8))


Object Properties

Description
This is a step-by-step tutorial demonstrating how to manipulate the properties of Text Objects.

Aim
This tutorial uses multiple Text Objects with Input and Dynamic text properties and introduces the Object properties:
_X, _Y
_xscale, _yscale
_width, _height
_alpha
_rotation
_name
_visible.

It also uses the on(release) Button Event developed in the previous tutorial.

.swi file
"properties.swi"

1. Load file "button1.swi". Create an Input Text Object called Xin. (See previous tutorial for more detail). Save the file as "myproperties.swi".

Select the right-justified text option.

2. Create similar Text Objects called Yin, xscalein, yscalein, alphain, rotationin, visiblein. You can create the new Objects using the Text Tool, or by copying and pasting the Xin Text Object and renaming it

3. Add static text titles for the input boxes and re-arrange as shown below. You may find this easier if you enable Snap To Grid

4. Add Dynamic Text Objects heightout, widthout and nameout. Add corresponding static text titles for the new fields.

5. Use the Autoshape Tool to draw an arrow as shown below. You may have to position the mouse over the tool and hold the left mouse button to see the selection Menu that allows selection of the arrow shape. Name the object arrow and tick the 'Target' checkbox.

Note: After naming the Object, you will have to move away from the 'Name:' field to allow the 'Target' checkbox to appear. The Object MUST be named and have its 'Target' checkbox ticked for it to become a Scripting Object

6. Select the arrow shape in the 'Outline' Panel and select the Script tab to add an onLoad() Event Handling function for the arrow. This function will be used to initialise the Input and Dynamic text values

7. Add a name=expr; type statement to the onLoad() Event function.

For the 'Target:' parameter, select _parent.Xin from the pull-down list.
For the 'Property:' parameter, select text from the pull-down list.
Leave the operator as =.
Enter the forumula _X. This formula or value can also be entered by right clicking in the formula field then selecting the properties Menu item.

The resulting function should look like this:

8. In a similar way, expand the onLoad function so that it contains the following statements:

_parent.Xin.text = _X;
_parent.Yin.text = _Y;
_parent.xscalein.text = _xscale;
_parent.yscalein.text = _yscale;
_parent.alphain.text = _alpha;
_parent.rotationin.text = _rotation;
_parent.visiblein.text = _visible;
_parent.heightout.text = _height;
_parent.widthout.text = _width;
_parent.nameout.text = _name;

Note:
You may find it easier to enter one of the statements and then use Copy and Paste to expand that to multiple statements. After entering the multiple statements, edit each individual statement to contain the required data

When the function is executed, the arrow properties will be assigned to the text property of the Input and Dynamic Text Objects

10. Add the following statements to the on (release) Event Handling function of the 'b1' button:

arrow._X = Xin.text;
arrow._Y = Yin.text;
arrow._xscale = xscalein.text;
arrow._yscale = yscalein.text;
arrow._rotation = rotationin.text;
arrow._alpha = alphain.text;
arrow._visible = visiblein.text;

Do this by selecting the 'b1' button in the 'Outline' Panel.

The on (release) function should appear as shown:

When this function is executed, the arrow properties will be updated with new values obtained from the text property of the various input Text Objects

11. Select the 'Layout' tab and press the 'Play' button. The initial properties of the arrow Object should be displayed.

Note: The values you achieve for X, Y, height and width may be different depending on where and how large you drew the arrow

It is possible to alter the X, Y, xscale, yscale, rotation and visible settings. If you modify those settings then press the button, the arrow with the revised settings will be displayed.

Analysis
This example demonstrates the various properties that are associated with a Scripting Object.

The arrow onLoad() Event Handling function is used to load the Input and Dynamic Text Objects with the initial properties of the arrow Object. The arrow properties _X, _Y, _xscale, _yscale, _alpha, _rotation and _visible may be altered by modifying the appropriate Input Text Object and then clicking on the button. The button on (releaes) Event Handling function is used to copy the revised property settings from the Input Text Objects to the arrow Object.

Note: Altering the _xscale and _yscale properties will cause the _height and _width properties to change. The tutorial example will not display this change as the _height and _width properties are only read when the arrow is initally loaded


Mouse Dragging

Description
This is a step-by-step tutorial demonstrating how to make draggable Objects.

Aim
This tutorial introduces startDragUnlocked(), startDragLocked() and stopDrag() methods and onSelfEvent( press ) and onSelfEvent(release) Events to start and stop dragging.

.swi file
"dragging.swi"

1. Start with a new project (File | New) and save the file as "mydragging.swi"

2. Draw a small circle. This circle will be used as the Object that is dragged

3. Select the Script tab and add an onSelfEvent( press ) function for the ball.

4. Right-click on the function name to add a Mouse Dragging / startDrag() command to the onSelfEvent(press) function.

Leave the 'Target:' parameter blank. This will result in the current Object (ball) being the item intended to be dragged

5. In a similar way, create an onSelfEvent( release ) function for the ball with the command Mouse Dragging / stopDrag();

6. Select the 'Layout' tab and press the 'Play' button. Move the mouse over the ball Object and press the left mouse button. While the button is held down, you should be able to drag the ball around the 'Layout' Panel. When the button is pressed, the mouse position within the Object stays in the location where the mouse was first pressed

7. Select the 'Script' tab and then select the startDragUnlocked() command. Check the 'Lock' checkbox. This will change the command to startDraggedLocked(). Return to the 'Layout' Panel and observe the new behaviour (press play if it is not already running)

Note: When the left mouse button is pressed over the Object, the mouse position within the Object now moves to the center of the ball Object

Analysis
This tutorial demonstrates how to make an Object draggable according to mouse input. The onSelfEvent( press ) and onSelfEvent(release) Events are used to start and stop dragging of the ball Object. The methods startDragUnlocked(), startDragLocked() and stopDrag() are used to start and stop the dragging. The startDragLocked() method can be used to force dragging from the center of the Object.


DropTarget / Target

Description
This is a step-by-step tutorial demonstrating the use of the _target and _droptarget properties.

Aim
This tutorial introduces _target and _droptarget properties.

.swi file
"droptarget.swi"

1. Continue from the previous tutorial or load the file "dragging.swi". Save the file as "mydroptarget.swi"

2. Copy and paste the Object "ball". Rename the object "ball2" and change its color to blue

3. Select the Scene in the 'Outline' Panel and add the following script commands:

onEnterFrame() {
if (dt1 != ball._droptarget || dt2 != ball2._droptarget) {
trace("ball._droptarget: " add ball._droptarget);
trace("ball2._droptarget: " add ball2._droptarget);
trace("-------------------------------------------");
}
dt1 = ball._droptarget;
dt2 = ball2._droptarget;
}

onLoad () {
dt1 = "empty";
dt2 = "empty";
}

The onLoad() Event is used to initialise the variables dt1 and dt2. When setting a variable to a value, you will have to change the 'name = expr;' property option to variable via the pull-down arrow. You can then enter the variable name "dt1" or "dt2".

The onEnterFrame() Event is called on each Frame. If the value of ball._droptarget or ball2._droptarget has changed from the previous value(s), then the trace statements are executed.

Your 'Script' Panel should look like this:

4. Select the 'Debug' tab, then return to the 'Layout' Panel and press play. In the 'Debug' Panel you should see:

ball._droptarget:
ball2._droptarget:
-------------------------------------------

Drag the blue ball over the red one. In the 'Debug' Panel you should now see:

ball._droptarget:
ball2._droptarget:
-------------------------------------------
ball._droptarget:
ball2._droptarget: /ball
-------------------------------------------

This means that the blue ball (ball2) now sees /ball as its "droptarget". "/ball" is the name of _root.ball expressed in slash notation. Now "ball2._droptarget: /ball" appears the exact instant the mouse pointer crosses the boundary of the red ball.

Drag the blue ball away from the red ball and drag the red ball over the blue ball

Note:
· The red ball appears under the blue ball because of the current layer ordering. This can be altered by selecting the ball in the 'Outline' Panel, then using the Menu items Modify | Order
· When the red ball is under the blue ball the onSelfEvent (release) is not detected, so it is impossible to stop dragging the red ball while its center is obscured by the blue ball

Drag the red ball away from the blue ball then click the left mouse button to deselect it from dragging. In the 'Debug' Panel you should see:

ball._droptarget:
ball2._droptarget:
-------------------------------------------
ball._droptarget:
ball2._droptarget: /ball
-------------------------------------------
ball._droptarget:
ball2._droptarget:
-------------------------------------------
ball._droptarget: /ball2
ball2._droptarget:
-------------------------------------------
ball._droptarget:
ball2._droptarget:
-------------------------------------------

The line "ball._droptarget: /ball2" indicates that the red ball (ball) now sees /ball2 as its "droptarget". "/ball2" is the name of _root.ball2 expressed in slash notation.

Press the 'Stop' button.

5. Add the following script to ball2:

onEnterFrame() {
if (_droptarget==_parent.ball._target) {
trace("MATCH");
}
}

Your script should now look like:

6. Select the 'Debug' tab, then return to the 'Layout' Panel and press play. Drag the blue ball over the red ball and you should see the following in the 'Debug' Panel:

ball._droptarget:
ball2._droptarget:
-------------------------------------------
MATCH
ball._droptarget:
ball2._droptarget: /ball
-------------------------------------------
MATCH
MATCH
MATCH
MATCH
MATCH
MATCH
MATCH
MATCH
MATCH
MATCH
MATCH
MATCH
MATCH

The word MATCH indicates that the comparison "_droptarget==_parent.ball._target" has returned the value true. The _target property is used to return the name of the target Object in slash notation.

This type of comparison can be used to check when an Object has been dragged over another specific Object

Analysis
The _target and _droptarget properties can be used to detect when one Object is dragged over (or under, depending on layering) another specific Object. This would be useful for implementing, say, a 'trash can'.

One difference between this approach and using (for instance) isNearTarget() and isNearThis(), is that the item being dragged can be easily identified as the _droptarget property only changes for the object that is currently being dragged.

The _droptarget property changes when the mouse pointer crosses the boundary of the other Object.

The onLoad() Event is used to initialise some variables that are used later by the onEnterFrame() Event. The onEnterFrame() Event called on each Frame and is used to check current conditions repetitively.


Collision Detection

Description
This step-by-step tutorial builds on previous tutorials to demonstrate various methods of collision detection. Two methods isNearTarget() and isNearThis() provide a means of detecting proximity between two Objects.

Aim
This tutorial introduces isNearTarget() and isNearThis() methods.

.swi file
"collide.swi"

1. Continue from the previous tutorial or open the file "droptarget.swi". Save the file as "mycollide.swi"

2. Select the blue ball (ball2) in the 'Outline' Panel. Delete the existing Actions from the onEnterFrame() Event then select the if (isNearThis()) conditional statement.

Select _parent.ball from the pull-down list (_parent.ball is the other ball) and select the 'Bounding boxes hit' option

Note: As ball and ball2 are both Objects contained within the main Movie, ball can be referenced via either "_root.ball" or "_parent.ball" from inside the ball2 Object

3. Complete the script for the onEnterFrame() event to be:

onEnterFrame() {
if (_parent.ball.isNearThis()) {
_alpha = 50;
} else {
_alpha = 100;
}
}

This script will change the _alpha (transparency) of the ball2 Object to 50% whenever it is near the other ball

4. Return to the 'Layout' Panel and press the 'Play' button. Drag the blue ball near the red ball from different directions noting when the blue ball becomes partially transparent.

In this example, the balls are not considered 'Near'.

The balls are 'Near' in the example below. This is shown by the blue ball (ball2) becoming partially transparent (_alpha = 50%).

Note:
· The balls are 'Near' even though they are not over lapping. In this case, the definition of 'Near' is defined by the 'Bounding boxes hit' checkbox option. This means that the Objects are considered 'Near' if imaginary rectangles that enclose the Objects intersect
· Note that dragging the red ball towards the blue ball has the same effect (this is different to the previous example)

5. Press the 'Stop' button and return to the 'Script' Panel. Select the "X, Y" option for the if (isNearThis()) statement and enter values 60 for X and 20 for Y.

The "if (isNearThis())" statement should now look like:

if (_parent.ball.isNearThis(60,20)) {

Note the shape of the area where the balls are considered 'Near'

6. Press the 'Stop' button and return to the 'Script' Panel. Select the 'Distance between' option for the if (isNearThis()) statement. Enter a distance that is equal to the sum of the radius of each of the balls. In this example:

Ball has a width of 40 (radius = 20)
Ball2 has a width of 40 (radius = 20)
Distance is therefore 20 + 20 = 40.

The "if (isNearThis())" statement should now look like:

if (_parent.ball.isNearThis(40)) {

Press the 'Play' button and note that the blue ball changes transparency whenever the balls touch or overlap

7. Press the 'Stop' button and return to the 'Script' Panel. Select the ball Object in the 'Outline' Panel (red ball) and add the following script:

onEnterFrame() {
if (isNearTarget(_root.ball2)) {
_alpha = 50;
} else {
_alpha = 100;
}
}

To enter the isNearTarget() function you will need to enter a standard if (...) statement.

You can then enter the function name by typing it or by right clicking and selecting from the pop-up Menu

8. Press the 'Play' button and note that the blue ball changes transparency whenever the balls touch or overlap. Note that the red ball changes transparency when the bounding rectangles of the balls overlap.

The command "if (_root.ball2.isNearThis()) {" would have the same effect

9. Change the command within the if statement to:

if (isNearTarget(_root.ball2, 60, 20)) {

Press the 'Play' button and observe

Note: This behavior is identical to:

if (_root.ball2.isNearThis(60,20)) {

10. Change the command within the if statement to:

if (isNearTarget(_root.ball2, 40)) {

Press the 'Play' button and observe. Both balls should change transparency when they touch.

Note: This behaves is identical to:

if (_root.ball2.isNearThis(40)) {

Analysis
isNearTarget() and isNearThis() methods provide identical functionality using a different parameter interface. Both methods allow proximity to be defined via the size of:

· bounding rectangles (isNearTarget(target) or target.isNearThis())
· arbitrarily sized rectangle (isNearTarget(target, X, Y) or target.isNearThis(X, Y))
· the distance between the centers (isNearTarget(target, D) or target.isNearThis(D)).

Unlike the _target and _droptarget properties discussed in the previous tutorial, the 'Near' condition is not affected by which Object is being dragged.


Simple Gaming

Description
This is a step-by-step tutorial using the On Frame Event to show how Objects can be animated to provide simple gaming functionality.

Aim
This tutorial uses the onEnterFrame() Event to animate Objects.

.swi file
"game.swi"

1. Open the "dragging.swi" file used in the Mouse Dragging tutorial and save the file as "mygame.swi"

2. Draw a rectangle to define the playing area. Name the rectangle "boundary" and tick the 'Target' checkbox

3. Rename the ball Object "bat" and change its Event scripts to be the following:

onSelfEvent (press) {
// Toggle drag mode on / off on mouse press.
if (blDragMode) {
stopDrag();
blDragMode = false;
} else {
startDragLocked();
blDragMode = true;
}
}
onLoad () {
// blDragMode is used to define if object is currently being dragged.
blDragMode = false;
//
// x0, y0 are used to store the position of the object in the previous frame.
x0 = _X;
y0 = _Y;
//
// dx, dy are the x and y velocity of the object.
// ie. dx is the number of pixels in the x direction that the object moved since the previous frame.
dx = 0;
dy = 0;
}
onEnterFrame() {
// Calculate and save the distance moved since the last frame. This is the velocity.
dx = _X - x0;
dy = _Y - y0;
// Save the current position for calculation in the next frame
x0 = _X;
y0 = _Y;
}

As the scripting is becoming more complex, it is useful to add comments using Add Script | Debugging | Comments. Comments are shown as a line starting with // or surrounded by /* */.

The onLoad() function is used to declare variables and setup initial values.
The onSelfEvent(press) is used to toggle the dragging of the bat Object. Press ((the mouse button or the bat or the mouse button on the bat??)) once to start dragging. Press again to stop dragging. Note that the original onSelfEvent(release) has been deleted.
The onEnterFrame() function is called at the start of each Frame. This function is used to calculate and store the instantaneous speed of the bat. The speed is calculated by saving the number of pixels that the Object has moved since the function was previously called. The current position is then saved in x0, y0 for use when the function is called again on the next Frame.

Note that in the image below, only a subsection of the script is shown.

4. Use the Circle Tool to create a new circle. Colour the circle blue. The diamater of this circle was 40

Note: If you create the circle by copying the bat Object, be sure to remove any script associated with the original Object

5. Use the Menu function Modify | Grouping | Group as Sprite to change the unnamed shape into a Sprite. Name the sprite "ball". Using a Sprite for the ball allows multiple balls to be added later using Instances

6. Add the following script to the ball Object. The script below contains some hyperlinks to assist with undertanding.

onLoad () {
   // Define variables and initial conditions.
   // dx is the pixels the object moves per frame in the x direction.
   // dy is the pixels the object moves per frame in the y direction.
   //
   // MinX, MaxX, MinY and MaxY are the minimum and maximum allowable positions for the object.
   // These are calculated based on the size of the boundary object and the radius of this shape.
   dx = 0;
   dy = 0;
   MinX = _root.boundary._X - _root.boundary._width / 2 + this._width / 2;
   MaxX = _root.boundary._X + _root.boundary._width / 2 - this._width / 2;
   MinY = _root.boundary._Y - _root.boundary._height / 2 + this._width / 2;
   MaxY = _root.boundary._Y + _root.boundary._height / 2 - this._width / 2;
   // batradius is the combined radius of the bat and the ball
   batradius = this._width / 2 + _root.bat._width / 2;
}
onEnterFrame() {
   // Move ball to new position
   _X += dx;
   _Y += dy;
   //
   // Check for boundary collision. If collision detected, reverse velocity
   // Use of Math.abs is more robust than simply -dx, -dy.
   // This will work correctly if dx or dy > R but < 2 * R and ball straddles boundary.
   if (_X < MinX) {
      // Force dx to be positive.
      dx = Math.abs(dx);
   }
   if (_X > MaxX) {
      // Force dx to be negative.
      dx = -Math.abs(dx);
   }
   if (_Y < MinY) {
      // Force dy to be positive.
      dy = Math.abs(dy);
   }
   if (_Y > MaxY) {
      // Force dy to be negative.
      dy = -Math.abs(dy);
   }
   //
   // Check for collision with bat.
   if (_parent.bat.isNearThis(batradius)) {
      // We have collided with bat, change ball velocity.
      dx = CalcNewDx();
      dy = CalcNewDy();
   }
}
function CalcNewDx() {
   // Function to calculate the new x velocity of the ball
   // This is not correct physics, (no bounce). Just take on the velocity of the bat
   return _root.bat.dx;
}
function CalcNewDy() {
   // Function to calculate the new y velocity of the ball
   // This is not correct physics, (no bounce). Just take on the velocity of the bat
   return _root.bat.dy;
}

Again, many comments have been used to describe the script. To save time they can be omitted, but they do help explain the code.

For this Object the onLoad() function is used to declare and initialise variables. dx and dy are used to hold the Object's velocity. These are initialised to 0.

MinX, MinY, MaxX and MaxY are used to hold the boundary area that the ball is allowed to travel in. These points are based on the size of the boundary Object and are corrected to take into account the radius of the ball.

Batradius is used to hold the combined radius of the bat and the ball. This is calculated from bat._width / 2 + ball._width / 2. This radius is used when checking a collision condition. A collision has occured when the two Objects are within Batradius of each other (ie. touching or overlapped).

The CalcNewDx() and CalcNewDy() functions can be entered via Add Script | Define function (...) (Leave all parameter fields blank). The functions are used to calculate the new x and y velocity of the ball after a collision with the bat. Functions are used here as they provide a way of grouping sections of code. This can be used to help keep each module small enough to be easily understood. For maximum readability, no function should extend beyond 1 page of display. Initially, the functions do not calculate the physics associated with the ball bouncing off the bat. The bat is assumed to be a 'sticky' bat, i.e. the ball simply adopts the current velocity of the bat.

The onEnterFrame() Event function is called on each Frame. It performs the following tasks:
· updates current ball position based on current dx, dy values
· checks for collision with boundary. Reverses dx, dy if collision is detected
· checks for collision with bat. Updates dx, dy according to values returned from CalcNewDx() and CalcNewDy() functions.

Note: When analysing the script, a += b; means a = a + b;.

7. Test the game by selecting the 'Layout' tab and pressing the 'Play' button. The balls should be stationary. Click on the red ball (bat object) with the mouse. The bat will now follow the mouse pointer until you click the mouse again. Use the bat to hit the blue ball. The blue ball should continue to bounce around the court until it meets the bat again

8. Press the 'Stop' button. Select the ball Sprite in the 'Layout' Panel and right click. Select Make Instance. If the new instance appears off the page, drag it back into the playing area. Press the 'Play' button. There are now two ball Objects that can be hit around the court. Note that the Sprite and the Instance behave independently of each other as each of their variables and associated properties (dx, dy, _X, _Y etc.) are local to the individual Object

Analysis
The onEnterFrame() Event Handling function can be used to animate Objects by altering their _X and _Y properties on a Frame-by-Frame basis.

The onLoad() Event Handling function is useful for defining and initialising variables. If the variables x0 and y0 were defined and initialised within the onEnterFrame() function, their previously stored values would be lost when the function is called on the following Frame.

User defined functions (e.g. CalcNewDx() and CalcNewDy()) can be used to group sections of code and improve readability.

An Instance of a Sprite can behave independently (in a scripting sense) of the original Sprite and is a useful way of creating new game Objects.


Physics Properties

Description
Shows how various gaming functions can be simplified by using Physics Properties.

Aim
Introduce the concepts of velocity, acceleration and friction.
Introduce the available SWiSH specific Physics Properties and demonstrate how they can simplify such scripting.

.swi file
"game1.swi"

Step 1
Continue from the previous tutorial or open the file game.swi
Save the file as mygame1.swi

Step 2
Enable Physics properties for the movie. See here for instructions.
The bat, ball and the ball instance objects. See here for detailed instructions.

Step 3
Modify the bat object so that it calculates velocity based on pixels per second (as opposed to pixels per frame as it currently does). All physics properties are based on per second values.

onEnterFrame() {
// Calculate and save the distance moved since the last frame. This is the velocity.
// The _delta property is used to convert these values to pixels per second.
dx = (_X - x0) / _delta;
dy = (_Y - y0) / _delta;
// Save the current position for calculation in the next frame
x0 = _X;
y0 = _Y;
}

The physics property _delta represents the time period since the last frame. Dividing by this value converts the dx, dy velocities from pixel per frame into pixel per second velocities.
Note that the Physics properties must be enabled for the bat object to allow access to the _delta property.

Step 4
Modify the ball object so that it uses the physics properties _vX and _vY instead of dx and dy from the previous tutorial.

onEnterFrame() {
// Move ball to new position (This is now done automatically by _vX and _vY properties).
//
// Check for boundary collision. If collision detected, reverse velocity
if (_X < MinX) {
// Force _vX to be positive.
_vX = Math.abs(_vX);
}
if (_X > MaxX) {
// Force _vX to be negative.
_vX = -Math.abs(_vX);
}
if (_Y < MinY) {
// Force _vY to be positive.
_vY = Math.abs(_vY);
}
if (_Y > MaxY) {
// Force _vY to be negative.
_vY = -Math.abs(_vX);
}
//
// Check for collision with bat.
if (_parent.bat.isNearThis(batradius)) {
// We have collided with bat, change ball velocity.
_vX = CalcNewDx();
_vY = CalcNewDy();
}
}

Note that the lines

// Move ball to new position
_X += dx;
_Y += dy;

Have now been removed. The dx, dy lines can also be removed from the ball.onLoad() event handling function as they are no longer used.

Step 5
Test the game.
Select the layout tab and press play. The game should behave in a similar fashion to the previous example.

Step 6
Press the stop button.

Analysis


Movie Control

Description:
Demonstrates how to control timelines playing in Sprites and how Sprites can control the main movie timeline.


Sounds

Description:
Demonstrates how sounds can be applied via scripting.


Data Transfer

Description
Demonstrates how data can be transferred to and from .htm, .asp, .php or text files that are resident on a server.

Aim
Introduces the methods:

loadVariables()
loadVariablesNum()
loadMovie()
loadMovieNum().


Using SWiSH with Other Programs

This section uses examples to describe the how to incorporate your SWiSH animation into the following programs:

· Macromedia Flash
· Macromedia Dreamweaver
· Microsoft FrontPage 2000
· Microsoft Powerpoint.


Using SWiSH with Flash

This is a step-by-step tutorial on using your SWiSH (.swf) Movie in Flash.

Note: Flash cannot embed your .swi (SWiSH working file format) Movie, so you will need to export your Movie from Swish as a .swf file

Exporting your .swf Movie from SWiSH

1. Start with the Movie you created in the first tutorial or open "first.swi" from the Samples Menu

2. Uncheck the 'Offset Movie to suit use as a Movie Clip' option on the Movie section of the Export Panel

3. Press the exportswf 'Export to SWF' button on the Export Toolbar, or select Export | Swf from the File Menu. You should now see the 'Export to SWF' dialog box

Note: If the 'Export' Toolbar is not visible, select View | Customise | Toolbars. The dialog box will enable you to turn on the Export Toolbar

4. Choose the folder that you want to export the .swf file to, enter a file name of "first.swf" (without quotation marks) and press the 'Save' button

Importing your .swf file into Flash
There are three possible techniques for importing SWiSH .swf Movies into Flash.

Note: There is a bug in Flash, in addition to the limitations mentioned above, where it will not import some valid .swf files. In particular, it will crash if a .swf file does not have a particular record that is not required in a .swf file. There are two situations in which SWiSH leaves out this optional record. The first is when you select the [x] 'Solid shape with overlap filled' checkbox on the Shape Panel. This option tells SWiSH to export a shape as a font, which has different behavior for self-overlapping shapes. The information Flash requires is not applicable and so is not exported. The second is when you explicitly turn off the font info record with the [x] 'Allow import of text as text object' checkbox on the Export Movie Panel. This tells SWiSH to omit the optional record for all text, which reduces the size of the resulting .swf file.

Method 1. Importing a SWiSH .swf Movie into a Flash layer
This is the simplest way to import a SWiSH .swf Movie and is an appropriate method if you do not want to reposition the SWiSH animation after you have imported it into Flash.

1. Start the 'Macromedia Flash' application and open the Flash Movie (.fla file) you wish to add the SWiSH Movie to

2. Select Import from the File Menu. You should now see the 'Flash Import' dialog box:

3. Select "Flash Player (*.swf, *.spl)" from the 'Files of type' box

4. Locate to the folder where you exported the .swf file, choose "first.swf", and press Open

5. You should now see a new layer in the Flash Timeline. This layer will contain the entire SWiSH Movie

Note:
· Swish cannot export a .fla file directly because .fla is a closed format. Only Macromedia Flash can read and write .fla files
· All Keyframe and tweening information is lost when the SWiSH .swi Movie is converted to a .swf file and imported into Flash. Flash will import every Frame as a Keyframe. This does not mean .swf files made with SWiSH are larger than those made with Flash. This is not really a problem unless you want to edit the tweens on individual letters in Flash. It is much easier to do your edits in SWiSH and import the whole thing into Flash
· To relocate your imported elements, you will need to move every Keyframe, and for this reason, it may be better to import your SWiSH .swf into Flash as a Movie Clip symbol

Method 2. Importing a SWiSH .swf Movie into a Flash Movie Clip
When a Swish .swf Movie is imported into Flash as a new layer, it can be difficult to select and move around the stage. The Swish Movie is much easier to manipulate if you import the .swf into a Movie Clip first, and then place an Instance of the Movie Clip on the stage.

1. Start the 'Macromedia Flash' application and open the Flash Movie (.fla file) you would like to add the SWiSH .swf Movie to

2. Select New Symbol from the Insert Menu

You should see the 'Symbol Properties' dialog box:

3. Call the symbol "first.swi", select the 'Movie Clip' Behavior and press OK

4. Select Import from the File Menu. You should now see the 'Flash Import' dialog box

5. Select 'Flash Player (*.swf, *.spl)' from the 'Files of type' box

6. Navigate to the folder where you exported the .swf file, choose "first.swf", and press Open

7. Now select the Flash Scene where you would like to add the SWiSH animation

8. Select Library from the 'Window' Menu if the Library is not already open

9. Drag and drop "first.swi" from the 'Library' window onto the stage. You can now select and move the SWiSH animation as a single Object

10. Select Control | Test Movie or File | Publish Preview to play the complete animation

Note:
· Unless instructed otherwise, the SWiSH Movie Clip will begin playing at the Frame where you dropped it
· You can stop and start the SWiSH Movie Clip by giving it an Instance name and using Tell Target to control the SWiSH animation
· Flash does not import the attached sounds and Actions with any .swf file, regardless of whether the .swf file was made with SWiSH, Flash or any other application

Method 3. Importing a SWiSH .swf Movie using the Load Movie Action
To get around the limitation of not being able to import sounds and Actions, it may be better to use the Load Movie Action in Flash.

1. Start the 'Macromedia Flash' application and open the Flash Movie (.fla file) you would like to add the SWiSH .swf Movie to

2. Click the 'Add Layer' button in the bottom left of the Flash Timeline

3. Double-click on the Frame where you would like the SWiSH Movie to begin

4. Select the Frame Actions tab on the 'Frame Actions Properties' dialog box

5. Click the '+' button and choose Load/Unload Movie

6. In the 'URL' box type "first.swf"

7. Select Control | Test Movie or File | Publish Preview to play the complete animation

Note:
· The SWiSH .swf Movie should be exported to the same folder as the Flash Movie, otherwise the Load Movie Action will fail
· The 'Flash Output' window will display an error message when it cannot load a Movie
· Flash uses the Windows Temporary Folder when you select the Control | Test Movie option
· Flash uses the Flash installation folder when you select File | Publish Preview


Using SWiSH with Dreamweaver 4

This is a step-by-step tutorial on using your SWiSH (.swf) Movie in Dreamweaver 4.

Note: Dreamweaver cannot embed your .swi (SWiSH working file format) Movie. You will need to export your SWiSH Movie to the Flash Player file format (.swf)

Exporting your .swf file from SWiSH

1. Start with the Movie you created in the first tutorial or open "first.swi" from the Samples Menu

2. Uncheck the 'Offset Movie to suit use as a Movie Clip' option on the Movie section of the Export Panel

3. Press the exportswf 'Export to SWF' button on the Export Toolbar, or select Export | SWF from the File Menu. You should now see the 'Export to SWF' dialog box

Note: If the 'Export to SWF' button is not visible, select View | Customise | Toolbars. The dialog box will enable you to turn on the Export Toolbar

4. Choose the folder that you want to export the .swf file to, enter a file name of " first.swf " (without quotes) and press the 'Save' button

Note: Any export parameters that you set for HTML in the 'Export' Panel of SWiSH will be ignored by Dreamweaver if you simply import your .swf file rather than producing your HTML page in SWiSH and then opening it in Dreamweaver to edit

To insert your .swf Movie into an HTML page using Dreamweaver

Open dreamweaver and you will find that there are 2 ways to access the 'insert Flash' Object:

1. From the Main Menu bar select Insert | Media | Flash (Ctrl+Alt+F)

2. From the Dreamweaver 'Objects' Panel ( Ctrl+F2 ), select the [image] Flash icon and click on it, or drag it to the insertion point on your page

Once you have selected the Movie you wish to insert, Dreamweaver will generate the most common parameters automatically.

If you open your Code Inspector (F10), you will see the code that is produced.
It will look like this (the parameters automatically set by Dreamweaver are highlighted):

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="600" height="400">
<param name=movie value="squeezevariations.swf">
<param name=quality value=high>
<embed src="squeezevariations.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="600" height="400">
</embed>
</object>

This code contains both the <embed></embed> tags recognized by Netscape Navigator and the <object></object> tags recognized by Internet Explorer.

The Properties Inspector
Your Movie properties can be altered and added to by using the Properties Inspector ( Ctrl+F3 ).

Note: Dreamweaver 3 users may see a slightly different Properties Inspector (without the Play button)

Exploring the Movie parameters in the Properties Inspector

W, H: specify the width and height parameters of your Movie in pixels (you can also specify %).

Align: specifies the align parameter, which aligns your Movie to a selected side of the browser window and crops the other sides to fit if needed.

Bg: specifies the BGCOLOR (background color) parameter for the Movie area. This color also appears while the Movie is loading or has finished playing (this is an optional parameter).

Quality: sets the quality parameter for the Object and embed tags that run the Movie. The settings relate to the level of anti-aliasing used during playback of the Movie. With higher settings a Movie looks better, but requires a faster processor to render correctly, while lower settings emphasize speed above appearance (this is an optional parameter).

Scale: sets the scale parameter for the Object and Embed tags that run the Movie (this is an optional parameter).

Autoplay: defines the play parameter. A value of 'true' plays the Movie automatically when the page loads (this is an optional parameter).

Loop: controls the loop parameter, if set to true it makes the Movie loop indefinitely (this is an optional parameter).

id: is an ActiveX ID parameter, which is used to pass information between ActiveX controls (this parameter is automatically generated in your SWiSH produced HTML page) [this is an optional parameter].

V Space, H Space: HTML parameters, which set the amount of white space between your Movie and the browser window.

'Parameters...' button: opens a dialog box where you can add additional parameters to pass on to the Movie.

You can preview your Movie from the 'Properties' Panel by pressing the 'Play' button.

Editing your SWiSH produced HTML page in Dreamweaver
Open your SWiSH-built HTML page in Dreamweaver. You will notice that SWiSH generates a more complete set of parameters than is produced by Dreamweaver. For this reason, it is considered better to produce your HTML page in SWiSH and then import it into Dreamweaver for any further editing.

If you open your Code Inspector (F10), you will see the code that is produced.
It will look like this (the parameters set by the user in SWiSH are highlighted):

<center>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
id=ball width=600 height=400 align=left>
<PARAM name=movie value="ball.swf">
<PARAM name=quality value=autolow>
<PARAM name=scale value=noborder>
<PARAM name=align value=left>
<PARAM name=wmode value=transparent>
<PARAM name=bgcolor value="#666666">
<EMBED name="ball" src="ball.swf" quality=autolow scale=noborder align=left wmode=transparent bgcolor="#666666"
width=600 height=400
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
</center>

This code contains both the <embed></embed> tags recognized by Netscape Navigator and the <object></object> tags recognized by Internet Explorer. It also covers a more comprehensive range of .swf Movie parameters.

To edit your Movie properties open the Properties Inspector ( Ctrl+F3 ).

Note: Dreamweaver 3 users may see a slightly different Properties Inspector (without the Play button)

You will see some of the parameters that you specified in the 'Export' Panel in SWiSH. You can change these by selecting alternatives from the drop-down Menus, or typing a value into the text input boxes.

To see all the parameters you set, you will also need to open the 'Parameters' dialog box by pressing the 'Parameters' button on the Properties Inspector.

This dialog box and the Properties Inspector will allow you to edit all the .swf file parameters of your Movie.
You can also edit the code directly by opening the Code Inspector (F10) and typing in your changes.

Note: Some .swf Movie parameters should not be changed, or changed with care:

· classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
Identifies the media type and should always be left as shown for .swf Movies
· codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
You can change the cab#version to =5,0,0,0 to force the Movie to get the ActiveX control for Flash Player Version 5
· pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
This is the location of the Flash player plugin for Netscape Navigator or browsers that do not use ActiveX controls


Using SWiSH with FrontPage 2000

This is a step-by-step tutorial on how to import your SWiSH (.swf) Movie into FrontPage 2000.

Note: FrontPage 2000 cannot embed your .swi (SWiSH working file format) Movie directly. You will need to export your SWiSH Movie in the Flash Player file format (.swf)

Importing your SWiSH Movie into FrontPage is a three-part process involving three files:

· the .swi file is your SWiSH Movie saved in the SWiSH native file format
· the .swf file is your SWiSH Movie saved in the Flash Player file format
· the .htm file is the web page that acts as a 'container' for the SWiSH Movie when it is displayed in a web browser.

The .swi file is not required to play your SWiSH Movie in a web page, and does not need to be uploaded to your web server. Both the .swf and .htm files must be uploaded your web server and they must be in the same folder.

Step 1: Export your SWiSH Movie to SWF

1. Start with the Movie you created in the first tutorial or open "first.swi" from the Samples Menu

2. Uncheck the 'Offset Movie to suit use as a Movie Clip' option on the Movie section of the Export Panel )

Note: If you can't see the 'Export' Panel, select Export from the Panels Menu

3. Select exportswf Export | SWF from the File Menu

You can also press the exportswf 'Export to SWF' button on the Export Toolbar, if this toolbar is visible. If the button is not visible, select View | Customise | Toolbars. The dialog box will enable you to turn on the Export Toolbar

4. You should now see the 'Export to SWF' dialog box. Choose the same folder where your web page (.htm) file is located, enter a file name of "first.swf" (without quotes) and press the 'Save' button

Note: You must save the Flash Player (.swf) file in the same folder as the web page (.htm) file

Step 2: Copy HTML to Clipboard

1. Select Export | HTML to Clipboard from the File Menu. This copies the HTML code required to display the SWiSH Movie onto the Windows Clipboard so you can paste it into your web page

Step 3: Insert your SWiSH Movie into a web page using FrontPage

1. Start FrontPage and open the web page (.htm file) that you want to insert the SWiSH Movie into. If you are inserting the SWiSH Movie into a new web page, you should first save the empty web page in the same folder as the .swf file

2. Position the caret at the place in your web page where you want to insert the SWiSH Movie

3. From the FrontPage Main Menu, select Insert | Advanced | HTML...

4. You should now see the 'HTML Markup' window. Right-click in the text area and choose Paste.
The 'HTML Markup' window should now look like the screenshot below:

Press OK on the 'HTML Markup' window

5. Change to the HTML tab in FrontPage.

You should now see the following HTML code inserted into your web page:

<!--webbot bot="HTMLMarkup" startspan -->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
  id="first" width="700" height="450">
  <param name="movie" value="first.swf">
  <param name="quality" value="high">
  <param name="bgcolor" value="#FFFFFF">
  <embed name="first" src="first.swf" quality="high" bgcolor="#FFFFFF"
    width="700" height="450"
    type="application/x-shockwave-flash"
    pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
  </embed>
</object>
<!--webbot bot="HTMLMarkup" endspan -->

Note: You should not modify any of the HTML code between the <object> and </object> tags

6. Change to the Preview tab in FrontPage.

You should now see the SWiSH Movie playing inside your FrontPage web page

Trouble-shooting
The most common mistake is to not save the web page (.htm) file and Flash Player (.swf) file in the same folder. If these files are not in the same folder, or the .swf file is missing, your SWiSH Movie will not play. When you upload the web page to your web server, you should make sure that the .swf and .htm files are in the same folder on your web server as well


Using SWiSH with PowerPoint

This is a step-by-step tutorial on how to use your SWiSH (.swf) Movie in a PowerPoint presentation.

Note: PowerPoint cannot embed your .swi (SWiSH working file format) Movie. You will need to export your SWiSH Movie to the Flash Player file format (.swf)

Exporting your SWF from SWiSH

1. Start with the Movie you created in the first tutorial or open "first.swi" from the Samples Menu

2. Uncheck the 'Offset Movie to suit use as a Movie Clip' option on the Movie section of the Export Panel

3. Press the exportswf 'Export to SWF' button on the Export Toolbar, or select Export | SWF from the File Menu. You should now see the 'Export to SWF' dialog box

Note: If this button is not visible, select View | Customise | Toolbars. The dialog box will enable you to turn on the Export Toolbar

4. Choose the folder where you want to export the .swf file, enter a file name of " first.swf " (without quotes) and press the 'Save' button

To Embed a SWiSH .swf Movie into PowerPoint

1. Open PowerPoint and and select the project where you wish to place your Movie. Create a new slide

2. On your Main Menu bar select View | Toolbars | Visual basic. This will display the 'Visual Basic' Toolbar

3. Select the [image] 'Control' Toolbox icon and open the 'Control' Toolbox

4. Select the 'More Controls' icon and scroll down the list to Shockwave Flash Object

Note: What you are doing is inserting an Active X control. You must use the Shockwave Flash Object to see your .swf Movie

5. You will notice that your mouse pointer has changed to a cross hair cursor. Draw out a rectangle on your slide (the size can be adjusted later)

6. Right-click on the rectangle you have just drawn and select Properties. This will open a list of Movie properties that you can apply

7. To embed your Movie, make the following changes:

· Embed Movie: change this value to True
· Loop: change to False (if you want your .swf Movie to loop, leave this parameter as True)
· Movie: type in the absolute path of your .swf movie ( c:/movie_directory/movie_name.swf )

8. Test your Movie by selecting Slide show | View show. You will see your .swf Movie playing on the slide you placed it on

9. Adjust the size to suit your requirements by clicking on the Movie to turn on the drag control points. Drag the Movie boundaries to the dimensions you require and save the presentation


Frequently Asked Questions

Here you will find answers to many questions you may have about SWiSHmax.


Useful Tips

How can I have more than one SWiSHmax Movie open at the same time?
Use File | New Window to create new 'SWiSHmax application' windows. You can have multiple windows open with a different SWiSHmax Movies in each window. Use File | Close to close individual windows, or File | Exit to close all of them and shut down the SWiSHmax program completely.

How can I open a SWiSHmax Movie that I was working on recently?
SWiSHmax saves a list of the four most recently used files under the File Menu. You can open a recent SWiSHmax Movie be selecting it from the File menu.

How can I make my Movie less crowded so I can more easily work on particular objects?
Use the 'Eye' icons in the Outline Panel, or right-click on an object and select the Show or Hide options from the Menu. Hidden objects still exist in the Movie and can still be selected and edited from the Timeline Panel, but do not appear in the Layout Panel while editing or in Preview Frame mode.

How can I select a Group of nearby objects?
While using the Select tool, drag a rectangle to surround the objects. This is called 'marquee' selection. You can also click on an object while holding the Control key to add or remove it from the selection.

How can I see work with the 'Layout' window at actual scale?
Click on the View at 100% button. This will also re-center the stage within the Layout Panel.

How can I see all the objects in a Scene, even those that are off stage?
Select the whole Scene and select the View | Fit Objects in Window command.

How can I Zoom in or out to see all the objects I have selected?
Use View | Fit Objects in Window.

How can I make two or more copies of something without having to copy and paste all the time?
Use Insert | Instance or Edit | Make Instance to create an Instance of a Sprite. As clones, Instances always remain the same as the reference Sprite they are copies of, but can have their own name, Effects and Events.

How can I make a mask?
Create a Sprite. Put some text or a shape at the bottom-most layer of the Sprite and then turn on the 'Masked' option on the Sprite Panel. The text or shape at the bottom of the Sprite becomes a mask when you play.

How can I make room for new Effect Frames between existing Effects?
Use Insert | Insert Frames and Insert | Delete Frames to add or remove Frames for all objects in the Scene. You can use this to make room for extra Effects. If you want to move Effects for a single object, simply select the Effects you want to move and drag them to the left or right in the Timeline Panel.

How can I add animation to a button?
You cannot directly add Effects to an object in a Button State. However, you can convert the object inside a Button State into a Sprite using Modify | Convert | Convert to Sprite. Then you can edit the Sprite and apply Effects to the object inside it.

How can I apply outlines and gradient or image fills to text?
You cannot directly apply outlines and gradient or image fills to text. However, you can convert the text to shapes using Modify | Convert | Convert to Shapes and then apply an outline and gradient or image fill to the resulting individual letter shapes. If you use Modify | Group | Group as Shape, you can convert the text to a single shape and apply a single outline or fill to the whole shape. Note that once converted to shapes, or grouped as a shape, you can no longer edit the text.


Something Odd Happened

Why do letters 'stick' to the edge of the Movie when I import my SWiSHmax animation into Flash?
You have the 'Do not animate off-stage objects' option checked on the Movie Export Panel. Uncheck this option and re-export your SWiSHmax Movie.

Why do some fonts display incorrectly when I opened a SWiSHmax Movie created on another machine?
You do not have all the fonts installed on your machine. Missing fonts will be displayed as Times New Roman. You need to install all the fonts used in the SWiSHmax Movie onto your computer.
Note: Fonts do not need to be installed to play SWiSHmax animations over the internet

Why does my movie get slower and slower as it plays?
If you fade objects out, they remain on the stage completely transparent (with zero alpha). Even though you cannot see them, Flash Player still has to do expensive transparency calculations on them, and that will slow things down.

Why do I get strange holes in my objects?
Flash Player has problems when you have several completely transparent objects overlapping another object and it ends up cutting "holes" in the objects. This can happen if you use a Fade Out effect and do not put a Remove effect immediately after the Fade Out. If you do not put the remove effect, the object stays on the stage, but with zero transparency .. it is still active though (for example if it is a button). If you do not require the object to be active but invisible, you should put a Remove effect after the Fade Out effect. This can also greatly improve movie playback performance.

Why do Effects start one Frame into the animation?
This is so Effects can be joined together seamlessly without the object 'sticking' for one Frame between the Effects. If you need the initial Frame of the Effect, simply shift the Effect one Frame to the right, and select Place Effect to insert an Effect in the first Frame.

Why do objects turns into Sprites when I group them?
Objects in a Group cannot have their own Effects, unless they are (inside) a Sprite. If any of the objects you are trying to Group already have Effects, then that object is first converted to a Sprite so that your Effects are not lost.

Why is the Sprite off center in the 'Layout' Panel, or not visible at all?
When you expand a Sprite to edit it, the system of co-ordinates in the Layout Panel changes from Scene co-ordinates to Sprite co-ordinates. This will make the objects in the Sprite go off center. Use the View | View at 100% or View | Fit Objects in Window to recenter the Layout Panel.

Why does the cursor still move in jumps when I turned of the Grid?
Even if you have hidden the Grid, you may still have Snap to Grid turned on. These are separate options under the View Menu. You can have the Grid visible, but no snapping; or the Grid hidden and snapping turned on. Use View | Snap to Grid to turn Grid snapping on or off. You can also turn this on or off, and set the Grid size, from the Movie Panel.

Why don't I see masking happening?
Masking only happens when the Movie or Scene is playing. When you are editing, masking is turned off automatically, so that you can see both the mask shape and the objects being masked.

Why can't I see the 'Export' Panel?
The Export Panel is hidden when you first install SWiSHmax. You can show the Export Panel by selecting Panels | Export from the main Menu.

Why can't I see the 'Tint' Panel?
The Tint Panel is hidden when you first install SWiSHmax. You can show the Tint Panel by selecting Panels | Tint from the main Menu.

Why can't I see all the Menu commands on Toolbars?
Use the View | Toolbars Menu to turn on additional Toolbars. Use Tool | Customise to add, move or remove buttons from Toolbars.

My Panels and Toolbars are all mixed up. How do I reset SWiSH to the default layout?
You can restore the Panels to the default layout by selecting Panels | Reset to Defaults. You can restore the Toolbars to the default layout by selecting Tools | Customize and pressing Reset All on the Toolbars tab. If your SWiSHmax layout is still mixed up, follow this procedure:
1. close SWiSHmax if it is running
2. press the Windows 'Start' button and select Run...
3. type "regedit" (without quotes) into the Open edit box and press OK to open the Registry Editor
4. in the Registry Editor open the folder: My Computer\HKEY_CURRENT_USER\Software\
5. select the SWiSHzone.com folder, right-click and select Delete
6. close the Registry Editor
7. restart SWiSHmax.
SWiSHmax will now start with the default layout.

Flash crashed when I imported my SWF file. Why?
There is a bug in Flash where it will not import some valid SWF files. In particular, it will crash if a SWF file does not have a particular record that is not actually required in a SWF file. There are two situations in which SWiSHmax leaves out this optional record. The first is when you select the [x] Solid shape with overlap filled checkbox on the Shape Panel. This option tells SWiSHmax to export a shape as a font, which has different behavior for self-overlapping shapes. The information Flash requires is not applicable and so is not exported. The second is when you explicitly turn off the font info record with the [x] Allow import of text as text object checkbox on the Export Movie Panel. This tells SWiSHmax to omit the optional record for all text, which reduces the size of the resulting SWF file. See Importing a SWiSH Movie into Flash.

I imported my SWF file into Flash ok, but when I play the Flash movie thee is nothing there. Why?
There is a bug in Flash when importing a SWF that has masking. Even though it looks ok inside Flash itself, when Flash generates a SWF file, nothing is visible. To avoid this, ensure that the [x] Mask off-stage objects option is turned off in the Export Movie Panel.

A warning message was displayed when I tried to select an Adobe PostScript font. Why?
Due to a bug in Adobe Type Manager 4.0 (and earlier) for Windows NT, use of PostScript fonts may cause SWiSHmax to close.
To fix this either:
· Update to ATM 4.1 or later (ATM Lite is a free download)
· Turn off ATM 4.0, and convert your PostScript fonts to TrueType using Windows NT TrueType Converter.
To do this:
1. turn off ATM 4.0
2. restart Windows NT
3. go to Start | Settings | Control Panel | Fonts | File | Install New Font
4. in the 'Install Type 1 Font' dialog box turn on Convert Type 1 Font to TrueType and Install Type1 Font Files for use on a PostScript printer. Turn off Copy Type 1 Font Files to Fonts Folder
5. click Yes.

For more information refer to:
http://www.macromedia.com/support/freehand/ts/documents/freehand_7_and_atm_4_for_nt.htm
http://www.macromedia.com/support/flash/ts/documents/flash_crash_fonts.htm
http://www.macromedia.com/support/flash/ts/documents/tn4105.html


Importing Into SWiSHmax

Can I import .swf or animated .gif files into SWiSHmax?
Yes. Use the Insert | Content command and select the .swf or animated .gif file you want to import. Then select the Frames you wish to import and whether you want to import as a Sprite or as a Group of Frames (usually one would choose to import as a Sprite). Alternatively, you can simply drag and drop files from Windows Explorer onto SWiSHmax to import them.

Can I import text into SWiSHmax?
Yes. Use the Insert | Content command and select the .txt file you want to import. Alternatively, you can simply drag and drop text files from Windows Explorer onto SWiSHmax to import them.

Can I import images into SWiSHmax?
Yes. Use the Insert | Image command and select the image file you want to import. Alternatively, you can simplye drag and drop image files from Windows Explorer onto SWiSHmax to import them.

Why aren't all actions, masks or sounds in my .swf import into SWiSHmax?
When importing a Flash Animation (*.swf) file, SWiSHmax does not import any sounds, morph shapes, external video streams or Flash clip events. Clipping (mask) layers are imported, but are not automatically set as a mask object in SWiSHmax. Not all actions available in Flash can be imported, for a full list of the actions supported see File | Import.

Why do I see a lot of Keyframes when I import a .swf into SWiSHmax?
This is a limitation of the .swf format. It is not due to a problem with either SWiSH or Flash. SWF files only hold Frame information. They do not contain information about Scenes, Effects or tweening. When imported into Flash, Flash is not able to reconstruct tweening and layering. Read this Technote from Macromedia.

Why doesn't SWiSHmax import Flash (.fla) files?
FLA is a closed format. Macromedia has only published the specifications for .swf (the Flash Player format) not .fla, therefore, only Macromedia can read and write .fla files.

Why doesn't SWiSHmax import Live Motion (.liv) files?
LIV is a closed format. Adobe has not published the specifications for .liv, therefore, only Adobe can read and write .liv files.


Exporting From SWiSHmax

Can I export a .swf file from SWiSHmax?
Yes. Use File | Export | SWF to export a .swf from SWiSHmax. You can embed this in a web page, play it in the Flash Player, or import it into Flash.

Can I export an .avi file from SWiSHmax?
Yes. Use File | Export | AVI to export an .avi from SWiSHmax.

Can I export an .exe file from SWiSHmax?
Yes. Use File | Export | EXE (projector) to export an .exe from SWiSHmax.

Can I generate an HTML web page from SWiSHmax?
Yes. Use File | Export | HTML to export a .htm web page from SWiSHmax. This will also export the corresponding .swf file, and will include the HTML tags required for scripting.

Can I generate HTML code from SWiSHmax?
Yes. Use File | Export | HTML to Clipboard to export the HTML code required to embed a .swf in a web page. You can paste this into your web page using your HTML editor.

Why doesn't SWiSHmax export Flash (.fla) files?
FLA is a closed format. Macromedia has only published the specifications for .swf (the Flash Player format) not .fla, therefore, only Macromedia can read and write .fla files.

Why doesn't SWiSHmax export Live Motion (.liv) files?
LIV is a closed format. Adobe has not published the specifications for .liv, therefore only Adobe can read and write .liv files.


Importing SWiSHmax Movies Into Flash

Can I import .swf Movies made by SWiSHmax into Flash?
Yes.

Can I import SWiSHmax (.swi) files into Flash?
Not directly. You must export your SWiSHmax .swi file as a .swf file, and then import the .swf into Flash.

How do I export SWiSHmaxmovies as .swf files?
In SWiSHmax, select File | Export | SWF from the File Menu and enter a filename. See Importing a SWiSHmax Movie into Flash.

How do I import a SWiSHmax .swf file into Flash as a layer?
In Flash, select File | Import and select Files of Type: Flash Player (*.swf, *.spl) on the 'Flash Import' dialog box. Choose the .swf file you exported from SWiSHmax and select Open. Flash will create a new layer and place the SWiSH animation in that layer. See Importing a SWiSHmax Movie into Flash.

How do I import a SWiSHmax .swf file into Flash as a Movie clip?
In Flash, first create a Movie clip and import the SWiSHmax animation into the Movie clip. Then place an Instance of the Movie clip on the stage. See Importing a SWiSHmax Movie into Flash.

SWiSHmax animations imported into Flash are difficult to select and move. How do I make them easier to manipulate?
Import the .swf file as a Movie clip instead of as a layer. See Importing a SWiSHmax Movie into Flash.

When I import a .swf into a Flash Movie clip, the animation is shifted down and to the right. How do I fix this?
In SWiSHmax, check the 'Offset to suit use as a Movie Clip' option in the Movie section of the Export Panel. Re-export the .swf from SWiSHmax and re-import it into Flash as a Movie clip. See Importing a SWiSHmax Movie into Flash.

When I import a .swf into a Flash layer, the animation is shifted up and to the left. How do I fix this?
In SWiSHmax, uncheck the 'Offset to suit use as a Movie Clip' option in the Movie section of the Export Panel. Re-export the .swf from SWiSHmax, and re-import it into Flash as a layer. See Importing a SWiSHmax Movie into Flash.

Why don't sounds and actions I added in SWiSHmax import into Flash?
This is a limitation of Flash. Flash will not import Actions, buttons, sounds, or Sprites (Movie clips) from a .swf file. Read this Technote from Macromedia. See Importing a SWiSHmax Movie into Flash.

Why do my buttons and sprites not import correctly into Flash?
This is a limitation of Flash. Flash will only import the first frame of a sprite, and the "up" state of a button. Read this Technote from Macromedia. See Importing a SWiSHmax Movie into Flash.

Why does Flash crash when I import my SWF files?
There is a bug in Flash, in addition to the limitations mentioned above, where it will not import some valid SWF files. In particular, it will crash if a SWF file does not have a particular record that is not actually required in a SWF file. There are two situations in which SWiSHmax leaves out this optional record. The first is when you select the [x] Solid shape with overlap filled checkbox on the Shape Panel. This option tells SWiSHmax to export a shape as a font, which has different behavior for self-overlapping shapes. The information Flash requires is not applicable and so is not exported. The second is when you explicitly turn off the font info record with the [x] Allow import of text as text object checkbox in the Export Movie Panel. This tells SWiSHmax to omit the optional record for all text, which reduces the size of the resulting SWF file. See Importing a SWiSHmax Movie into Flash.

Why can't I see anything when I export from Flash after I import my SWF files?
There is a bug in Flash, in addition to the limitations mentioned above, where it will not generate bad SWF files after importing SWiSHmax file that have masking. In particular, if you turn on the [x] Mask off-stage objects checkbox in the Export Movie Panel, Flash will get confused if you import the resultant SWF file. See Importing a SWiSHmax Movie into Flash.

Why do I see a lot of Keyframes when I import a .swf into Flash?
This is a limitation of the .swf format and the limitations of Flash. It is not due to a problem with SWiSHmax. SWF files only hold Frame information. They do not contain information about Scenes, Effects or tweening. When imported into Flash, Flash is not able to reconstruct tweening and layering. Read this Technote from Macromedia. See Importing a SWiSHmax Movie into Flash.


Flash

Do I need Macromedia Flash installed to use SWiSHmax?
No. SWiSHmax is a stand-alone application. It is not a plugin for Macromedia Flash. SWiSHmax can export .swf animations and create web pages without Flash being installed. However, you may find it useful to have the Flash Player installed on your computer. SWiSHmax is very useful for Flash users because it allows them to import Text Effects into larger Flash Movies.

Can I import a .swf file into Flash?
Yes. See the FAQ section on importing SWiSHmax movies into Flash.

Can I import a .swf file into SWiSHmax?
Yes. See the FAQ section on importing into SWiSHmax.


SWF Files

What are Shockwave Flash (.swf ) files?
SWF is a file format used by Macromedia to deliver graphics, animation and sound over the Internet. SWF files are much like .gif files in that they will play in most browsers without installing a plugin. SWF files can be imported into Macromedia Flash and used as part of a larger animation. SWF is pronounced "swiff".

Can I export a .swf file from SWiSHmax?
Yes. See the FAQ section on exporting from SWiSHmax.

Can I import a .swf file into Flash?
Yes. See the FAQ section on importing SWiSHmax movies into Flash.

Can I import a .swf file into SWiSHmax?
Yes. See the FAQ section on importing into SWiSHmax.


File Size And Performance

SWiSHmax is taking a long time to redisplay the Layout Panel. How can I speed this up?
If you have a lot of objects visible in a single Scene it will increase the time taken to redisplay the Layout Panel. To improve the redisplay time, try unchecking the Show All Images and Smooth Edges and Images options on the View menu. This will affect display quality, but should improve performance. You can also improve performance by hiding large objects, such as lengthy text objects and complex shapes. To hide an object select Edit | Hide, or click on the eye icon on the Outline Panel.

How can I reduce the size of the .swf file produced in SWiSHmax?
There are a number of techniques you can use. These include:
· reusing similar fonts in similar sizes and colors
· using smaller image and sound files. You can also change JPEG and sound compression options (e.g. choose MP3 compression)
· looping short sound clips rather than using a single long clip
· using vector graphics rather than bitmap (raster) images
· reusing sprites. Use instances to ensure copies of sprites remain identical.
· minimizing the use of Effects where lots of objects (or components of objects) are moving at once (such as explode and squeeze)
· changing the options for 'Text as Shapes' and 'Share Font'. Although the default settings are usually the best, in some cases you can get smaller file sizes by changing these settings
· checking the 'Do not animate off-stage objects' option on the Export Panel - this removes animation of objects that are outside the 'Movie' window of the .swf file
· unchecking the 'Allow import of text as text object' option on the Export Panel - this removes some information that is only required when importing the .swf into Flash.

Why do some Effects produce larger .swf files than others?
Effects where lots of objects (or components of objects) are moving at once, such as Explode and Squeeze, require many 'Place' Object tags to be exported in every Frame of the .swf file. Effects that change both color and position will also increase the size. Effects such as typewriter only change the current letter being typed, requiring only one 'Place' Object tag per Frame.

Why does my Movie pause or play slowly when playing from the Internet?
The .swf file format requires fonts, shapes, image, sounds and so on to be defined before they are used. These definitions take up space in the .swf file and time to download. By default, SWiSHmax will export these content definitions at the Frame where they are first used. This can mean that playing will slow down or pause while the definitions at a Frame are downloaded. You can use various preloading techniques to stop this from happening and to make you Movie appear to load quicker and play more smoothly.

Why does my movie play at different speeds or slows down or speeds up partway through?
The frame rate (fps) is a maximum rate only. The Flash Player will render every frame of your animation. If a particular frame (or series of frames) involves a lot of computation, then that will slow down the play rate. Things that require a lot of work by the Flash Player (and therefore slow down your movie) are lots of objects with alpha < 100% (eg faded), or animating large bitmaps, or having lots of objects animated at the same time. If playback speed is a problem, look for these things and try altering your design to avoid them.

Why does my movie get slower and slower as it plays?
If you fade objects out, they remain on the stage completely transparent (with zero alpha). Even though you cannot see them, Flash Player still has to do expensive transparency calculations on them, and that will slow things down. Also you may end up with grpahic glitches with several transparent objects overlapping non-transparent objects. This is another Flash Player problem.

How can I find out what things are taking up space in my .swf file, and where they are?
Use the File | Test | Report command to see a breakdown of how much room is taken up by various SWF tags in each scene. You can use this to help fine tune the file size and performance.


Macintosh Support

Is a Mac version planned?
A Mac version is currently not planned. However, .swf files created by SWiSHmax will play on a Mac, and can be imported into the Mac version of Flash.


Purchasing, Registration and Licensing

I have a question about purchasing, registration or the licensing of SWiSHmax.
Look at some of the frequently asked questions in the Purchasing, Registration and Licensing section.


Publishing SWiSHmax files
Previous Top

Introduction
SWiSHmax creates flash format files (.swf) for playback on the world wide web. They are mostly compatible with the Flash 3 player, and entirely compatible with the Flash 4, Flash 5 and Flash 6 player. Since version 4 of the Netscape Navigator and Microsoft Internet Explorer browsers, such players have been built in (and users usually do not need to download a player).

How to publish a file to the web
In order for any SWiSHmax created animation to work, both a .html file and a .swf file must be produced and uploaded to your web server. The HTML file serves as a container for the .swf file. It will 'refer' to your .swf file. The reference tells the browser how big to display the file, and which player to use (this will always be the Flash player in SWiSHmax's case).

If you are adding a SWiSHmax animation to your web page, you will need to copy the necessary tags into your web page. In SWiSHmax the menu option sequence File | Export | HTML to Clipboard will copy the tags to the clipboard so you can paste them into your page.

If you don't know html or don't have an editor, you can get a .html page fully made up for you, by using File | Export | HTML. In SWiSHmax, you will need to use File | Export | SWF to create the .swf files. Keep the two files in the same directory. Upload them both to your web server. Unfortunately we cannot give generalized instructions for uploading, as many web servers are different. However if you are using ftp to upload your files, you must upload the .swf file in binary mode otherwise it will be corrupted. All FTP programs have options for this.

Why wont my movie play ? My browser (Internet Explorer) sits there with a black window, and downloads the file for 10 minutes! My browser (Netscape) displays a broken link or tries to download the plugin again!
Cause: .swf file has not been uploaded to the web server.
Remedy: upload the .swf file as well as your .html file to your server
Cause: .swf file is corrupted on the server.
Remedy: upload the .swf file again via ftp and binary mode
Cause: your object and embed tags have the wrong filename
Remedy: edit your object and embed tags to have the correct file name
Cause: MIME types on your server are missing or incorrect
Remedy: visit this page at Macromedia for procedures to resolve this http://www.macromedia.com/support/flash/ts/documents/tn4151.html

Why won't my movie play ? It works in netscape but not IE
Cause: the object tags are missing. This commonly occurs with older versions of Microsoft Frontpage, which produce only embed tags when importing a .swf file to a Frontpage managed website.
Remedy: use the File | Export | HTML to Clipboard to get a full set of tags for your file, and paste that over your current object and embed tags in your html editor.

Why won't my movie work ? It works in Internet Explorer but not in Netscape
Cause: the embed tag is missing
Remedy: use the File | Export | HTML to Clipboard to get a full set of tags for your file, and paste that over your current object and embed tags in your html editor.
Cause: the filename contains unusual characters such as spaces.
Remedy: Rename the file in SWiSHmax to have only alpha numeric . - and _ characters, re-export the file, and recreate your tags (the File | Export | HTML to Clipboard option). Paste in your updated tags.

My background colour in my movie is wrong. It doesn't match the background colour of my website
Cause : The background colour is set externally via the tags. If you edit your web page and change your web pages background, and change the colour to match in SWiSHmax, but don't change the tags in your html, the colour set by the tags will override the colours set in SWiSHmax.
Remedy : Either, edit your tags to have the matching colours, or recreate your tags from SWiSHmax (File | Export | HTML to Clipboard), and paste these into your page.

My text is blurry (anti-aliased)
Cause : the Flash player does this automatically. Its much more noticeable on small point sizes
Remedy : if its suitable, increase the point size. If not, edit the tags (in your html page), and set the quality to autolow. Then check the file to see if this made anything else work poorly. See the tag sections below if you need information on tags.

My movie is not in the same position in Netscape Communicator compared to Microsoft Internet Explorer
Causes: This can be because your html is not strictly correct, and some parts are missing in one or the other browser. Generally Microsoft Internet Explorer will try and "render around problems". Netscape Communicator is less tolerant of poorly formed html. Alignment problems in Netscape Communicator can be caused by excess white space in table definitions (in and around the tr and td tags). It can be caused by using CSS syntax to position elements, which Netscape Communicator 4 implements differently to other browsers. It can be caused by simple differences in the browsers themselves (Netscape Communicator 4.06 positions slightly differently to Communicator 4.08 and all other Netscape browsers that followed). Microsoft Internet Explorer positions things slightly differently to Netscape Communicator in general, particulary with tables and margin sizes.
Remedy : These are html and browser problems, not SWiSHmax problems. You'll get different problems depending on which editors and browsers you use to create and test your pages. Each situation is different and you'll have to experiment to get it right. Here are some things to try. Try removing excess whitespace. Try setting more element positions explicitely. (use fixed sizes in tables, put size parameters for pictures etc). Try simplifying your tables, (less column and row spans). Use sub tables instead. Try setting fonts explicitely. Try removing fussy aspects of your design, or replace cut up pictures with single pictures. If you have Dreamweaver and Frontpage, try loading the file into Dreamweaver and using the "strip microsoft' command.
There are many useful sources of correct html syntax. The official reference is this site : http://www.w3c.org/

My html background image doesn't show through the movie, even though I chose transparent
Transparency is only supported by Microsoft Internet Explorer 5 onwards. It will not work in Netscape Communicator, Mozilla, or Microsoft Internet Explorer 3, or 4.

My browser crashes (or more commonly, my clients browser crashes!)
Cause: Predominantly the browser that crashes is Netscape 4.7 or Netscape 4.71. This browser was shipped originally with a buggy flash player. Its suffers from both random lockups, and instant lockups when presented with certain version flash files.
Remedy: Downloading and Installing the Flash 5 player will generally solve this problem. For best results, its worth updating the Netsape 4.7 browser as well. The Flash 5 player can be located at http://www.macromedia.com/ and later versions of Netscape Communicator 4.7 can be located at http://www.netscape.com/
Cause: The .swf file is corrupted on the web server.
Remedy: Re-export and re-upload your movie.

Reference material : Explanation of the html tags.
SWiSHmax is primarily concerned about creating .swf files. Thus the HTML creation facilities are automated and limited. If you want or need finer control over how your SWiSHmax created animation appears on your website, you may need to edit the tags concerned (either with a text editor such as notepad, or a html editor such as Frontpage or Dreamweaver).
There are 3 types of tags. Object and Parameter tags, and the embed tag.
Object and Parameter tags are generally used by the Microsoft Explorer browser to display .swf files.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" id="Movie1" width="400" height="300">

the object tag, tells the browser were to find a downloadable player if one is not installed already. If you want the movie to fill the browser window, set the width to "100%" and height to "100%"
<param name="movie" value="Movie1.swf">
the above param tag tells the browser which .swf file to play
<param name="quality" value="high">
this parameter controls the playback quality. Set it to low or auto-low if you are having problems with anti-aliased text
<param name="bgcolor" value="#FFFFFF">
this tag controls the background colour of the movie. It overrides any settings in the movie itself. If your movies background doesn't match your html body background colour, (when you meant it to), this tag is always the cause.
<embed name="Movie1" src="Movie1.swf" quality="high" bgcolor="#FFFFFF" width="400" height="300" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
The embed tag does everything that the object and parameter tags do for IE, in one tag for the Netscape browser. Note that it is usually within the Object tag. (most versions of IE understand both embed and object, so if you don't put the embed inside the object tag, you'll get 2 movies in IE and one movie in Netscape). The properties work the same as the individual parameter tags do for IE. The most important thing to note, if you change a param tag for IE, you must make the same change to the corresponding embed tag property to retain consistent results across both browser types.
</embed>
</object>
these tags close the embed and object tags. The object tag is always after or below the embed tag. (the embed tag is contained completely within the object tag).


Alpha

 The Alpha value controls the transparency or opacity of an object. The greater the alpha value the more opaque it appears (i.e. 100% is solid). The smaller the alpha value the more transparent it appears (i.e. 0% is invisible).


Character

 A character is a single element of a Complex Object. An example of a character is a letter in a text object. Characters are also known as components.


Component

 A component is a single element of a complex object. An example of a component is a letter in a text object. Components are also known as characters.


Context Sensitive Help Definition

 Context-sensitive help provides documentation about the particular feature that you are in the process of using.


.topic 100
The File Menu enables you to work with .swf files and Movies as a whole.

The available options are as follows:

Manage .swi files
  New
  Open...
  Save
Save As...

Templates
New from Template
Save as Template

Create a new 'application' window
New Window

External files and testing
Samples
Import...
Export
Test

Recent files
Recent Files

Closing windows and exiting
Close
Exit.

.topic 101
  File | New (Ctrl+N)
Creates a new SWiSH Movie. If you already have a Movie open, SWiSH will ask you if you want to save it before closing the current Movie and creating a new one.

.topic 102
  File | Open... (Ctrl+O)
Opens a .swi (SWiSH Movie) file.

You can also use File | Open to create a new SWiSH Movie ((to import a specified file into??)) into which the file you specify imported. To do this, choose a file with a type and extension that is supported by File | Import.

Show Preview
A preview of the currently selected .swi, .swf or image file is provided to allow you to see the Movie or image before opening it.

Note:
SWiSH cannot open .fla files because it is not a public format
If you want to open an existing .swf file and do not have the corresponding .swi file, use File | Import to import it into the current Movie

.topic 103
  File | Save (Ctrl+S)
Saves the current SWiSH Movie. If it is a new Movie, SWiSH will ask you for a name. There is no need to type in the .swi extension.

If the Auto Export option is set, every time you save your .swi file you will be prompted to save a corresponding .swf file. This way, the Save command also automatically saves a new .swf file for the Movie.

.topic 104
File | Save As...
Saves the current SWiSH Movie under a new name. There is no need to type in the .swi extension.

.topic 105
File | New Window (Ctrl+Shift+N)
Opens a new 'SWiSH application' window. You can create or edit different SWiSH Movies in different windows. This allows you to copy objects from one Movie and paste to another.

.topic 106
File | Samples
The Samples Menu contains a list of sample .swi Movies to illustrate some of the potential of SWiSHmax.

The following examples are included in the Samples folder and many more samples are available at http://www.swishzone.com/movies.php.

Snakes.swi
This example was produced by Roger Onslow to illustrate the many Effect variations possible using the Snake Effect in SWiSHmax. A study of the settings used in each of these variations will assist you in understanding what they do. It also includes, as a bonus, Scenes which demonstrate a Radarscope Effect and a Spotlight Effect produced with a masked Sprite and three vector objects.

Pseudo3D.swi
This example, produced by Dawn Barrie, also shows some variations on the Snake Effect, but uses the gradient fill properties of vector objects to show how a pseudo 3D Effect can be produced. It also demonstrates an Explode Effect applied to a 'sheet of glass' (a group of vector shapes).

Ray of Light.swi
This example was also produced by Dawn Barrie, to illustrate the use of vector shapes and gradient fills to produce the Effect of light beaming out from, and sweeping across, the letters of a word.

Spritedemo.swi
This example was produced by David Petley to illustrate the use of masked Sprites. An inspection will show the use of Sprites within Sprites.

Actions.swi, Buttons.swi, First.swi
The Actions, Buttons and First samples are used in the tutorials.

Three other examples from SWiSH v1.5 are also included. They illustrate some basic techniques.

Promo.swi
The demonstrates how Text Effects, including Squeeze, Scale and Wave, are simply and effectively applied.

Preloader.swi
This is a basic preloader. SWiSHmax provides more preload options, but this shows the basics.

Menu.swi
This example shows how easy it can be to apply Mouse Events to Text Objects and, although this only shows the Goto URL Action, there are many other Actions that can be applied.

.topic 107
File | Import...
Imports an external file into the current Scene. Multiple files may be selected for importing by holding the Shift or Ctrl key while selecting. SWiSH currently supports the following formats:

Text
Plain text (*.txt)

Images (raster)
Windows bitmap (*.bmp; *.dib)
GIF image (*.gif)
JPEG image (*.jpg; *.if, *.jpeg)
PNG image (*.png)

Graphics (vector)
Windows Metafile (*.wmf)
Enhanced Metafile (*.emf)
 Flash Graphics (*.swf both compressed and uncompressed)

Animation
Animated GIF (*.gif)
Flash Animation (*.swf both compressed and uncompressed)
Flash Projector (*.exe)
 SWiSH Movie (*.swi)

Flash Animation
When importing a Flash Animation (*.swf) file, SWiSHmax does not import any sounds, morph shapes, external video streams or Flash clip events. Clipping (mask) layers are imported, but are not automatically set as a Mask Object in SWiSHmax. The following Actions are imported, all other Actions are ignored:
setLabel
play
stop
gotoAndPlay
gotoAndStop
stopAllSounds
nextFrame
prevFrame
getURL
fscommand
javascript
mailto
loadMovie
if frame loaded
var = expression
_property = expression.

Sound
Wave sounds (*.wav)
MP3 sounds (*.mp3)

Note:
When importing a sound, SWiSHmax will add a Play Sound Action that will play the sound to the current Frame of the current Scene or Sprite
MP3 sounds are imported without SWiSHmax processing it, so external programs can be used for optimum compression or quality

Import Frames
The 'Import Frames' dialog box appears when you import an animation. With this dialog box, you can select the Frames you want to import.

Select All Frames button
To select all Frames in the Frame list.

Import background
The background rectangle will be imported if this option is checked.

Import as a Sprite
The selected Frames will be imported as a Sprite if this option is checked. Otherwise, the selected Frames will be imported as a group of pictures.

Masked
The imported Sprite will be masked by the background rectangle if this option is checked.

Show File Information...
Displays the details of the file to be imported.

.topic 108
  File | Export | SWF... (Ctrl+E)
Exports the current SWiSH Movie to a .swf file. You can import the .swf file into Flash by choosing File | Import and selecting Files of Type: Flash Player (*.swf, *.spl) on the 'Flash Import' dialog box. See the tutorial on Importing a SWiSH Movie into Flash.

  File | Export | HTML + SWF... (Ctrl+P)
Creates an .htm and .swf file for uploading to your web site. Both the .htm and .swf files will have the name you enter on the 'Publish SWiSH Movie' dialog box.

Note: Once these files have been created, simply upload to your web server (using FTP or similar). That's it. No other files are necessary to play your SWiSH Movie over the internet. See the section Publishing SWiSHmax Files for more information on uploading files to the web

  File | Export | EXE (projector)...
Exports the current SWiSH Movie to a Flash Player 6 projector executable. This allows you to show your Movie without any external program or browser. See Creating an Auto Run CD for information on how to create a CD that will automatically show your Movie when a CD containing the projector is inserted into the CD Drive.

  File | Export | AVI... (Ctrl+D)
Exports SWiSH Movies in the .avi video format. Actions (except sounds), buttons and other interactive components are excluded.

Note: During the export process, the 'SWiSH main application' window will be minimized. The export process is done in two stages: capturing audio and recording data. During capturing audio:
make sure your computer is not running a heavy process, as this will affect the quality of the exported audio
Do not press the 'Cancel' button and then 'Continue' otherwise the exported audio might be out of synchrony

File | Export | HTML to Clipboard
Copies the HTML code for embedding the .swf file to the Clipboard. If you wish to insert your Flash Movie into an existing web page, just paste the code in the Clipboard into your existing web page. The HTML code does not include any scripting functions.

Display Export Options
Displays the 'Export' Panel allowing access to the Export options of each export file type.

.topic 109
 File | Test | In Player
Creates a temporary .swf file, launches the Flash Player and plays the current SWiSH Movie in the Flash Player.

Note:
If the stand-alone Flash Player is not detected on your system, a projector executable is used installed with SWiSHmax
You can also use this to create a stand-alone projector .exe file. Use File | Test | In Player, then select File | Create Projector from within the Flash Player

  File | Test | In Browser
Creates temporary .htm and .swf files, launches the default browser and displays the HTML page containing the Movie in the browser.

Note: You must have at least one browser associated with .htm files

File | Test | Report
Displays the details of the Movie to be exported.

.topic 110
Below the Test Menu item and above the Close Menu item, you will see a list of the four most recently used files. Select any of these Menu options to open the file.

.topic 111
File | Close (Ctrl+F4)
Closes the current SWiSH Movie. The 'application' window for the current SWiSH Movie will be closed, unless it is the only 'SWiSH application' window left open, in which case this has the same effect as File | New. File | Close will never shut down the last 'SWiSH application' window.

.topic 112
File | Exit
Exits the SWiSH application. All 'SWiSH' windows will be closed.

.topic 200
The Edit Menu enables you to make changes to a Movie.

The available options are as follows:

Undo or Redo changes
  Undo
  Redo

Copy, Paste and Delete Scene, Object, Effects, etc.
  Cut
  Copy
  Paste
  Delete

Object Selection
Select All
Deselect All

Search
   Find

Create an Instance of a selected Sprite
  Make Instance

For showing or hiding Objects
Show
Hide
Lock
Show All States
Hide All Except
 Lock All Except

Open Object
Expand Object
Close Object

Show the properties of an Object, Effect, etc.
Properties

Preferences
Preferences.

.topic 201
  Edit | Undo (Ctrl+Z)
To Undo the last change made to the current SWiSH Movie. SWiSH supports unlimited Undo/Redo commands. Almost all changes can be undone.

.topic 202
  Edit | Redo (Ctrl+Y)
To Redo the last change made to the current SWiSH Movie. SWiSH supports unlimited Undo/Redo commands. Almost all changes can be redone.

.topic 203
  Edit | Cut (Ctrl+X)
Deletes the currently selected Object or Effect and copies it to the Clipboard. If no Effect is selected the Object will be copied.

.topic 204
  Edit | Copy (Ctrl+C)
Copies the currently selected Object, Effect or Scene to the Clipboard. The selected Object, Effect or Scene is not deleted. If no Effect is selected, the Object will be copied.

.topic 205
  Edit | Paste (Ctrl+V)
Pastes the Object, Effect or Scene in the Clipboard to the current SWiSH Movie. If an Object is being pasted, it is added to the current Scene/Sprite/Button State/Group in the center of the Movie at the top of the stacking order. If an Effect is being pasted, it is inserted at the current Frame of the selected Object or selected group of Objects. If a Scene is being pasted, it is inserted after the currently selected Scene in the Movie.

.topic 206
  Edit | Delete (Delete)
Deletes the currently selected Object or Effect.

.topic 211
Edit | Select All (Ctrl+A)
Selects all Objects in the current Scene.

.topic 207
  Edit | Make Instance
Creates an Instance of the selected Sprite. An Instance is a clone of a reference Sprite. The contents of the Instance and its reference Sprite are always consistent. Making changes to the Instance will also change the reference Sprite and vice versa.

Note: The selected Sprite must have a name or must itself be an instance of another Sprite

.topic 208
  Edit | Show
Shows the selected Object(s). The Object can also be selected from the Outline Panel.

.topic 209
  Edit | Hide
Hides the selected Object(s). However, hidden Objects will still appear when the Movie is played. The Object can also be hidden via the Outline Panel.

.topic 210
  Edit | Show All States
Shows all states (Up, Over, Down and Hit) of a button translucently, to help you position and edit the Objects in those states. The state you have selected will appear darker.

.topic 212
Edit | Properties (Alt+Enter)
Displays the properties of the selected Object or Tool in Object Panel.

.topic 300
The View Menu enables you to show and hide windows and change the view of the Movie.

The available options are as follows:

Preview Frame mode
  Preview Frame

Toolbars and Status Bar
Toolbars
Status bar

Zooming
  Zoom in
  Zoom out
  View at 100%
  Fit Scene in Window
  Fit Objects in Window

Rulers, Grids, Guides and snapping
  Show Rulers
  Show Grid
  Show Guides
 Lock Guides
  Clear All Guides
  Snap to Grid
  Snap to Pixel
  Snap to Object Handles
  Snap to Guides

Display quality
Show All Images
Smooth Edges and Images.

.topic 301
  View | Preview Frame
'Preview Frame' mode previews the current Frame in the Layout Panel.
In Preview Frame Mode, you can move, scale, rotate and skew Objects in Keyframes using the   Select Tool or   Reshape Tool and the appropriate Tool Option.

.topic 302
View | Toolbars
Shows or hides a specific Toolbar. See the Toolbars topic for a list of Toolbars.

.topic 303
View | Status Bar
Shows or hides the Status Bar.

The Status Bar is at the bottom of the 'SWiSHmax' window and is used to display Help for the selected command or tool. The Status Bar also displays the estimated file size of the exported .swf file and the current x and y co-ordinates of the cursor in the Layout Panel.

Note: The actual file size of the export .swf may be smaller depending on the optimizations selected on the Export Panel

.topic 307
  View | View at 100%
Views the Movie at its actual size in the Layout Panel.

.topic 308
  View | Fit Scene in Window
To fit the entire Scene (stage area) into the Layout Panel.

.topic 309
  View | Fit Objects in Window
To fit all selected Objects into the Layout Panel. If no Object is selected, this function will fit all Objects in the Scene into the Layout Panel.

.topic 310
  View | Show Grid
Displays or hides the Grid on the Layout Panel. The Grid is a network of evenly spaced horizontal and vertical lines that cover the canvas. It can help you to align your artwork and arrange Objects symmetrically. You can change the Grid settings on the Guides Panel.

See also: Show Grid, Snap to Grid, Guides, Guides Panel.

.topic 311
  View | Snap to Grid
Have Objects Snap to the Grid while moving or editing. It will automatically align Objects along your Grid when they come within a certain distance of it. You can change the Grid settings on the Guides Panel.

See also: Show Grid, Snap to Grid, Guides, Guides Panel.

.topic 312
  View | Snap to Object Handles
To have an Object Snap to another Object's Handles while moving or editing. You can change the settings on the Guides Panel.

.topic 400
The Insert Menu enables you to add things to the Movie.

The available options are as follows:

Add Scenes
  Scene

Add Objects
  Text
  Button
  Sprite
  Image...
  Content...
  Instance...

Effects and Scripts
Effect
Script

Frames
Insert Frame
 Delete Frame.

.topic 401
  Insert | Scene
Inserts a new Scene into the Movie.

.topic 402
  Insert | Text
Inserts text into the current Scene/Sprite/Group. You can edit the text in the Text Panel.

.topic 403
  Insert | Button
Inserts a button into the current Scene/Sprite/Group.

.topic 404
  Insert | Sprite
Inserts a Sprite into the current Scene/Sprite/Group.

.topic 405
  Insert | Image...
Inserts an image from an external file into the current Scene/Sprite/Group.

SWiSHmax currently supports the following image formats:

Windows Bitmap (*.bmp; *.dib)
GIF Image (*.gif)
JPEG Image (*.jpg; *.jif, *.jpeg)
PNG Image (*.png).

.topic 406
  Insert | Content...
Inserts an external file into the current Scene/Sprite/Group.

This is the same as the File | Import command.

.topic 407
  Insert | Instance...
Inserts an Instance of a specific Sprite into the current Scene/Sprite/Group.

An Instance is a clone of a reference Sprite. The contents of the Instance and its reference Sprite are always consistent. Making changes to the Instance will also change the reference Sprite and vice versa.

.topic 408
Insert | Effect
Inserts an Effect to the selected Object or selected group of Objects at the current Frame. The Submenu has a list of the available Effects. Some of the Effects have a further submenu where you can select the basic Effect, or one of the preset Effects you have recently used (saved or loaded).

.topic 411
Insert | Insert Frame (F5)
Inserts a new Frame before the current Frame in the Timeline.

.topic 412
Insert | Delete Frame (Shift+F5)
Deletes the current Frame from the Timeline.

.topic 500
The Modify Menu enables you to change the properties of the currently selected Object(s).

The available Submenus are as follows:

Grouping, Convert and Break
Grouping
Convert
Break

Change layer and Transform
Order
Transform

Change Text Objects
Alignment
Justification
Appearance.

.topic 501
  Modify | Grouping | Group as Group (Ctrl+G)
To Group selected Objects together. Complex Effects can then be applied to the Group.

Note: Because a Group does not have its own Timeline, SWiSH converts any Objects with Effects into Sprites before grouping

  Modify | Grouping | Group as Button
Groups the selected Objects together as a Button.

  Modify | Grouping | Group as Sprite
Groups the selected Objects together as a Sprite.

  Modify | Grouping | Group as Shape
Groups the selected Objects together as a single shape.

Note:
If you want to use multiple Text or Shape Objects as a mask, you should group them as a shape
Objects with Effects/Events cannot be grouped as a single shape, as you will lose the Effects and Events. You should manually remove these before grouping, if desired
When grouping as a single shape, you will be asked whether to 'Make the overlapped regions of objects with the same fill style empty?'. If you select yes, the overlapped regions of Objects with the same fill style will become empty. You can use this feature to punch a hole in a shape as shown below

If you use the merged shape as a mask, any overlapping regions will be empty (see below left). If you want the overlapping regions to be filled, then check the 'Solid shape with overlap filled' option in the Shape Panel (see below right). If you use this setting on a shape that is not being used as a mask, then the shape will always have a solid fill with no outline, regardless of the fill and line styles specified

After grouping as a single shape, the edges of the Object behind are no longer covered by the object in front, as shown below

  Modify | Grouping | Ungroup (Ctrl+U)
Splits a Group or Sprite into separate Objects.

.topic 502
  Modify | Convert | Convert to Button
Converts the selected Objects into individual Buttons.

  Modify | Convert | Convert to Sprite
Converts the selected Object into individual Sprites.

.topic 503
  Modify | Order | Bring to Front
Moves the selected Object in front of all other Objects.

  Modify | Order | Send to Back
Moves the selected Object behind all other Objects.

  Modify | Order | Bring Forward
Moves the selected Object one step closer to the top of the stack of Objects.

  Modify | Order | Send Backward
Moves the selected Object one step closer to the bottom of the stack of Objects.

.topic 504
Modify | Transform | Rotate 90
Rotates the selected Object by 90 degrees.

Modify | Transform | Rotate 180
Rotates the selected Object by 180 degrees.

Modify | Transform | Rotate 270
Rotates the selected Object by 270 degrees.

Modify | Transform | Flip Horizontal
Flips the selected Object horizontally.

Modify | Transform | Flip Vertical
Flips the selected Object vertically.

Modify | Transform | Reset
Resets the Transform to default settings, except for position.

.topic 505
Align specifies what you mean by the 'position' of the Object. For example, when you talk about the position of the Object, you may be referring to where the center of the Object is. The alignment position can be one of nine preset positions on the corners, edges and center of the object. The alignment position is also the center for rotation and scaling of the Object. You can see the co-ordinates of the alignment position in the 'Transform' Panel.

Modify | Align | Left
Align selected Objects to the left.

Modify | Align| Center (Horizontally)
Align selected Objects to the center horizontally.

Modify | Align | Right
Align selected Objects to the right.

Modify | Align | Anchor (Horizontally)
Align selected Objects horizontally by anchor point.

Modify | Align | Top
Align selected Objects to the top.

Modify | Align | Center (Vertically)
Align selected Objects to the center vertically.

Modify | Align | Bottom
Align selected Objects to the bottom.

Modify | Align | Anchor (Vertically)
Align selected Objects vertically by anchor point.

Modify | Align | Distribute | Left
Distribute selected Objects horizontally by left side.

Modify | Align | Distribute | Center (Horizontally)
Distribute selected Objects horizontally by center point.

Modify | Align | Distribute | Right
Distribute selected Objects horizontally by right side.

Modify | Align | Distribute | Anchor (Horizontally)
Distribute selected Objects horizontally by anchor point.

Modify | Align | Distribute | Top
Distribute selected Objects vertically by top side.

Modify | Align | Distribute | Center (Vertically)
Distribute selected Objects vertically by center point.

Modify | Align | Distribute | Bottom
Distribute selected Objects vertically by bottom side.

Modify | Align | Distribute | Anchor (Vertically)
Distribute selected Objects vertically by anchor point.

Modify | Align | Space Evenly | Horizontally
Space selected Objects evenly horizontally.

Modify | Align | Space Evenly | Vertically
Space selected Objects evenly vertically.

Modify | Align | Space Evenly | Both
Space selected Objects evenly both horizontally and vertically.

Modify | Align | Make Same | Width
Make selected Objects the same width.

Modify | Align | Make Same | Height
Make selected Objects the same height.

Modify | Align | Make Same | Both
Make selected Objects the same height and width.

Modify | Align | Make Same | By Scaling
Scale selected Objects when changing size.

Modify | Align | Make Same | By Resizing
Resize selected Objects when changing size.

Modify | Align | Relative To All Selected
Makes all the alignment options align relative to all the selected Objects.

Modify | Align | Relative To Last Selected
Makes all the alignment options align relative to all the last selected Object.

Modify | Align | Relative To Parent
Makes all the alignment options align relative to selected the Object's parent. This is useful for positioning/aligning Objects within a Sprite.

Modify | Align | Relative To Stage
Makes all the alignment options align relative to the stage.

.topic 506
Modify | Justification | Align Left/Top
Aligns the lines of the selected text to the left/top with ragged right/bottom edge.

Modify | Justification | Center
Centers the lines of the selected text with ragged right and left edges.

Modify | Justification | Align Right/Bottom
Aligns the lines of the selected text to the right/bottom with ragged left/top edge.

Modify | Justification | Align Full
Aligns the lines of the selected text on both sides.

.topic 507
Modify | Appearance | Bold (Ctrl+B)
Makes the selected text bold (toggle).

Modify | Appearance | Italic (Ctrl+I)
Makes the selected text italic (toggle).

Modify | Appearance | LR-TB Flow
Displays the selected text from left to right, top to bottom.

Modify | Appearance | TB-RL Flow
Displays the selected text from top to bottom, right to left.

Modify | Appearance | RL-TB Flow
Displays the selected text from right to left, top to bottom.

Modify | Appearance | TB-LR Flow
Displays the selected text from top to bottom, left to right.

.topic 600
The Control Menu enables you to control how the Movie is played and previewed.

The available options are as follows:

Play
  Play Movie
  Play Scene
  Play Effect
  Preview Frame

Stop
  Stop

Move the play head
  Step Forward
  Step Back
  Cue to End
  Rewind to Start.

.topic 601
  Control | Play Movie
Plays the Movie.

.topic 602
  Control | Play Scene
Plays the current Scene only.

.topic 603
  Control | Play Effect
Plays the part of the Scene containing the currently selected Effects.

.topic 604
  Control | Preview Frame
Switches to 'Preview Frame' mode to preview the current Frame in the 'Layout' window.

In Preview Frame Mode, you can move, scale, rotate and skew Objects in Keyframes using the   Select Tool or   Reshape Tool and the appropriate Tool Option.

.topic 605
  Control | Stop
Stops playing the Movie, Scene or Effect.

.topic 606
  Control | Step Forward
Steps forward to the next Frame in 'Preview Frame' mode.

.topic 607
  Control | Step Back
Steps back to the previous Frame in 'Preview Frame' mode.

.topic 608
  Control | Cue to End
Jumps to the last Frame in 'Preview Frame' mode.

.topic 609
  Control | Rewind to Start
Rewinds to the first Frame in 'Preview Frame' mode.

.topic 700
The Tools Menu enables you to set application-wide preferences and add your own commands to the SWiSH User Interface.

The available options are as follows:

Preferences
Customize
Keyboard Map.

You can add additional options to the Tools Menu by selecting the Customize option, and then choosing the Tools tab.

.topic 702
Tools | Customize...
Opens a dialog box to customize the Toolbars and Menus.

The available tabs are as follows:

Commands: to add/remove a command to/from a Toolbar
Toolbars: to show/hide a Toolbar or add/rename/delete a custom Toolbar
Tools: to add/edit/remove an external command to/in/from the Tools Menu
Keyboard: to add/remove a shortcut key to/from a command
Menu: to add/remove a command to/from a Menu
Options: to configure the 'look' of Menus and Toolbars.

.topic 703

To add a command to a Toolbar
1.	Make a selection from the Menu in the 'Categories' box
2.	Drag the command you want from the 'Commands' box to the displayed Toolbar

To remove a command from a Toolbar
Simply drag the icon off the Toolbar.

.topic 704

To show/hide a Toolbar
1.	Select an option from the 'Toolbars' box
2.	Tick/Untick the check box to show/hide the selected Toolbar

To add a custom Toolbar
1.	Click the 'New...' button, and in the 'Toolbar Name' box, type a name for the new Toolbar
2.	Click the Commands tab
3.	In the 'Categories' box, click the category that contains the command that you want to add to the new Toolbar
4.	From the 'Commands' options, drag the command to the new Toolbar

To rename a custom Toolbar
1.	In the 'Toolbars' box, click the Toolbar you want to rename
2.	Click the 'Rename...' button and type the new name in the 'Toolbar Name' box

To delete a custom Toolbar
1.	In the 'Toolbars box', click the Toolbar you want to delete
2.	Click the 'Delete' button

To reset a Toolbar to the default settings
1.	In the 'Toolbars' box, click on the Toolbar you want to reset
2.	Click the 'Reset' button

To reset all Toolbars to the default settings
Click the 'Reset All' button.

To display text labels on Toolbars
1.	In the 'Toolbars' box, click the Toolbar you want the text labels be displayed on
2.	Check the 'Show text labels' checkbox

.topic 705

To add a command to the Tools Menu
1.	Click the   'New' button or double-click the blank area of the 'Menu contents' box
2.	Type the name of the Tool as you want it to appear on the Tools Menu. To specify a letter in the Menu title as an access key, precede that letter in the 'Menu contents' box with an ampersand (@). The first letter in the title is the keyboard access key by default
3.	Highlight the name of the tool you just entered in the 'Menu contents' box
4.	In the 'Command' box, browse using the   'Browse' button or type the path and name of the program
5.	In the 'Arguments' text box, browse or type any arguments to be passed to the program
6.	In the 'Initial directory' box, type the file directory where the command is located

To remove a command from the Tools Menu
1.	In the 'Menu contents' box, select the command you want to delete
2.	Click the   'Delete' button or press the Delete key

To edit a command in the Tools Menu
1.	In the 'Menu contents' box, select the command you want to edit
2.	To move the command up/down one position in the Menu, click the   'Move Up' or   'Move Down' buttons, respectively. To change the Menu text, 'Command' line (tool path and file name), command-line 'Arguments', or the 'Initial directory', type the new information in the appropriate text box

.topic 706

To assign a shortcut key
1.	In the 'Category' list, select the Menu that contains the command that you wish to assign a shortcut key
2.	In the 'Commands' list, select the command that you wish to assign a shortcut key
3.	In the 'Press New Shortcut Key' box, press the shortcut key or key combination that you want and click the 'Assign' button. If you press a key or key combination that is currently assigned to another command, an 'Assigned To' section will appear under the 'Press New Shortcut Key' box

To delete a shortcut key
1.	In the 'Category' list, select the Menu that contains the command you wish to delete the shortcut key to
2.	From the 'Commands' list, select the command you wish to delete the shortcut key to and click the 'Remove' button

To reset all shortcut keys to their default values
Click the 'Reset All' button.

.topic 707

To add a command to an Application Frame Menu
1.	Use the 'Show Menus for' drop-down list to select the Menu you want to customize
2.	Click the Commands tab and drag the commands into the Menu

Note: To remove items, just drag them off the Menu

To reset the Menus to their original configuration
Click the 'Reset' button.

To add a command to a context Menu
1.	Use the 'Select context menu' drop-down list to select the pop-up Menu you want to customize
2.	Click the Commands tab and drag the commands into the Menu

Note: To remove items from the pop-up Menu, just drag them off

To select the type of Menu animations
Use the 'Menu animations' drop-down list to select the type of Menu animations. The available options are None, Unfold, Slide and Fade.

To display shadows under open Menus
Tick the 'Menu shadows' box.

.topic 708

Show ScreenTips on Toolbars
Select the 'Show ScreenTips on toolbars' checkbox to display short help text when the mouse pointer is positioned over a 'Toolbar' button.

Show shortcut keys in ScreenTips
Select the 'Show shortcut keys in ScreenTips' checkbox to see the possible keyboard shortcut displayed in addition to the short help text.

Large Icons
Select the 'Large Icons' checkbox to display big Toolbar icons.

Look 2000
Select the 'Look 2000' checkbox to enable Windows-2000-style features in the User Interface. This option has only minimal Effects, mainly affecting the style of Toolbar handles.

Menus show recently used commands first
Select the 'Menus show recently used commands first' checkbox to show only basic and frequently used commands on Menus.

Show full Menus after a short delay
Select the 'Show full menus after a short delay' checkbox to show all commands on the Menu after you rest the mouse pointer over the open Menu for a brief period of time.

Reset my usage data
Click the 'Reset my usage data' button to clear the list of recently used commands saved by SWiSHmax.

.topic 709
Tools | Keyboard Map
Displays a map of the current keyboard shortcuts and a brief description of functions.

You can modify your keyboard shortcuts at the Keyboard tab on the Customize dialog box.

.topic 800

##screenshots needs to be redone after next beta as "color panel" is now called the "tint panel".

This Menu shows which of the current Panels are displayed. A Panel can be enabled or disabled via the checkbox.

Panel | Layout
Shows or hides the Layout Panel.

Panel | Timeline
Shows or hides the Timeline Panel.

Panel | Outline
Shows or hides the Outline Panel.

Panel | Movie
Shows or hides the Movie Panel.

Panel | Object
Shows or hides the Object Panel.

Panel | Actions
Shows or hides the Actions Panel.

Panel | Transform
Shows or hides the Transform Panel.

Panel | Tint
Shows or hides the Color Tint.

Panel | Content
Shows or hides the Content Panel.

Panel | Export
Shows or hides the Export Panel.

Panel | Reset to Defaults
Resets all panels to their default position.

.topic 900
  Help | SWiSH Help Topics
Opens the SWiSH Help file and lists help topics.

Help | SWiSH Tutorials
Opens the SWiSH Help file and shows a list of tutorials.

Help | Go to SWiSH web site
Launches the browser and goes to the SWiSH web site at http://www.swishzone.com.

Help | Go to SWiSH Support Forums
Launches the browser and goes to the SWiSH support forums at http://www.swishzone.com/support_forums.html.

Help | About Macromedia Flash
Launches the browser and goes to the Flash Player web site.

Help | About LAME MP3 Encoder
Displays information about the LAME MP3 encoder.

Help | Purchase SWiSH...
To purchase a copy of SWiSH.

Help | Check for Update
Launches the browser and goes to the SWiSH web site at http://www.swishzone.com to check if there is an updated build of SWiSHmax.

  Help | About SWiSH...
Displays application information, version number and copyright information.

.topic 315
  Reshape
Reshapes graphic Objects by clicking and dragging.

When using the reshape tool the Tool Options of Scale, Resize, Rotate/Skew and Perspective are available.

Note: When used on AutoShapes the Reshape tool activates the AutoShapes editing handles. See AutoShapes for more details

To Select an Object
Click on the Object. The vertices of the selected Object are indicated by white diamond anchors, and the control points by blue daimond anchors. Vertex anchors are always on the curve, whereas control-point anchors are usually off the curve. There are either zero, one or two control points associated with each edge, and these affect the curvature of the edge. The control points are shown joined to the adjacent vertices by a dotted line.

To move the whole Object
1.	Press and hold the left mouse button inside the Object, but not on any vertex or control-point anchor
2.	Drag the Object to the new position and release the mouse

To Reshape Objects by dragging an anchor
1.	Press and hold the left mouse button on a vertex or control-point anchor
2.	Drag the anchor to the new position and release the mouse

Note: To constrain the direction from the original position to the new position to multiples of 15°, press and hold the Shift key while dragging

To Reshape Objects by dragging an edge
1.	Press and hold the left mouse button on an edge
2.	Drag the edge to the new position and release the mouse

Note: To constrain the direction from the original position to the new position to multiples of 15°, press and hold Shift key while dragging

To delete or change the type of a vertex anchor
1.	Move mouse pointer to the vertex anchor
2.	Right-click and select the command from the pop-up Menu

Cusp: lets you adjust the adjacent control points independently. When the vertex is a cusp, the edges are still curved, but the corner is not smooth
Smooth: the adjacent control points are always in the same direction, but can be different distances from the vertex. The corner at the vertex is smooth
Symmetrical: the adjacent control points are always in the same direction and are both the same distance from the vertex
Sharpen: the edges on either side of the vertex are made straight, thereby removing the associated control points. This makes the corner sharp
Remove Vertex: removes the vertex anchor completely

To change the type of an edge, or insert a vertex
1.	Move mouse pointer to the edge
2.	Right click and select the command from the pop-up Menu

Linear: the edge is straight and does not have any control points
Quadratic: the edge is curved and has one control point
Cubic: the edge is curved and has two control points
Insert Vertex: adds a new vertex anchor at the mouse position

To Reshape an Object in Preview Frame mode
In 'Preview Frame' mode, if you reshape an object at a Keyframe, the change is not only applied to the current Frame. The shape of the Object in all other Frames will be changed as well.

To Slice a Shape Object
1. Move mouse pointer to the edge of the Object
2. Right click and select the Slice command from the pop-up Menu

3. Move the mouse pointer to another point at the edge of the Object
4. Right click and select the Slice command from the pop-up Menu

Your Shape should now be sliced as shown below.

Note: Cannot be used for AutoShapes

.topic 316
  Motion Path
Plots a Motion Path for the selected Object by clicking and dragging.

To draw a Motion Path for an Object
1.	Select the Object

2.	Click at the new position where the Object will be displayed for the next Keyframe. In this step, a new Move Effect will be added into the Object's Timeline automatically

3.	Repeat step 2 to add more Move Effects

Note:
To constrain the direction from the current position to the new position to multiples of 15°, press and hold the Shift key while clicking
 To draw a sharp corner path for the next Keyframe, press and hold the Control key while clicking
 Frame Preview mode is automically selected whenever you click on the 'Layout' window

Specifiying the rate of movement
The rate of movement used for the Motion Tool is specified in the Tool Options Panel. Increasing the pixels per second will decrease the number of Frames used while decreasing its value will increase the number of Frames used.

Note: Motion Path now creates Move Effects with absolute Transforms, so changing a Move Effect in the middle of a Motion Path won't affect subsequent Effects

.topic 317
  Fill Transform
Transforms an Object's gradient or image fill without transforming the Object.

When using the Fill Transform tool the Tool Options of Scale and Rotate/Skew are available. The handles shown depend upon the tool option selected.

To move the filled gradient or image
1.  Select the Fill Transform tool
2.  Select the Object you wish to transform

3.	Follow the same procedures mentioned in Select tool to move the filled gradient or image

To Scale the filled gradient or image
1.  Ensure the Fill Transform tool is selected
2.  Select the Object and the Scale tool option

3.	Follow the same procedures mentioned in Scale tool option to scale the filled gradient or image

To Rotate/Skew the filled gradient or image
1.	Ensure the Fill Transform tool is selected
2.	Select the object and the Roate/Skew tool option

3.	Follow the same procedures mentioned in Rotate/Skew tool option to rotate/skew the filled gradient or image

.topic 318
  Line
Draws a line.

To draw a Line
1.	Position the mouse pointer to where you want the line to begin
2.	Press and hold the left mouse button
3.	Drag the mouse pointer to where you want to end the line, and release the mouse

Note: To constrain the line direction to multiples of 15°, press and hold the Shift key while dragging

.topic 319
  Pencil
Draws a freehand line object.

To draw a freehand line
1.	Position the mouse pointer to where you want the line to begin
2.	Press and hold the left mouse button
3.	Drag the mouse pointer on the path you want the line to take
4.	Release the mouse button to end the drawing

Note: To draw a closed shape, release the mouse button at the starting point

.topic 320
  Bezier
Draws a set of connected Bezier curves or line segments.

To draw a set of connected Bezier curves
1.	Position the mouse pointer to where you want the curve to begin
2.	Press and hold the left mouse button to place the on-curve anchor
3.	Drag the mouse pointer in the tangent direction of the curve to be drawn
4.	Release the mouse button to place the off-curve anchors
5.	Repeat steps 1-4 to draw additional curves
6.	Double-click left mouse button to end the drawing

Note:
To constrain the tangent direction to multiples of 15°, press and hold the Shift key while dragging
To draw a closed shape, double-click the left mouse button at the starting point on completion of the drawing

To draw a set of connected line segments
1.	Press and release the left mouse button at the position you want the line segment to begin
2.	Continue pressing and releasing the left mouse button at the position you want to end the current line segment and begin the next line segment
3.	Double-click left mouse button to end the drawing

Note:
To constrain the direction of the line segment to multiples of 15°, press and hold the Shift key while moving the mouse pointer
To draw a polygon, double-click the left mouse button at the starting point on completion of the drawing

.topic 322
  Ellipse
Draws an ellipse or circle.

To draw an Ellipse
1.	Press and hold the left mouse button where you wish to position the ellipse
2.	Drag the mouse pointer diagonally to adjusting the size of the ellipse
3.	Release the mouse button to end the drawing

Note: To draw a circle, press and hold the Shift key while drawing with the Ellipse tool

.topic 321
  Rectangle
Draws a rectangle or square.

To draw a Rectangle
1.	Press and hold the left mouse button down (or click and release) at the position you wish to draw a corner of the rectangle
2.	Drag the pointer diagonally to adjust the size of the rectangle
3.	Release the mouse button (or click and release) to end the drawing

Note: To draw a square, press and hold the Shift key while dragging

To draw a Rectangle with rounded corners
1.	Press and release the left mouse button at the position you wish to draw a corner of the rectangle
2.	Move the mouse pointer diagonally adjust the size of the rectangle
3.	Press and hold the left mouse button to finish positioning the other corner of the rectangle
4.	Drag the mouse pointer back into the rectangle to adjust the rounded edge of the corners
5.	Release the mouse button to end the drawing

Note:
To draw a rounded square, press and hold the Shift key while drawing with the Rectangle tool
To constrain the rounded corners of squares to circles, press and hold the Shift key while adjusting the rounded edge of the corners
To constrain the rounded corners of rectangles to ellipses, press and hold the Shift key while adjusting the rounded edge of the corners

.topic 324
  Pan
Pans around the workspace in the Layout Panel by clicking and dragging.

To Pan the 'Layout' Panel
1.	Press and hold the left mouse button on the workspace
2.	Drag the mouse to pan the 'Layout' window
3.	Release the mouse button to finish panning

.topic 323
  Zoom
Zooms in/out of the workspace in the Layout Panel using the mouse.

To Zoom in/out
Click the left mouse button at the position you want to zoom in on.

Note: To zoom out, press and hold the Shift key

To Zoom to an area
1.	Press and hold the left mouse button at one corner of the area
2.	Drag the mouse pointer diagonally to position the other corner of the area
3.	Release the mouse button to zoom in

.topic 325
The View Options are fixed to the bottom-left corner of the Layout Panel. The view options allow you to quickly adjust the scale of the workspace and modify grid settings.

  Zoom Menu
Displays a pop-up Menu of common zoom factors (25%, 33%, 50%, 66%, 75%, 100%, 150%, 200%, 300%, 400%, 500%)

  Fit Scene In Window
Fits the entire Scene (stage area) into the 'Layout' window.

  View at 100%
Views the Movie at its actual size.

  Zoom In
Zooms in on the stage by a factor of 1.5.

  Zoom Out
Zooms out on the stage by a factor of 2/3.

  Show Grid
Shows or hides the grid lines in the 'Layout' window.

  Snap to Grid
Snaps to the nearest grid line or intersection in the 'Layout' window.

.topic 999
This chapter gives worked examples of how you can use SWiSHmax.

Creating Your First SWiSH Movie takes you through the basic steps of creating a simple Movie. It also covers sound, interactivity, preloaders and preparing your Movie for the web
Using Actions to Control your Movie is a short example of how to use Events and Actions. The Creating Your First SWiSH Movie tutorial also has topics covering this area
How to make an Animated Button explains how to make a button that animates when you move the mouse over the button
Scripting Tutorials are a series of tutorials designed to help you become familiar with the scripting language. You should also refer to Scripting for an introduction to basic scripting concepts
Using SWiSH with other programs shows you how you can use your .swf Movie with other applications, namely Flash, Dreamweaver, FrontPage and Powerpoint


Demonstration Link

 Demonstration Link.

Press Back to return to previous page.


Frame Preview Mode Definition

 'Preview Frame' mode previews how the Movie will look at the current Frame. If the current Frame is a 'Keyframe' at the end of an Effect, you can use the resizing handles to visually position/scale/rotate the object at that Frame.


Kerning

 To adjust the space between characters in typeset text.


Leading

 Leading is the vertical distance between lines in a Text Object.


Mask Definition

 The outline of an object becomes the window through which other objects are viewed. Sprites can be viewed through a mask which is defined by the bottom-most object.

See the Sprite Panel for more information.


Orientation

 The orientation of an object is the direction it faces.


SWF Definition

 SWF files are Shockwave Flash files. SWF is a file format used by Macromedia to deliver graphics, animation and sound over the Internet.

See SWF Files for more information


SWI Definition

 SWI files are SWiSH working files. These files need to be exported to SWF format for web display.


The Reference Position

 This is the default position of an object. A slide-in Effect will slide to this position. A slide-out Effect will slide from this position. Otherwise this is the initial position of the object.


 The Timeline shows the Effects that are applied to various objects within a Scene or Sprite. It is used to view the timing of various Effects within a Scene or Sprite. Sprites have Timelines independent of the Scene Timeline. The time interval is based on a single Frame. The first Frame is shown on the left, subsequent Frames appear to the right.

See Timeline and Frames and Timeline Panel for additional information.


View Vector

 View Vector is the direction the view point or camera is pointing relative to a 3D world. Also known as the Look-At Vector.


Zoom Factor

 Zoom Factor is directly proportional to the magnification of the Scene being viewed.