Effector Sets 1 & 2 for AlphaMania

User Manual

Part I: Overview

What is an Effector Set and why do you want one? The Effector Sets are Xtras from Media Lab that work in conjunction with AlphaMania 2 (or later) to give Director users incredible power and real-time control over special effects. This might be as simple as quickly rotating a button 45 degrees using only one castmember or as complex as making a graphic ripple like water.

Best of all, the effects in each Effector Set have been thoroughly tailored to the needs of Director users designing interactive content. Between AlphaMania 2’s advanced drawing methods and the variety of special effects available, authors have never had as much power at their fingertips.

Effector Sets Are Easy To Use Included with each Effector Set Xtra is a point-and-click user interface called the SetFX movie that allows even non- programmers powerful access to the various features of the included effects. Director 6 drag-and-drop behaviors are also ideal ways for novices to get complex interactive functionality from effects. For this reason, many behaviors are included with the products.

About This Manual Part 2 of this manual contains detailed information about the nine effects included with Effector Set I, and Part 3 covers the five effects in Effector Set II. Each effect is described in two parts. A “Basics” part describes in general how the effect works. An “Advanced” part lists in detail every possible argument to this effect and includes a table you can use to determine default values for omitted arguments, and also which arguments are required for each mode.

In part 4 and beyond you will find reprinted sections from the AlphaMania 2 User Guide that explain the features of AlphaMania that are important to understand in order to take full advantage of AlphaMania 2 with Effects. (You’ll also find the license agreement and Media Lab contact info.) If you are not familiar by now with AlphaMania 2 concepts like “Drawing Method” and “Animation Mode” or the basics of adding effects to castmembers and sprites you’ll need to go back and read the AlphaMania 2 manual or read the final sections of this manual.

Installing an Effector Set Many versions of the Effector Sets come with installers that will automatically place the necessary files in the necessary places. If you would like to install manually, you will need to place the following in your Director “Xtras” folder:

AlphaMania 2.x32 The Xtra

Register Effector Set _.dxr Allows you to unlock the Xtra once you have purchased the appropriate unlock code.

SetFX.dir Included with AlphaMania 2. Allows editing of effects without lingo.

FX Set 1.fxm Required to use SetFX movie with Effector Set I.

FX Set 2.fxm Required to use the SetFX movie with Effector Set II.

Registering an Effector Set Choose “Register Effector Set I” or “Register Effector Set II” from the Xtras menu, as appropriate. Each of the effector sets must be registered seperately. When you have finished reading the license agreement click “I Agree”. You will then be able to enter your unlock code and register the product. Until you register the product, AlphaMania 2 castmembers with effects from an Effector Set applied will have a box drawn around them at all times.

System Requirements Use of this product requires Director 5 or Director 6 and at least 8-bit color. MacOS: System 7 or later. (68K or PowerPC) OR Windows: 95, 98, NT3.51, NT4, or later.

Packaging an Effector Set with a Projector An Effector Set Xtra must be distributed with any of your projectors that contain AlphaMania castmembers that use effects in that Xtra. An Effector Set Xtra & AlphaMania 2 must reside in a folder named “Xtras” that appears in the same folder as your projector.

The best and most reliable way to do this is the following:
1. (Director 6 and later) When creating a projector, turn OFF the flag for ‘Check Movies for Xtras’ that appears in the ‘Options’ dialog when selecting files.
2. Once the projector is created, see that it is accompanied by a directory named ‘Xtras’ (note the spelling with an ‘s’). And make sure that directory contains the AlphaMania 2 Xtra and Effector Set Xtra(s).

The second best way of doing this (Director 6 and later only):
1. When creating a projector, turn ON the flag for ‘Check Movies for Xtras’ that appears in the ‘Options’ dialog when selecting files. This should automatically bundle the AlphaMania Xtra with your projector.
2. From the Create Projector dialog, select the ‘Add’ button, and go choose the Effector Set Xtra(s) that your movie will need.

When using the second method the Projector will bundle the Xtras into itself and when it runs it will automatically unpack the Xtras, run, and when quitting it deletes them. However, this has a few problems associated with it such as Director 6’s notorious Error -35 bug.

Part 2: Guide to Effector Set I’s Effects

Effector Set I contains many effects that are as useful as any tool Director developers have ever had access to. These include rotate, magnify, RGB, and HSB. At the same time we didn’t want this pack to be too boring so we threw in some peacock effects that are useful simply because they’re very cool like seurat, and swirl.

We’ve divided each effect into a basic information section and a more complete reference section which includes a table of all possible arguments to an effect along with their defaults. We recommend browsing the basics to familiarize yourself with what the effects can do, playing with the effects, and then using the reference sections when you want to look up a specific technique or argument name.

We’ll start with everyone’s favorite effect, rotate:

Rotate Basics

Effect Type: Complex

With the rotate effect you can rotate your AlphaMania sprites freely! The rotate effect is fast, powerful, and very flexible. Sprites can be rotated to an angle, by an angle, rotate relative to some other point on the stage, or just set to rotate infinitely round and round. The rotate effect can even flip the sprite as it rotates. You can give rotation degree or radian arguments, and it even contains special functions to help you figure out things like angular velocity.

Uses

Every Director user has wanted live rotation for a long time, so we think you’ll be putting this effect to good use. But in addition there are a number of uses that people don’t tend to think of. With the RelToPoint animation mode (see below) things like needle-meters, clocks, and guns that follow targets become very easy. In fact, we’ve provided a bunch of behaviors to accommodate you. We’ve included a simple Asteroids game with four asteroids spinning in different directions at different speeds and a user- controllable rotating spaceship. This movie uses only two AlphaMania castmembers and two behaviors!

Techniques

Shadows and Highlights on Rotating Objects

If you have a dial with a cool shadow and a nice highlight you’ll probably be a tad disappointed when you attempt to rotate said dial only to have the shadow and highlight rotate too. One solution is to tell your audience that the dial not only controls whatever it controls but also controls the angle of the sun, relative to the dial. Another solution is to NOT rotate the highlights and shadows. To do this, make a separate AlphaMania castmember that is just the highlights and shadows, and put it on top of your rotating sprite. Remember, AlphaMania castmembers are made do semi-transparent effects like shadows and highlights. If you need the shadows to compress and expand a little as the object rotates, use the scale effect on them. If the object you are rotating is unusually shaped, then this technique may not work for you.

The third solution to this problem is to use Effector Set II, which contains dynamic shadow and highlight effects. Simply apply these effects after the rotate effect, and then it will all work seamlessly.

Special Considerations

The Sprite Rectangle

In Director, no sprite can draw outside of its rectangle. This can be a problem when rotating a sprite because any shape that is not a circle will change the dimensions of the rectangle needed to contain it as it rotates to different angles. When the rotate effect is added to a castmember, the default sprite rectangle will automatically be increased so that the sprite will not be cropped when it rotates. But if the effect is added at the sprite level (like a Behavior), then it may crop as it rotates. The solution is simple: make the sprite rectangle bigger!

