Archive for the ‘scripting’ Category

Code: Fade to Volume Level

Monday, July 26th, 2010

If you want to gradually fade out the audio in your .SWF file, it can be done using Actionscript.  It isn’t always necessary to provide an actual volume control bar, and in some cases you might simply want to fade the audio out during some other event (such as fading out the background audio while a video plays).  The code snippet below will help you do just that.

The source .SWI file for the example above can be downloaded, here: fade-to-volume_v1

You will need SWiSH Max3 (build 2009.11.30 or higher) in order to open/edit the sample file.

Note:  The code can also be used in SWiSH Max2 SWI files (you just can’t open the sample file with it).

(more…)

Code: Fade to Alpha Level

Monday, July 26th, 2010

If you are looking for a convenient way to fade the alpha level (transparency) of an object through Actionscript, then this simple code snippet may be what you need.  Without relying on any overhead in the timeline or increasing the file size, this function allows you to animate the alpha level of any object over a specified period of time.

The source .SWI file for the example above can be downloaded, here: fade-to-alpha_v1

You will need SWiSH Max3 (build 2009.11.30 or higher) in order to open/edit the sample file.

Note:  The code can also be used in SWiSH Max2 SWI files (you just can’t open the sample file with it).

(more…)

Tutorial: Disable All Buttons

Monday, July 12th, 2010

In many projects, you might have a need to disable a button or two.  In some projects, you might need to disable all buttons at once.  This process can be tedious if using the most common methods, but we’ll show you how to do it quickly and easily in this short tutorial. One practical example of this might be in something like an image “lightbox” – where you have an image opening on top of your movie and don’t want the buttons beneath it to be clickable.

This first example shows a standard image gallery.  Click on any of the thumbnails to open the larger image.  You can move your mouse around the movie and see that the cursor changes as you mouseover the buttons.  These are all still active and clickable while the image is open. (more…)

New Component: Numeric Keypad

Tuesday, May 4th, 2010

A numeric keypad can be a useful addition to your Flash animation or webpage. Apart from the obvious calculator / numerical entry applications, it can also be used as a more secure way of entering PINs (Personal Identification Numbers). It is also a useful alternative to Captcha devices (ie. display a random number and ask the user to enter it via the keypad). Although a numeric keypad is a straight forward thing to make, its construction can be tedious because of the number of buttons that need to be constructed and aligned.

 

The new NumericKeyPad component makes the task much simpler as it allows the user to construct various keypads in a variety of layouts.

Read on for more information… (more…)

Tutorial: Video Controller

Monday, February 22nd, 2010

SWiSH Max3 comes with a number of ready-made video controller components in the Components | Video Players section. However, many users want more control over the final look and feel of their controller. In this tutorial, I’ll demonstrate how to make a simple controller.

Once the basic concepts are understood, you can expand the design to achieve exactly what you require. As miniMax3 cannot import videos, this tutorial is intended only for Max3 users. Max2 users may also be able to follow the process although the sample files were authored in Max3.

(more…)

Tutorial: BMI calculator

Wednesday, February 3rd, 2010

You often see sites presenting simple calculators that allow you to enter a value and see a result. This could be conversion tables (eg. lbs to kg), quantity discounts, postage rates etc. In this tutorial I demonstrate how to create a simple BMI calculator. These principles will help you make your own simple calculator.  BMI stands for body mass index and is used used to estimate a healthy body weight based on a person’s height.

(more…)