Using Rotate with Scale in Follow Mode

If you are using rotate on a sprite that also has the scale effect in follow mode, then you will see the sprite rectangle cropping even if rotate is applied to the castmember. Adjust the percentage of the scale effect to approximately 70%. The exact percentage value needed to avoid the cropping is dependent on the dimensions of the sprite and how much it is rotating, so you may need to tweak and experiment.

Confusion Over Relative To Point

In the RelToPoint animation mode (see below), the sprite turns to face a point somewhere on the stage. But very often user’s want an effect more like clock hands, where not only does the hand always face the center of the clock, but also revolves around that point. There are, in fact, two motions going on, the clock hand is rotating (upon itself) to change it facing/attitude, and it is also actually MOVING around the center point. This second motion, which we call revolution, requires that the sprite be moved on the stage.

Custom Animation Modes

The rotate effect has two custom animation modes: infinite and relativeToPoint.

Infinite

In rotate’s implementation of the infinite animation mode, sprites are made to rotate infinitely around and around. The only required parameter is the number of frames in which to complete a revolution, if this number is positive then it rotates clockwise, if negative then counterclockwise. The SetFX movie can set up these settings, or the ‘Rotate Forever’ behavior can be used.

RelativeToPoint

In this mode, rather than rotating to or by angles, the sprite will rotate to face some point on the stage. This mode is VERY useful for setting up clocks, pointers, meters, and all sorts of ‘relative’ rotation effects. It’s all automatic, you need to only provide a location to face, and optionally an offset angle (how much to ‘face away’). That’s it. There are two behaviors, ‘Face Mouse’ and ‘Face Sprite’ ready to implement this mode in an easy way.

Behaviors

A number of behaviors that implement the rotate effect for you are included in the Effector Set I behavior library. If you use them, don’t forget to enlarge the sprite rectangle of the sprite!

Rotate

This behavior let’s you simply set an angle, and it will rotate the sprite to that angle in static mode. You can also specify the interpolation.

Rotate Forever

This behavior will set up the infinite mode for you. With it you can set the speed, direction, and interpolation of the rotation.

RotateOnClick

With this behavior the sprite will rotate when it’s clicked and continue to rotate while the mouse is down. When the mouse is up, it stops. If clicked again, it resumes rotation. It let’s you set the speed of the rotation, it’s direction, and the interpolation.

FaceMouse

This behavior is a great one that makes the sprite constantly face the mouse. With it you can set the offset angle (how much it ‘faces away’).

FaceSprite

This behavior is another winner that makes the sprite constantly face another sprite. You must specify a sprite to face, and can optionally set the offset angle.

DialPush Rotate a dial with the mouse!

Custom Functions

Rotate has a plethora of custom functions you can call and manipulate. Here is a complete listing:

UseRadians

UseRadians(sprite x, #rotate, true or false)

Calling this function will make the sprite treat all subsequent custom function calls as if their degree arguments are in radians rather than degrees. Call this function with a ‘false’ argument to reset the sprite to regular degree usage.

Flip

Flip(sprite x, #rotate)

Flip(sprite x, #rotate, flipFlag)

If this function is called without the flipFlag argument, then the sprite will have it’s flip state toggled. When the flipFlag argument is used, then the sprite will have its flip state set to that argument.

GetAngle

GetAngle(sprite x, #rotate)

This argument will return the current angle of the sprite.

GetVector

GetVector(sprite x, #rotate, distance)

GetVector(sprite x, #rotate, distance, degrees)

This function converts a distance and an angle into the sub vectors X and Y. This function returns a point with the X and Y vectors in the x and y positions. If no angle is provided, the current angle of the sprite is used. If you are programming a rotating spaceship and want it to travel 5 pixels at its current angle, just call this function and then add the result to your ships current location. No trigonometry required!

GetRotatedRect

GetRotatedRect(sprite x, #rotate)

GetRotatedRect(sprite x, #rotate, degrees)

GetRotatedRect(sprite x, #rotate, degrees, rect)

This function takes a rect and an angle and calculates the new containing rect. If no angle is provided it uses the sprites current angle, and if no rect is provided it uses the rect of the castmember at the sprite’s location.

40 degrees

Rectangle and angle arguments.

Result is the containing rect.

IsPointInRotatedRect

IsPointInRotatedRect(sprite x, #rotate, point)

IsPointInRotatedRect(sprite x, #rotate, point, degrees)

IsPointInRotatedRect(sprite x, #rotate, point, degrees, rect)

This function returns true or false if a point is in the rotated rectangle of the sprite. The current rectangle and angle of the sprite are used as defaults, but if desired the user can pass in custom arguments.

RelToPoint

RelToPoint(sprite x, #rotate, xLocation, yLocation)

RelToPoint(sprite x, #rotate, xLocation, yLocation, offsetAngle)

RelToPoint(sprite x, #rotate, xLocation, yLocation, offsetAngle, flipFlag) RelToPoint(sprite x, #rotate, xLocation, yLocation, offsetAngle, flipFlag, interpolation) This is the mode accessor function for the #relativeToPoint mode. It causes this mode to immediately become active in sprite, and the parameters to take place. This is provided as an option to the more traditional calling of the rotate effect (ie. Rotate(sprite x, [animMode:#relToPoint, …]), but provides no unique functionality.

InterpolateNow

InterpolateNow( sprite x, #rotate)

This function causes the sprite to immediately redraw interpolated, but does not change the flag for the sprites overall interpolation setting.

SetInterpolation SetInterpolation(sprite x, #rotate, interpolation)

Rotate Reference

Rotate Effect Argument Table

Effect Symbol: #rotate

Properties Type Value Default Exclusive

#animMode symbol #static, #range,

#infinite,

#pendulum,

#relativeToPoint #static

#numFrames integer 1+ - required in pendulum and range #framesPerRevolution integer 0 not allowed, negative means
rotate counter clockwise #radians integer positive values are clockwise

- infinite mode only

#interpolation integer 0, 1, 2 0 #degrees integer positive values are clockwise 0 (A)

0 (A)

#startDegrees integer current valid in pendulum, infinite, and range only
#startRadians integer current valid in pendulum, infinite, and range only
#endDegrees integer #degrees
#endRadians integer #radians
deltaDegrees integer positive values are clockwise
deltaRadians integer positive values are clockwise
#flip integer true or false false
#relativeTo point stage coordinates (0,0) on stage
#relativeToX integer
#relativeToY integer
#offsetAngle integer in degrees 0 valid in RelToPoint mode only #offsetAngleRad integer in radians 0 valid in RelToPoint mode only #easeIn integer frames 0 valid in pendulum and range only #easeOut integer frames 0 valid in pendulum and range only
(A) parameters cannot be used with (B) parameters.

0 (B) valid in static, pendulum, and range only 0 (B) valid in static, pendulum, and range only

Rotate Parameters by Mode:

The following parameters are valid in these modes:

All Modes: interpolation flip

Static: degrees radians deltaDegrees deltaRadians

To set the rotation to an angle use the degrees or radians parameter. But to rotate BY an angle use the deltaDegrees or deltaRadians parameters.

Range: numFrames degrees radians endDegrees endRadians deltaDegrees deltaRadians startDegrees startRadians easeIn easeOut

In #range mode the sprite will rotate to the endPosition from it’s current (or start) position. If the endPosition is a number greater than its starting position then the sprite will rotate clockwise. If it is less than the starting position then it will rotate counter-clockwise. No abbreviating occurs, so if the sprite is at 0 degrees and it is given an endPosition of 720 degrees then it will rotate three times clockwise. Its new starting position will be 720 degrees for the next call to range.

Pendulum numFrames degrees radians endDegrees endRadians deltaDegrees deltaRadians startDegrees startRadians easeIn easeOut

13 Effector Set I & II - User’s Manual

In #pendulum mode the sprite will rotate back and forth between a start and end point.

Infinite framesPerRevolution startDegrees startRadians
easeIn

In #infinite mode the sprite will simply rotate forever. A positive value for ‘framesPerRevolution’ will cause it to rotate clockwise, a negative value will cause it to rotate ‘counter-clockwise’.

RelToPoint relativeTo relativeToX relativeToY offsetAngle offsetAngleRad

This is a custom mode for the rotate effect only. In this mode, the sprite will always ‘face’ the point at relativeToPoint, no matter where the sprite is on-screen. If desired, an offsetAngle argument can be provided, in which case it will ‘face away’ by that parameter.

Custom Functions:

RelToPoint

RelToPoint(sprite x, < position or #rotate>, xLocation, yLocation) RelToPoint(sprite x, < position or #rotate >, xLocation, yLocation, offsetAngle) RelToPoint(sprite x, < position or #rotate >, xLocation, yLocation, offsetAngle, flipFlag) RelToPoint(sprite x, < position or #rotate >, xLocation, yLocation, offsetAngle, flipFlag, interpolation) This is the mode accessor function for the #relativeToPoint mode.

InterpolateNow

InterpolateNow( sprite x, < position or #rotate >)

This function causes the sprite to immediately redraw interpolated, but does not change the flag for the sprites overall interpolation setting.

SetInterpolation SetInterpolation(sprite x, < position or #rotate >, interpolation)

UseRadians

UseRadians(sprite x, <position or #rotate >, true / false) Calling this function will make the sprite treat all subsequent function calls as if their degree arguments are in radians rather than degrees. Call this function with a ‘false’ argument to reset the sprite to regular degree usage.

Flip Flip(sprite x, <position or #rotate >)

14 Effector Set I & II - User’s Manual

Flip(sprite x, <position or #rotate >, flipFlag)

If this function is called without the flipFlag argument, then the sprite will have it’s flip state toggled. When the flipFlag argument is used, then the sprite will have its flip state set.

GetAngle

GetAngle(sprite x, <position or #rotate >)

This argument will return the current angle of the sprite.

GetVector

GetVector(sprite x, <position or #rotate >, distance)

GetVector(sprite x, <position or #rotate >, distance, degrees) This function converts a distance and an angle into the sub vectors X and Y. This function returns a point with the X and Y vectors in the x and y positions. If no angle is provided, the current angle of the sprite is used.

GetRotatedRect

GetRotatedRect(sprite x, <position or #rotate >)

GetRotatedRect(sprite x, <position or #rotate >, degrees) GetRotatedRect(sprite x, <position or #rotate >, degrees, rect) This function takes a rect and an angle and calculates the new containing rect. If no angle is provided it uses the sprites current angle, and if no rect is provided it uses the rect of the castmember at the sprite’s location.

40 degrees

Rectangle and angle arguments.

Result is the containing rect.

IsPointInRotatedRect

IsPointInRotatedRect(sprite x, <position or #rotate >, point) IsPointInRotatedRect(sprite x, <position or #rotate >, point, degrees) IsPointInRotatedRect(sprite x, <position or #rotate >, point, degrees, rect) This function returns true or false if a point is in the rotated rectangle of the sprite. The current rectangle and angle of the sprite are used as defaults, but if desired the user can pass in custom arguments.

Arguments

framesPerRevolution

Used in #infinite mode, this argument simply tells the effect how long to take to complete a revolution. The smaller the argument, the faster the sprite rotates. Normally, the sprite will rotate in the clockwise direction, but by making this argument negative you can make the sprite rotate counter-clockwise. Any non-zero number is valid. This argument is redundant with the ‘numFrames’ parameter. If you’d rather you can use the ‘numFrames’ parameter in the infinite animation mode.

degrees

This is the destination to which you make the sprite rotate. Positive values progress clockwise (0 degrees being at ‘twelve o’clock’, 90 degrees is at 3 o’clock, etc.), and negative values progress counterclockwise (-90 degrees at 9 o’clock, -270 degrees at 3 o’clock, etc.).

radians

Instead of degrees, you can use radians as an argument to rotate. This is especially convenient if you are using Director’s trigonometric functions which work in radians.

deltaDegrees deltaRadians

Rather than supplying the ‘degrees’ argument above, this argument can be provided in #static, #pendulum, and #range modes. It simply tells the sprite to rotate BY ‘deltaDegrees’, rather than TO ‘degrees’.

flip

When this flag is true then the sprite is ‘flipped’ left-right before any rotation occurs. Valid values are true (1) or false (0). To flip a sprite around a particular axis, turn the flip flag on and rotate the sprite 2[.phi] where [.phi] is the angle of the axis.

interpolation

This arguments sets the interpolation setting for this effect. With interpolation on the rotated sprite will be smoother and nicer looking, but draw slower. With interpolation off, the sprite will draw faster, but be rougher. There is a get-best-of-both-worlds interpolation setting that will make the sprite only interpolate when paused. A pause state occurs whenever the sprite is in #static mode, when in #range mode after it has finished the animation, or when the effect has been paused with a call to PauseEffect or PauseAllEffects. Note, the normal lingo command ‘pause’ has no effect on the pause state of this effect.

Settings:

Interpolation Off: 0

Interpolation On: 1

Interpolate When

Paused 2

relativeTo relativeToX, relativeToY

These two arguments set the point which the sprite will rotate to ‘face’ when in #relativeToPoint mode. These coordinates are stage relative.

16 Effector Set I & II - User’s Manual

offsetAngle when in #relativeToPoint mode the sprite constantly ‘faces’ a defined point. If desired the sprite can be made to constantly face away from that point by an angle defined by this argument.

Swirl Basics

Effect Type: Complex What can words say that the above picture doesn’t illustrate? With swirl you can swirl your sprites. Swirl is very straightforward, and very cool. The amount of swirl is specified by the degrees or radians to twist around the center point.

Recommendations

The swirl effect always performs a circular swirl, never an elliptical one. For this reason, you will probably have the most satisfying results when using swirl with objects that aren’t too dramatically oblong. Swirl is particularly impressing in apply method, swirling everything it’s dragged over. We recommend using swirl values that are lower than 180 degrees. More than that results in a whole lot of swirl.

Behaviors

Swirl has a few behaviors prepared for you.

Swirl

This behavior let’s you set up a simple static mode swirl. You can set the degrees of the swirl and turn the interpolation on or off.

Rollover Swirl

This behavior swirls a sprite, and then, if the mouse is over, it dramatically unswirls. Simply set the initial swirl, and how fast you want the sprite to unfold.

Custom Functions

UseRadians

UseRadians(sprite x, #swirl, true / false)

Calling this function will make the sprite treat all subsequent function calls as if their degree arguments are in radians rather than degrees. Call this function with a ‘false’ argument to reset the sprite to regular degree usage.

GetAngle

GetAngle(sprite x, #swirl)

This argument will return the current angle of the sprite swirling.

InterpolateNow

InterpolateNow( sprite x, #swirl)

This function causes the sprite to immediately redraw interpolated, but does not change the flag for the sprites overall interpolation setting.

SetInterpolation

SetInterpolation(sprite x, #swirl, interpolation)

Swirl Reference

Effect Symbol: #swirl

Properties Type Value Default Exclusive

#animMode symbol #static, #range,

#infinite,

#pendulum #static

#numFrames integer 1+ - required in pendulum, infinite, and range #interpolation integer 0, 1, 2 1
#degrees integer 0
#radians integer 0
#startDegrees integer current
#startRadians integer current
#endDegrees integer #degrees
#endRadians integer #radians
#deltaDegrees integer 0
#deltaRadians integer 0
#easeIn integer frames 0 valid in pendulum, infinite and range only
#easeOut integer frames 0 valid in pendulum, infinite and range only

Custom Functions

GetAngle

GetAngle(sprite x, <position or #swirl>)

This argument will return the current angle of the sprite.

InterpolateNow

InterpolateNow( sprite x, < position or #swirl >)

This function causes the sprite to immediately redraw interpolated, but does not change the flag for the sprites overall interpolation setting.

SetInterpolation

SetInterpolation(sprite x, < position or #swirl >, interpolation)

UseRadians

UseRadians(sprite x, <position or #swirl >, true / false) Calling this function will make the sprite treat all subsequent function calls as if their degree arguments are in radians rather than degrees. Call this function with a ‘false’ argument to reset the sprite to regular degree usage.

Arguments

degrees

The amount of swirl is specified by the degrees to twist around the center point. Positive values progress clockwise (0 degrees being at ‘twelve o’clock’, 90 degrees is at 3 o’clock, etc.), and negative values progress counter-clockwise (-90 degrees at 9 o’clock, -270 degrees at 3 o’clock, etc.).

radians

Instead of degrees, you can use radians. This is especially convenient if you are using Director’s trigonometric functions which work in radians.

deltaDegrees deltaRadians

Rather than swirling TO an angle, you can swirl BY an angle using the deltaDegrees or deltaRadians parameters.

interpolation

This arguments sets the interpolation setting for this effect. With interpolation on the scaled sprite will be smoother and nicer looking, but draw slower. With interpolation off, the sprite will draw faster, but be rougher. There is a get-best-of-both-worlds interpolation setting that will make the sprite only interpolate when paused. A pause state occurs whenever the sprite is in #static or #follow modes, when in #range mode after it has finished the animation, or when the effect has been paused with a call to PauseEffect or PauseAllEffects. Note, the normal lingo command ‘pause’ has no effect on the pause state of this effect.

Settings:

Interpolation Off: 0

Interpolation On: 1

Interpolate When

Paused 2

HSB Basics

Effect Type: Simple

HSB stands for Hue, Saturation, and Brightness. You may be familiar with this as an alternate way to describe a color for the computer. The HSB effect lets you adjust the hue, saturation, and/or brightness levels of every pixel of your AlphaMania sprite or member, thus ‘colorizing’ the sprite. Not only can you adjust and shift these values, you can force them to be a certain value. This effect is great for creating animated duotone effects, grayscale to color fade ins, and can even be used to cycle colors in any color depth. This is one of the most powerful effects in Effector Set I.

When using this effect, you will mostly be adjusting hue, saturation, and brightness values. Hue is measured in degrees. 0 degrees is red, 120 degrees is green, and 240 degrees is blue. Of course, many of the manipulations you will perform with this effect will be ‘relative’ to the pixel’s original hue, so a value may not mean an absolute color (though it can if you use the ‘forceHue’ parameter). Saturation and Brightness are both measured on a scale of 0 - 255.

Uses

HSB has a long string of potential uses, especially when used in tandem with other effects. But a short list of immediate uses are to

1. eliminate extra castmembers when they need to differ only in their color. Just use one castmember to spawn many sprites each with unique coloring achieved by HSB.

2. colored lights that illuminate other objects

3. color cycling (in any color depth). While this isn’t exactly traditional 8 bit color cycling, it’s still fast and since it works in all color depths, much more useful.

4. duotone or grayscale imagery from full color originals - fade in between. Don’t forget by using the HSB effect and AlphaMania castmembers with the apply or reveal draw methods, your artwork can all be regular bitmap castmembers, and yet still receive the benefits of these effects.

5. colorize objects. Cars, clothes, hair, even skin tones can all be adjusted subtly or sensationally.

Special Considerations

Absolute Force vs. Relative Shift adjustments

The HSB effect can use the ‘forceHue’ parameter to set the hue values for all of the effected pixels to the same value, or it can use the ‘hueShift’ parameter to shift the hue values for all the pixels by the same amount. HSB is capable of absolute forcing or relative shifting any component of an image, and can mix different adjustment types at the same time, and can animate any of these.

Animating (Fading) Between Colors

When fading between two colors using the HSB effect, you may notice that the fade may pass through intermediate colors. This is a side effect of the HSB model. If you want direct fading, use the RGB effect.

Custom Animation Modes:

Infinite

HSB provides a custom implementation of the infinite animation mode. In this mode, the hue will cycle through a complete revolution (360 degrees) in the number of frames provided. The other vectors (saturation and brightness) will advance to their endpoint, and then re-start, looping this way continuously. By just putting the infinite mode on a sprite with only the ‘numFrames’ parameter you get instant color cycling.

Using The Set FX Movie with HSB

Because of the sprite limitation imposed by Director 5, the current incarnation of the Set FX movie only supports the ‘relative’ adjustments. It also does not have support for the infinite mode. But both of these are accessible through behaviors. A future version of the Set FX movie (for Director 6) will incorporate the other controls.

Behaviors

HSB Shifter

This behavior lets you set the relative shifting of the three components.

Duotone

This behavior lets you set the forcing of the hue to create duotone effects.

Cycle Hue

This behavior gives you instant color cycling. Simply tell it how fast you want the colors to cycle. This works in ANY color depth. This behavior will cycle using relative shift adjusting, but if you apply the Duotone behavior to the sprite first, it will cycle using forced absolute adjustments.

Color Fader

This behavior lets you fade a sprite in and out from grayscale over time.

Rollover Color Fader

This behavior lets you fade a sprite in or out as the mouse comes over the sprite. You can choose to start gray and fade to color as the mouse approaches, or start color and fade to gray. And you can control the speed.

Rollover Hue Shifter

This behavior lets you shift the hue of a sprite as the mouse passes over it. You can choose the mouse over and mouse off shift amount, and the speed of the fade.

HSB Reference

Effect Symbol: #hsb

Properties Type Value Default Exclusive

#animMode symbo l

#static, #range,

#infinite,

#pendulum integer 1+ - required in infinite, range, and pendulum
#hueShift integer measured in degrees, 0 is no change #satShift integer -255 to 255, 0 is no change #brightShift integer -255 to 255, 0 is no change #startHue integer measured in degrees, 0 is no change #startSat integer -255 to 255, 0 is no change #startBright integer -255 to 255, 0 is no change #endHue integer measured in degrees, 0 is no change #endSat integer -255 to 255, 0 is no change #endBright integer -255 to 255, 0 is no change

#static

#numFrame s

0

0

0

current valid in pendulum and range only

current invalid in static mode

current invalid in static mode

#hueShift

#satShift

#brightShift

#easeIn integer frames 0 valid in pendulum and range only #easeOut integer frames 0 valid in pendulum and range only #forceHue integer 0 to 360, - can’t be used with hueShift #forceSat integer 0 to 255 - can’t be used with satShift #forceBright integer 0 to 255 - can’t be used with brightShift

Hue, Saturation, and Brightness

Every pixel can have it’s color described by three components, hue, saturation, and brightness. Unlike RGB, these components do not all fall on the same scale. Hue is measured in degrees. 0 degrees is red, 120 degrees is green, and 240 degrees is blue, and 360 degrees is red again. Hue can go round and round with no interruption. Saturation and Brightness are both measured on a scale of 0 to 255, and have discreet endpoints.

Arguments

hueShift, satShift, brightShift

These arguments result in a relative shift adjustment in the color components. So a brightShift of 10 makes everything 10 steps brighter. This is in contrast to the absolute force adjustments described below.

forceHue, forceSat, forceBright

These arguments result in an absolute forcing of a color component. So, a forceBright of 10 forces every pixel to have a brightness component of 10, making everything very dark. Forcing all three components will result in simply making the entire sprite one color.

startHue, startSat, startBright

These arguments form the start points for a shift type adjustment. So a startBright of 10 and an endBright of 20 means start by raising the brightness of every pixel by 10 and raise it by a net of 20 across time.

endHue, endSat, endBright

These arguments form the end points for a shift type adjustment. They are redundant with the hueShift, satShift, and brightShift parameters, and are included for readability.

Mixing Shift and Force Parameters

The ‘shift’ and the ‘force’ arguments can be mixed together. In any mode you can mix shift and force arguments that aren’t affecting the same component. For example you could shift the hue, and force the saturation at the same time.

But the use of shift and force parameters on the same component is limited and dependent on which animation mode the sprite is using.

In static mode, no single component can be shifted and forced at the same time. In other words, when calling HSB with the static mode, hueShift and forceHue cannot be used at the same time.

In the animating modes, the shift and force arguments for a single component can be used at the same time. In these cases, the force value will be treated as the starting point, and the shift will be a net delta shift adjustment. Example:

hsb(sprite x, [animMode:#range, numFrames:15, forceHue:120, hueShift:30])

In the above statement the sprite would have it’s hue forced to 120 (green) and then across the next 15 frames would have it’s hue adjusted by 30 to 150 (greenish blue). Since the force parameters take the place of the starting point, in the animating modes, the start point and force parameters for a single component cannot be used at the same time. Example:

hsb(sprite x, [animMode:#range, numFrames:15, startHue:15, forceHue:20]) - - bad code!!

The above statement will NOT work.

RGB Basics

Effect Type: Simple

RGB stands for red, green, and blue. It is the standard model for describing color to the computer. And now, it’s the name for an exciting new effect in Effector Set I. RGB is very similar to HSB. It let’s you adjust the red, green, and blue components of every pixel in the sprite, thus colorizing the sprite. All sorts of color fades and effects are possible. Unlike HSB, RGB when animating (fading) between colors will take the shortest path through the RGB colorspace, rather than passing through intermediate colors.

Uses

RGB has a number potential uses, especially when used in tandem with other effects. Here are a few:

1. eliminate extra castmembers when they need to differ only in their color. Just use one castmember to spawn many sprites each with unique coloring achieved by RGB.

2. colored lights that illuminate other objects

3. button hilites, and other colorizing needs.

Behavior

RGB Shifter

This behavior provides a quick way to adjust colors of a sprite. It defaults to the static animation mode.

RGB Reference

Effect Symbol: #rgb

Properties Type Value Default Exclusive

#animMode symbo l

#static, #range, #infinite,

#pendulum integer 1+ - required in infinite, pendulum, and range #redShift integer -255 to 255, 0 is no change 0
#greenShift integer -255 to 255, 0 is no change 0
#blueShift integer -255 to 255, 0 is no change 0
#startRed integer -255 to 255, 0 is no change current invalid in static mode #startGreen integer -255 to 255, 0 is no change current invalid in static mode #startBlue integer -255 to 255, 0 is no change current invalid in static mode #endRed integer -255 to 255, 0 is no change #redShift
#endGreen integer -255 to 255, 0 is no change #greenShift
#endBlue integer -255 to 255, 0 is no change #blueShift
#easeIn integer frames 0 invalid in static mode #easeOut integer frames 0 invalid in static mode

Arguments:

redShift, greenShift, blueShift, (and variants) These arguments determine what will be added the red, green, and blue pixels of each component to adjust it’s color. These can be positive or negative numbers. The pixel components range from 0 - 255, but any value can be used for the shift arguments.

#static

#numFrame s

Magnify Basics

Effect Type: Simple

The Effector Set I magnify effect is unlike any magnification you may have seen in the past. It can zoom in or out to any percentage (like 117%), not just even multiples (200%, 300%, etc.), and it does so smoothly. You can also set the center point of the magnification, it can be anywhere on the stage. Magnify is unlike the scale effect included with AlphaMania in that the actual size and shape of the magnifying sprite doesn’t change. (A magnifying glass doesn’t actually make something bigger, it just let’s you see it better.)

Uses

Besides using this effect to create magnifying glasses, you can also use this effect to create a ‘bump under the rug’ embossing effect. Taking a round, slightly feathered sprite, put the AlphaMania castmember into the apply draw method, and magnify the sprite at about 110%. As it is dragged over the stage, a little ‘bump’ will appear.

Special Considerations

Inverse Magnification

Inverse magnification occurs when the magnify effect is used with percentages less than 100%, sort of like looking through the back end of a telescope. Inverse magnification can cause some interesting side effects.

1. We don’t recommend doing inverse magnification on sprites using the normal draw method.

As the sprite shrinks away, you will see the white or black square of empty data that contains the sprite. This tends to not be terribly attractive.

2. On the other hand, we highly recommend using inverse magnification on sprites with the reveal or apply methods. In apply method, the sprite can become a miniature version of the stage, complete with moving sprites, etc..

3. When using inverse magnification and the apply method if there are any MIAW’s expect to see very weird things go on as Director juggles the offscreen buffers.

Behaviors

Magnify

This simple behavior let’s the user set up a sprite into static mode and apply some percentage of magnification, and turn on or off the interpolation.

Custom Functions

SetMagPoint

SetMagPoint( sprite x, #magnify, x, y)

This function sets the magnification point to be the center of magnification for the sprite. The x and y terms are in coordinates relative to the sprite’s center, not global stage coordinates.

InterpolateNow

InterpolateNow( sprite x, #magnify)

This function causes the sprite to immediately redraw interpolated, but does not change the flag for the sprites overall interpolation setting.

28 Effector Set I & II - User’s Manual

SetInterpolation

SetInterpolation(sprite x, #magnify>, interpolation)

Magnify Reference

Effect Symbol: #magnify

Properties Type Value Default Exclusive

#animMode symbo l

#static, #range,

#infinite,

#pendulum #static

#numFrames integer 1+ - required in infinite, range and pendulum #interpolation integer 0, 1, 2 1
#percentage integer 1+, 100 = no
magnify #magPoint point relative to sprite center

100

current valid in pendulum, infinite and range only #percentage

sprite center

#magPointX integer relative to sprite center #magPointY integer relative to sprite center
#easeIn integer frames 0 valid in pendulum, infinite and range only
#easeOut integer frames 0 valid in pendulum, infinite and range only

Custom Functions

SetMagPoint

SetMagPoint( sprite x, < position or #magnify >, x, y)

This function sets the magnification point to be the center of magnification for the sprite. The x and y terms are in coordinates relative to the sprite’s center, not global stage coordinates.

InterpolateNow

InterpolateNow( sprite x, < position or #magnify >) This function causes the sprite to immediately redraw interpolated, but does not change the flag for the sprites overall interpolation setting.

SetInterpolation

SetInterpolation(sprite x, < position or #magnify >, interpolation)

#startPercentage integer 1+, 100 = no magnify

#endPercentage integer 1+, 100 = no
magnify

30 Effector Set I & II - User’s Manual

Arguments

percentage

The percentage is the central parameter to the magnify effect. Magnify by what percentage. Values greater than 100 will result in ‘enlargement’ or magnification, and values less than 100 will result in ‘shrinking’ or inverse magnification (like looking through a telescope backwards). Values can be anything, and don’t have to be even multiples. For example magnifying by 117 percent is perfectly allowable and looks great.

magPoint

This is a point type parameter that tells the sprite where to center the magnification. This parameter is relative to the center of the sprite, so point( 0, 0 ) is the very center of the sprite. In the apply and reveal drawing methods the magnification point can be outside the sprite itself. In fact, in apply mode the magnification point can be anywhere on screen (but remember the point is still relative to the sprite).

magPointX, magPointY

If you’d rather not use a point type, you can pass in these individual parameters. (See magPoint above) You are not required to use both, if you simply want to adjust the magnification point in one direction..

Seurat Basics

Effect Type: Complex

Georges Seurat (1859-1891) was a famous artist who pioneered the painstaking and arduous pointillist painting technique. Now you can imitate his genius with a cheap hackneyed special effect, but this one animates! This effect is one of the simplest to use, and yet very impressive. The speed, dot size, and intensity of the effect can all be controlled.

Techniques

Wavy Liquid

Take two sprites that are the same AlphaMania castmember, put one exactly on top of the other and apply the Seurat effect to it. You’ll now see a ‘wavy liquid’ type distortion going on. If the castmember has a lot of smooth gradients in it, then the effect will be more apparent.

Special Considerations

No Animation Modes

The Seurat effect does not have an animMode parameter and does not fit the static/range/pendulum/infinite model of the other effects. Instead, Seurat simply has a speed parameter. Setting this to 0 will ‘freeze’ the effect.

No Semi-Transparency

The Seurat effect blows right through transparency settings, so it may not be the best effect to put on glass buttons.

Intensity Directly Impacts Performance

A high intensity setting may slow down this effect, and a low one may speed it up.

Seurat Parameters

Intensity

The intensity parameter controls the number of dots. Higher values will produce a denser packing of dots, but may slow the effect down

Speed

This is the relative speed of the dots as they bounce around and travel.

Radius

This is the dot size. The dots may be 1, 2, or 3 pixels wide.

Behaviors

Seurat

This behavior quickly and completely maps all the possible settings for the Seurat effect onto a sprite, so it’s an easy and powerful behavior to use.

Seurat Reference

Symbol: #seurat

Properties Type Value Default Exclusive

#speed integer 0+ 7 #radius integer 1-3 3 #intensity integer 1 - 16 4

Speed

This is the relative speed of the dots as they bounce around and travel.

Radius

This is the dot size. The dots may be 1, 2, or 3 pixels wide.

Intensity

The intensity parameter controls the number of dots. Higher values will produce a denser packing of dots, but may slow the effect down

Snow Basics

Effect Type: Simple

This effect makes your sprites into a snow globe or a static filled TV. And if you want to show snow on Mars, you’ll be glad to know you can change the color of the snow to red or even have it randomly change.

Techniques

Film Grain

By using a low strength white or black snow you can subtly distort an image, as if there is a constant film grain effect going on. Remember, AlphaMania castmembers can be put into the apply method, so this effect can be live rendered onto QuickTime movies, etc.

Television Static

Use the chroma value of 2 for random color. Raise the strength, intensity, and speed parameters to taste. Not to be too redundant, but don’t forget that AlphaMania castmembers can be put into the apply method, so this effect can be live rendered onto QuickTime movies, etc.

Special Considerations

No Animation Modes

The Snow effect does not have an animMode parameter and does not fit the static/range/pendulum/infinite model of the other effects. Instead, Snow simply has a speed parameter. Setting this to 0 will ‘freeze’ the effect.

Intensity Directly Impacts Performance

A high intensity setting may slow down this effect, and a low one may speed it up.

Using The Set FX Movie with Snow

Because of the late addition of some parameters to the snow effect, the ‘chroma’ parameter that lets you adjust the color of the snow is not included in the Set FX movie. A future version will correct this oversight. In the interim, if you want easy access to this feature, use the included behavior.

Snow Parameters

Chroma

The ‘chroma’ parameter to the snow effect is, unfortunately, a little obtuse. But here are the possible values:

0 white/lightening
1 black/darkening
2 random color
3 blue-green
4 magenta
5 blue
6 yellow
7 green
8 red

The ‘random color’ most resembles the multi-colored TV static. When using the random color chroma setting, you may want to increase the ‘strength’ parameter.

Strength

The strength parameter controls how much the snow ‘flakes’ displace the original color. At a low setting, the snow effect can appear to be a subtle distortion or film grain, at the high setting the picture can nearly be obliterated by the flakes.

Intensity

The intensity parameter controls the number of dots. Higher values will produce a denser packing of dots, but may slow the effect down

Speed

This is the relative speed of the dots as they bounce around and travel.

Behaviors

Snow

This simple but powerful behavior let’s you access all the parameters of the snow effect.

Snow Reference

Symbol: #snow

Properties Type Value Default Exclusive

#speed integer 0+ 7 #strength integer 0-6 4 #intensity integer 1 - 16 4 #chroma integer 0, 1, 2, 3-8 0

Speed

This is the relative speed of the dots as they bounce around and travel.

Strength

The strength parameter controls how much the snow ‘flakes’ displace the original color. At a low setting, the snow effect can appear to be a subtle distortion or film grain, at the high setting the picture can nearly be obliterated by the flakes.

Intensity

The intensity parameter controls the number of dots. Higher values will produce a denser packing of dots, but may slow the effect down

Chroma

The ‘chroma’ parameter to the snow effect is, unfortunately, a little obtuse. But here are the possible values:

0 white/lightening
1 black/darkening
2 random color
3 blue-green
4 magenta
5 blue
6 yellow
7 green
8 red

The ‘random color’ most resembles the multi-colored TV static. When using the random color chroma setting, you may want to increase the ‘strength’ parameter.

Mosaic Basics

Effect Type: Simple

This effect is handy for disguising peoples identities, creating futuristic video effects, etc. It’s an animated version of the mosaic effect seen on commercial video SEG’s, or Photoshop’s mosaic filter. The horizontal and vertical ‘resolution’ may be controlled independently and animated over time.

Techniques

Animating the Colors Only

You may find that you want to use the mosaic effect, but really have no need to change the resolution of the effect over time. Thus, you might, for that reason want to use the static mode. But if you want to add some excitement to the effect, try instead using the infinite or pendulum modes, setting the start and end points of the animation to be the SAME, and turning on the ‘changeColorFlag’. Now, you’ll have a mosaic effect that isn’t changing resolution, but is flipping colors in the boxes! This makes it look more like ‘real video’.

Recommendations

Use Reveal or Apply Drawing Methods

While mosaic will work fine in the normal drawing method, you may occasionally see white or black on the edges of your graphic. This is a side effect of the normal method and this type of effect.

Using The Set FX Movie with Mosaic

The Set FX move, to simplify any confusion associated with this effect, does not let you control the x and y resolutions separately.

Behaviors

Mosaic

This behavior lets you set the x and y resolution of this effect and puts it into static mode.

Mosaic Reference

Effect Symbol: #mosaic

Properties Type Value Default Exclusive

#animMode symbo l

#static, #range,

#infinite,

#pendulum #static

#numFrames integer 1+ #xResolution integer 1+, resolution in pixels 1

#yResolution integer 1+ 1 #startXRes integer 1+ current valid in pendulum, infinite and range only
#startYRes integer 1+ current valid in pendulum, infinite and range only
#endXRes integer 1+ #xResolution
#endYRes integer 1+ #yResolution #changeColorFlag integer true or false false valid in pendulum, infinite and range only

Arguments

xResolution, yResolution

The x and y resolution parameters set the height and width of each ‘box’ of the mosaic effect, measured in pixels.

changeColorFlag

When this flag is true, the sprite will choose a different source pixel in each ‘box’ (defined by the x and y resolutions) each time it draws. Note, if setting this flag true in the #range and #infinite modes, the ‘numFrames’ parameter is not needed.

LineSkip Basics

Effect Type: Complex

This effect let’s you skip lines or sets of lines when drawing the sprite. Useful for creating transitions that don’t stop other animations, futuristic video effects, a poor man’s blending (but FAST), or simply drawing sprites quicker. You can control the number of lines to alternately skip and draw, as well as the ‘offset’ in to create ‘rolling’ effects. All of these parameters can be animated.

Using The Set FX Movie with LineSkip

Because of the late addition of some parameters to the lineskip effect, the ‘offset’ parameter is not included in the Set FX movie. A future version will correct this oversight.

Behaviors

LineSkip

This simple behavior let’s you set up the number of lines to skip and the number of lines to draw. It puts the sprite into the static animation mode.

Line Skip Reference

Effect Symbol: #lineskip

Properties Type Value Default Exclusive

#animMode symbo l

#static, #range,

#infinite,

#pendulum #static

#numFrames integer 1+ - required in pendulum, infinite, and range #linesToSkip integer 0+ 0
#linesToDraw integer 1+ 1
#offset integer 0+ 0 number of lines to skip at top of sprite before drawing.
#startSkip integer 0+ current valid in pendulum, infinite and range only #startDraw integer 1+ current valid in pendulum, infinite and range only #startOffset integer 0+ current valid in pendulum, infinite and range only
#endSkip integer 0+ #linesToSkip
#endDraw integer 1+ #linesToDraw
#endOffset integer 0+ #offset

Arguments

linesToSkip

This is the number of lines or rows of the sprite to skip before drawing..

linesToDraw

This is the number of lines or rows of the sprite to draw before skipping.

offset

This is the number of lines to skip at the very top of the sprite before beginning to skip more lines. You can use this parameter to cause a ‘rolling’ of the lines through the sprite, or to interlace two different lineskipped sprites together.

Part 3: Guide to Effector Set II’s Effects

Effector Set II contains five very powerful effects: Bevel, Blur, Drop Shadow, Ripple, and Roil. Particular attention has been given to these effects with respect to lighting, quality, and flexibility.

Like the last section, each effect has a Basic description followed by a drier reference section.

Bevel Basics

Effect Type: Simple

The bevel effect brings your AlphaMania sprites into the third dimension. This effect will bevel the edges of your castmembers, and control the position, strength, and color of the light source. Almost every feature of this effect can be animated, complete with easeIn and easeOut.

Special Considerations

Raised from the Surface or Depressed Below

The bevel effect can accept negative bevel values to make your sprite appear to be depressed below the surface of the stage, rather than extruded out above the stage. However, much of this illusion is dependent upon the lighting. You may find that the illusion of the bevel being extruded or depressed is best affected by positioning the light source above or below the sprite, and when using the point light source, positioning the light source inside the visible area of the sprite rather than outside will impact this illusion significantly.

Lighting

The key to cool bevels is in the lighting. To this end the bevel effect supports many different light settings:

pointOrRay - this flag determines what type of light source you use. A ray type light source is easier to use, and perhaps more conventional, but the point light source is VERY dramatic and the rewards reaped with its usage are high.

relativeToSprite - this flag determines whether or not the light source is positioned in stage-based coordinates, or simply by the distance away from the upper left of the sprite.

lightLoc, lightLocX, lightLocY - these parameters determine the position of the light source.

strength, radius, red, green, blue - these parameters determine the power and color of the light source. They all interact. For instance, if you want a narrow light with a real hot spot in the center, try bringing the radius down, but raising (equally) the red, green, and blue to values like 500. They also affect the specular highlighting of the beveled sprite.

Coloring

If using colored lighting you may get ‘negative’ coloring in the dark areas. To avoid this, raise the strength up to 128 (or higher).

Changing the Bevel Width over Time (Bevel Cropping) The Bevel effect supports startBevel and endBevel arguments which will change the bevel over time, but the performance may not be acceptable. Instead we recommend using the bevel cropping args
(bevCrop, startBevCrop, endBevCrop). The value of the bevel crop is the maximum bevel height, and by manipulating this value over time you can make any beveled graphic appear to raise up off the stage smoothly and with fast performance. Use the easeIn and easeOut arguments for added drama.

41 Effector Set I & II - User’s Manual

Curving the Bevel

Use the curve argument to bend the bevel out (puffy) or in (like a mesa). Fun!

Bevel Reference

Bevel Effect Argument Table

Effect Symbol: #bevel

Properties Type Value Default Exclusive

#animMode symbo l

#static, #range,

#infinite,

#pendulum #static

#numFrames integer 1+ - required in pendulum, infinite, and range #radius integer any 100 NOT measured in pixels, relative to strength and rgb.
#startRadius
#endRadius
#strength any 0
#startStrength
#endStrength
#lightLoc point -20, -20
#lightLocX integer
#lightLocY integer
#lightRelToSprite integer 0, 1 1 0 = relative to stage 1 = relative to sprite #bevCrop integer 0-255 255
#startBevCrop integer
#endBevCrop integer
#bevel integer any 5 can’t be used w/ bevelRect #bevelRect rect any 0,0,0,0 can’t be used w/ bevel; recommend setting

#bevel to 0. #startBevel integer USE BEV CROP INSTEAD #endBevel integer USE BEV CROP

INSTEAD #pointOrRay integer 0, 1 0 0 = point light source,

1 = ray light source. #curve integer -8 to 8 0 negative values are convex, positive concave.
#red integer any 255
#green integer any 255
#blue integer any 255
#startRed integer any
#startGreen integer any
#startBlue integer any
#endRed integer any
#endGreen integer any
#endBlue integer any
#easeIn integer 0
#easeOut integer 0

Arguments:

bevel

This argument determines the width (in pixels) of the bevel. Negative arguments can be used to cause a ‘depressed’ rather than ‘extruded’ illusion. Note that much of this illusion depends upon light position.

bevelRect

This argument can be used to override the bevel argument and let you specify the amount of beveling on each side of the sprite. The left, top, right, and bottom values of the bevelRect are used as the amount of beveling to perform on the left, top, right, and bottom of the sprite. This argument is very useful for achieving an ‘angled’ extrusion (like rect(0, 0, 10, 10) ) or an orthographic extrusion (such as

rect(6, 1, 6, 1) ). Wildly disparate values may cause the beveling to look poor or unacceptable ( such as rect (-1, 16, -28, 4) ). Set the bevel parameter to 0 when using the bevelRect.

radius

This argument affects the overall radius of the light source. However, the radius of the light source is not measured in pixels and will be inter-dependent on the strength, red, green, and blue settings.

strength

Overall strength of the light source. Interacts with the radius, red, green, and blue settings. When using colored light sources, recommend setting the strength to 128 to avoid reverse coloring of the dark areas.

pointOrRay

Determines whether the light source is a point-based light or a ray type light. When using point-based light the light has a very specific location where it is bright and then generally falls away. When using the ray-based light the light has a general location that is applied equally to the whole sprite. Arguments like radius and light location, and lightRelToSprite are relevant in both lighting models.

lightRelToSprite

This argument determines whether the light location parameters are in stage based or sprite based coordinates. If in sprite based coordinates, then no matter where the sprite moves it’s lighting will be constant and unchanging (assuming you aren’t actually changing the light location parameters), but when using stage based coordinates, the sprite can move ‘into’ and ‘out of’ the light (even in the ray source model).

bevCrop

The maximum bevel height. Useful for making the bevel appear to change over time. Gives better performance than the startBevel and endBevel args. Example:

Bevel(sprite x, [bevel:8, animMode:#range, numFrames:20, startBevCrop:0, endBevCrop:255,

easeIn:7]) This line will make the sprite appear to rise off the stage.

curve

Lets you curve the bevel. Subtle but worthwhile.

red, green, blue

Affects the coloring of the light source, but also interacts with the overall power of the light (along with

strength and radius). These values are not limited to 0 to 255, but can be negative, and/or large (such as 500).

lightLoc lightLocX, lightLocY

Specifies the location of the light source. If lightRelToSprite is 0, then these coordinates should be stage based, but if it is 1, then these coordinates should be relative to the sprite.

DropShadow Basics

Effect Type: Complex

Finally, animated, colorized, feathered, and fully controllable drop shadows! This effect even has a #relativeToPoint animation mode to let you specify a light source location!

Special Considerations

DropShadow Should Be Last Effect

Under most circumstances if you are using multiple effects, be sure to add dropshadow last. This is especially true if using it in conjunction with an effect like rotate.

Working With a Light Source

In the #relativeToPoint animation mode you can use the light location parameters to define the location of the light source. In this case the xOffset and yOffset parameters will be used determine the overall length and offset of the shadow, but not the actual x and y offsets. The proximity of the light source to the sprite will not cause foreshortening or lengthening of the drop shadow.

Custom Functions

PickColor

PickColor( sprite x, #dropshadow)

PickColor( sprite x, #dropshadow, initialRed, initialGreen, initialBlue)

PickColor puts up the color picker dialog and returns a comma-delimited string of three numbers which are the red, green, and blue values chosen by the user. If the string comes back empty, the user cancelled the dialog. Initial red, green, and blue values can optionally be passed into this function.

This function doesn’t modify the drop shadow in any way, it’s simply a way to bring up the color picker dialog for use in the SetFX movie. Use it in your own movies!

DropShadow Reference

Effect Symbol: #dropshadow

Properties Type Value Defaul t

Exclusive

#animMode symbol #static, #range,

#infinite, #pendulum,

#relativeToPoint #static

#numFrames integer 1+ - required in pendulum, infinite, and range #xOffset integer 4
#yOffset integer 4
#transparency integer 0-255 200 0 - invisible, 255 - opaque #red integer 0-255 0 color of drop shadow #green integer 0-255 0
#blue integer 0-255 0
#feather integer 0 - 4 0
#startXOffset integer
#startYOffset integer
#endXOffset integer
#endYOffset integer
#startTrans integer 0-255