Animation

Behaviors

A behavior moves, turns, scales or fades a symbol instance by itself, frame after frame, with no keyframes: a sign that wiggles, a light that pulses, an antenna that trails the head it is on. Behaviors add to what the instance's keyframes and tweens already do, so you can key the big moves and let behaviors add the life.

Add a behavior

  1. Select one or more symbol instances on the stage.
  2. Open Window › Behaviors.
  3. Click Add Behavior and pick one. Pointing at a name in the list says what it does.
  4. Set what it offers with the sliders, boxes and lists under the list. The stage shows the result as you drag.

To see them move before you choose, click Add Behavior › Browse Presets.... It lists ready-made combinations (Float, Heartbeat, Swing, Flicker, Ring of Copies, Fountain and others) and then every behavior on its own, each playing on a sample star. Double-click one, or click Add to Selection, to add it; the window stays open to add another. With text selected the same command shows the letter animations, played on a sample word; with a shape selected, the shape operators, each with a still beside its name and playing on sample shapes; and on an adjustment layer, the effects, each on a sample picture (transitions and Trim Paths play from start to end so you see them move).

The Behaviors panel listing Repeat in a Circle and Pulse on a star logo, with the copies, radius, start angle and sweep settings, and the star drawn as a ring of eight copies on the stage
The Behaviors panel with two behaviors on a logo. The settings shown are those of the behavior picked in the list.

Play the timeline, or use Test Movie, to see the motion. Behaviors show the same way on the stage, in Test Movie and in every export.

The behaviors

BehaviorWhat it does
WiggleShakes the instance about at random, smoothly: its place, turn and size, as many times a second as you choose.
OscillateSwings it back and forth evenly: up and down, side to side, turning, growing or fading.
SpinTurns it steadily about its transformation point.
PulseGrows and shrinks like a heartbeat.
Fade In and OutFades it in at the start of its keyframes and out at their end.
BlinkMakes it disappear and come back, on a beat or at random.
Time RemapSays which frame of a graphic or movie clip shows, frame by frame, whatever its loop: key Frame shown from 1 to 48 over 96 frames for slow motion, hold it for a freeze, key it from high to low to run the graphic backwards, or shape it as a curve in the Motion Editor. A movie clip follows it instead of playing its own timeline, on the stage, in exports and in Test Movie, where the scripts of each frame it is taken to run as it gets there. Tick Blend between frames and, in slow motion, a frame part way between two shows the next faded in over this one, so the motion runs smooth instead of stepping. Bake leaves each frame's graphic set to Single Frame on the frame it showed (a blended frame as two).
Recorded MotionA path drawn by hand with Control > Motion Sketch (see Motion Sketch), as keys a frame on how far it moves across and down.
LoopRepeats the motion keyed over the first frames of its keyframes for as long as they run: round and round (a cycle), back and forth, or carrying on the way it was going at the speed it ended with. Key a bob or a step once and loop it.
JiggleMakes it sway and bounce on a spring as it is carried about, turning about its transformation point: antennas, ears, a feather, a sign on a chain. It follows the layers it is parented to as well as its own keys; say which way it points from its pivot, how far it swings, how springy and how bouncy.
Follow with LagMakes it trail its own keyed motion on a spring: it lags behind, catches up and overshoots. Use it for hair, antennas, tails and props, keyed with the part they hang from.
Repeat in a CircleCopies it round a circle about where it is, each copy turned to follow the circle if you like: the number of copies, the radius, the start angle and how far round they go.
Repeat in a Line or GridCopies it in a row, or in rows and columns, from where it is or centered on it.
Repeat along a PathCopies it along the line drawn on the motion guide its layer is under, spaced evenly from one place on the line to another, each copy turned with the line if you like. Key Slide along to send the copies flowing down the line; with Wrap round off, copies that slide past an end disappear.
Scatter in a ShapeCopies it at random places inside a closed line drawn on the motion guide its layer is under, kept apart, turned and sized at random if you like: a field of flowers, stars in a window, a crowd in a square. The same places every frame, from the seed.
Follow PathPuts it on the motion guide's line: key how far along it is, or give it a speed, and it travels the line, turned with it if you like.
Look AtTurns it to face another instance, chosen by its instance name: eyes that follow, a spotlight on a dancer, an arrow that points.
Link to ObjectMoves, turns, scales or fades it as another instance does, from where each starts: a shadow under a bouncing ball, a wheel that turns as the car moves across, a needle that rises with a level. Any change can drive any other: its moving down can turn this one. Scale it by an amount, add an offset, keep it within limits, and lag it if you like. See Links.
Slider, Angle, Point, Color and Checkbox ControlControls to key, each with a name, that do nothing to the instance holding them: other instances follow them with Link to Control (see Controls on a null).
Link to ControlFollows a control on another instance: an angle turns it, a point moves it, a slider sizes or fades it, a color tints it, a checkbox shows or hides it.
Link to ControllerSets its place, turn, size or fade from a master controller's slider (see Rigs and motion), between two values.
EffectorChanges the copies a Repeat or Particles behavior made: each copy moves, turns, grows, fades or runs its loop on by how near it is to a point, where it is across or down, or its place in the order. Key the point or its reach to sweep the change across the copies.
ParticlesSends out copies as particles, born at a steady rate from a point or an area: speed and direction with a spread, gravity, turbulence, spin, size from birth to death, fading. A graphic symbol's loop can start as each particle is born. Like everything else, the same frame always shows the same particles.
StaggerRuns each copy's graphic loop a few frames after the one before, in order or at random, so copies of one cycle move out of step: a crowd, a field of grass, a wave. Put it after a Repeat behavior.
Follow SoundMoves it with how loud the scene's sound is: it grows, jumps, turns, shows or changes frame on the beats, falling back gently after each. Ignore the quiet parts, and nudge it a frame or two early or late to taste. For lip sync proper, see Lip sync.
Audio SpectrumCopies of it as the bars of an audio spectrum, low notes on the left to high on the right (or round a circle), each growing taller, bigger or brighter with how much of the scene's sound is in its band, and falling back gently after a peak. Draw a bar with its registration point at its bottom so it grows upward. Choose which part of the range to show with Lowest band and Highest band.
Audio WaveformCopies of it along the wave of the scene's sound over each frame, in a line or round a circle, like an oscilloscope. Use a small dot for a dotted line, or a short dash.

Sixteen or more copies draw quickly: copies of a graphic or a movie clip are stamped from one picture of each frame they show, and copies with a filter, a blend mode or a color effect share one picture among those that come out the same (the same frame, color, turn and size), so a grid of glowing clips costs little more than one.

On a dark stage, a row of blue spectrum bars tall at the low end, a ring of pink bars round a circle, and a dotted orange waveform below the row
Audio Spectrum as a row and as a ring, and Audio Waveform as a dotted line, all from one beat on the sound layer.
Four frames of a green head running right with a red-tipped antenna that leans back as the head speeds up and swings the other way as it turns back
Jiggle on an antenna parented to a moving head: it trails, overshoots and settles with no keys of its own.

Look At and Link to Object follow another instance by its instance name. Choose it from Linked to, or click Pick and then click the instance on the stage; one with no name is given one from its symbol. Esc cancels. While an instance with a link is selected, a dashed line runs from it to the instance it follows.

Two stars on the stage with a dashed line from the selected one to the other, and the Behaviors panel showing Link to Object linked to logo, following its Move down to change its Turn
Link to Object picked on the stage: the left star turns as the right one moves down.

Follow its says which change to follow, and Change my what it changes here: Same for the same kind, or any of moving across, moving down, turning, size and fade. Moving is in pixels, turning in degrees, size and fade in percent. Amount scales the change, Offset adds to it, and Keep within limits holds it between Lowest and Highest: a door that opens no further than 90 degrees, however far its handle goes.

Controls on a null

When many things should move together, give the scene one place to change them from. Put controls on one instance, the "null" (a small marker on a guide layer is a good choice, as it does not show in the movie), name it, say rig, and add control behaviors to it: Slider Control, Angle Control, Point Control, Color Control and Checkbox Control. Give each a Control name and key its value over time like any setting.

Then add Link to Control to each instance that should follow, with Controls on set to rig and the control's name. Change my says what it drives: Same turns by an angle, moves by a point, tints toward a color and shows or hides by a checkbox; or pick moving across, moving down, turning, size, fade, tint or showing. Amount and Offset scale and add to it. Turn one Angle Control and every gear in the machine turns; change one Color Control and the whole title takes the new accent color.

Behaviors of your own read controls too: ctx.control("rig", "Dial") gives a number for a slider or an angle, {x, y} for a point, "#RRGGBB" for a color, and true or false for a checkbox. A behavior can tint what it moves by returning color and tint (0 to 1).

Animate the settings

Any setting can change over time. The small button at the right of a setting keys it on the frame the playhead is on:

  1. Move the playhead to where the change starts and click the setting's key button. It fills in (◆): the setting is keyed there.
  2. Move the playhead on and change the setting. A keyed setting is keyed again wherever you change it.

Between keys a number runs in a straight line from one value to the next; a choice or a checkbox holds until the next key. The button is hollow (◇) on frames between keys; clicking it there keys the setting at the value it has, and clicking a filled one takes that key away. With its last key gone, the setting keeps the value it had.

Key the radius of Repeat in a Circle from 0 to 100, say, and the copies burst out from the middle; key its start angle and the ring turns; key the number of copies and they appear one by one.

Along a path

Repeat along a Path and Follow Path use the line on a motion guide, the same guide a classic tween can follow (see Masks and guides):

  1. Add a guide layer above the instance's layer and draw the line on it with the Pen, Pencil or Line tool: a curve, a spiral, a closed loop.
  2. Drag the instance's layer under the guide layer so it becomes guided, or set its type to Guided in Layer Properties.
  3. Give the instance Repeat along a Path or Follow Path.

Change the line and the copies follow it. A guide with keyframes of its own changes the line over time too. Guide layers are never drawn in exports, so only the copies show.

Copies

A Repeat behavior draws the instance many times. The behaviors below it in the list then work on every copy, each in its own way: a Wiggle after Repeat in a Circle wiggles each copy differently, and Stagger sets each copy's loop apart. The copies are drawn, played and exported like the instance itself; on the stage, clicking selects the instance through its first copy.

Eight orange stars in a ring, each turned to follow the circle
Repeat in a Circle, eight copies, with Pulse after it.
Sixty small red figures in five rows, each at a different point of a hop
Repeat in a Line or Grid, then Stagger in random order: one hop cycle, sixty hoppers out of step.
A fountain of small yellow sparks rising from a point on a dark blue stage, slowing, spreading and falling as they fade
Particles from one small spark symbol.

Turns and scales happen about the instance's transformation point, the same point the Free Transform tool turns it about.

Behaviors that are random (Wiggle, and Blink set to random) have a Seed. The same seed always gives the same motion, so a scene renders the same every time; New picks another seed for a different motion. Each behavior you add starts with a seed of its own, so two instances given the same behavior do not move in step.

Shape operators

Drawn shapes have operators of their own, which change their lines and outlines each frame. Select a shape (a drawing object, or a merge-drawn shape picked whole) with no symbol instance selected, and the Behaviors panel shows its operators: Add Operator offers them, and their settings key the same way.

OperatorWhat it does
Trim PathsDraws only part of the shape's lines, from a start to an end along them, with an offset that slides the drawn part round. Key the End from 0 to 100 and the line draws itself on; key the Start after it and it draws itself off. Fills are left whole.
Wiggle PathShakes the outlines and lines smoothly at random: how far, how long the waves are, how fast they change. Change on whole frames only makes it boil like redrawn line work.
Zig-zagPuts teeth, or smooth waves, along the outlines and lines; key the shift to make them travel.
Offset PathGrows the outlines outward by so many pixels, or shrinks them with less than 0, keeping their corners; holes shrink as the shape grows.
Round CornersRounds the sharp corners, up to a radius.
Pucker and BloatPushes the sides between the corners out from the shape's middle (bloat), or draws them in (pucker, less than 0): a square that puffs up, a star that sharpens.
DashesCuts the shape's lines into dashes of a length with gaps between, each ended as the stroke's caps end it (round caps make rounded dashes). Key the Offset to send them marching along: a dotted route on a map, a fuse, marching ants.
TaperThins or swells the shape's lines along their length, from Start width to End width (percent of the stroke's weight), with a Wave that swells and thins them and can travel down them: a brush stroke, a tail, a rope, a pulse along a wire. A gradient stroke keeps its gradient.
TwistTurns the shape about a middle point, more near the middle than at the edge, curling straight sides into a swirl. Key the Angle for a whirlpool.
Merge PathsCombines the shape's outlines into one: added, the later ones cut out of the first, only where they overlap, or only where they do not (Exclude). Most useful after Repeater or Offset Path, whose copies overlap.
RepeaterDraws the shape again and again, each copy moved, turned and scaled from the one before: a trail, a spiral, a stack of rings.
The Behaviors panel titled Operators of the shape, with Trim Paths and its Start, End and Offset settings, and a blue wavy line selected on the stage
With a shape selected, the panel shows its operators.
Five shapes: a square puffed out by Bloat, a square with rounded corners, a star sharpened by Pucker, a green square repeated in a curving trail of turning, shrinking copies, and a rectangle grown by Offset Path; beside them text that is spaced out, colored and blurred more toward its end
Pucker and Bloat, Round Corners, Repeater and Offset Path, and on the right Animate Letters spacing, coloring and blurring the letters more toward the end.
Four frames of a blue wavy line: nothing at frame 1, a quarter drawn at frame 12, two thirds at frame 24, all of it at frame 36
Trim Paths with its End keyed from 0 at frame 1 to 100 at frame 36: the line draws itself on.

Operators keep the shape's fill and stroke as they are. Clicking on the stage finds the shape by its outline as drawn.

Letter animators

A text field's letters can move one by one while the text stays text you can edit. Select a text field (with no symbol instance or shape selected), and the Behaviors panel shows its letter animators: Add Animator offers them. Those that play by themselves count from the first frame of the keyframes the text is on.

AnimatorWhat it does
TypewriterTypes the text out a letter at a time, so many letters a second, after a wait if you like.
Cascade InEach letter slides in from above, below, left or right, fading up, a little after the one before.
Bounce InEach letter grows from nothing, past its size and back.
Fade by WordThe words fade in one after another.
ScrambleLetters flicker through random letters, digits or symbols until each settles on its own, left to right.
Flip InEach letter turns in from edge-on, in depth, a little after the one before: tipped over its level line, or swung round like a door.
Blur InEach letter comes into focus and fades up, a little after the one before.
Source TextChanges the words the field shows: key Text to other words at other frames, for a countdown, a changing caption or a list. The letter animators after it work on the new words.
Text on a PathLays the letters along the line of the motion guide the text's layer is under, each turned with the line (or upright). Key First margin to send the text along the line; Above the line lifts it off; with Wrap round, letters that run past the end carry on from the start, otherwise they are hidden. Vertical text runs along the line too, its letters following each other down the line as they do down the column, standing as they stand in it, their tops toward where the line comes from.
WigglyShakes each letter about on its own, smoothly at random: moving, turning, growing and fading as much as you set. Together makes them move more alike, up to all as one.
WaveA wave runs through the letters, lifting and tilting them, for as long as the text shows.
Animate LettersMoves, turns, sizes, fades, spaces out, colors and blurs the letters (or words, or lines) a range covers, the range's edge square, ramped, rounded or in random order. Key its Offset to sweep the change from one end of the text to the other: any effect the others do, and more.

Animate Letters can also tip and swing letters in depth (Tip in depth, Swing in depth), drawn in perspective. Add Animator › Presets adds ready-made letter animations, each of one or more animators you can then change: Typewriter, Pop In, Slide Up, Drop In, Words Fade In, Flip In, Swing In, Blur In, Decode, Wavy Arrival and Jitter.

The Behaviors panel titled Letter animators of the text, with Cascade In and its From, Distance, Each letter takes, Between letters, Wait first and Fade in settings, and the title Hello, Phoenix on the stage
With a text field selected, the panel shows its letter animators.
Four frames of the title Hello, Phoenix: two letters fading in at frame 3, more at frame 8 and 14, and the whole title at frame 30
Cascade In brings the letters in one after another.

Letters turn and grow about their middles. Several animators add up: Cascade In and then Wave, say, brings the letters in and then keeps them moving.

Track mattes and adjustment layers

Two layer settings, on the layer's right-click menu in the timeline, change how layers combine.

A layer's right-click menu with Track Matte open on None, Alpha Matte, Alpha Inverted Matte, Luma Matte and Luma Inverted Matte, and Adjustment Layer below it
Track Matte and Adjustment Layer on a layer's right-click menu.
Four frames of a red title card NOW SHOWING appearing from left to right as a bar slides across it
The title shown through an alpha matte: a black bar on the layer above slides across it.
Phoenix with a blurred title on the stage, the timeline showing an adjustment layer on top with a half-filled circle icon and the Title layer with a matte icon, and the Behaviors panel showing the Blur effect of the adjustment layer
An adjustment layer blurring everything under it. Its icon in the timeline is a half-filled circle; a layer shown through a matte has a page with a window in it.
The red title card twice: plain above, and below blurred and tinted toward blue
Above, the layers as drawn; below, with an adjustment layer of Blur and Tint over them.

Both are Phoenix's own: another app opening the FLA file draws the matte layer plainly and the adjustment layer's art as art. Export FLA for Other Apps carries them as far as such apps allow:

The effects carried as what other apps have:

EffectBecomes
BlurA Blur filter
Directional BlurA Blur filter on one axis, when it runs across or down (within 15 degrees)
Lens BlurA Blur filter, when its highlight boost is 0
Color CorrectionAn Adjust Color filter
Hue/SaturationAn Adjust Color filter (hue, saturation, and lightness as brightness), unless it colorizes
GlowA Glow filter in its color, round the whole shape rather than its bright parts
OutlineA strong Glow filter, solid near the edge as the outline is
Tint, FillA tint color effect (Fill is a full tint)
LevelsA color effect, when its gamma is 1 and it narrows the range rather than stretching it
Wipes, Block DissolveNothing at 0 percent, no alpha at 100; part way, a bitmap

Only one color effect fits: a second one (or one on an instance that already has a color effect) is drawn into bitmaps. Every other effect, at a setting that changes anything, is drawn into bitmaps too.

The Output panel lists what was carried only in part.

Adjustment effects

An adjustment layer can have any number of these, applied top to bottom, each with an Amount where it makes sense; so can a single instance (see Effects on one instance). Generators and transitions are at their most useful with art on the layer: a Gradient Ramp then fills just that art, and a wipe takes away just what is under it.

EffectWhat it does
Blurs
BlurBlurs everything below evenly.
Directional BlurSmears it along one direction, as fast motion would.
Radial BlurSpins it about a point, or zooms it out from the point.
Lens BlurBlurs as an out-of-focus lens does, bright points opening into round discs.
GlowMakes the bright parts glow, in their own color or one you give.
Generators
Gradient RampA gradient between two points, linear or radial, painted over the picture or blended into it.
4-Color GradientA soft blend of four colors, one at each corner.
FillEverything drawn below in one color, keeping its shape and soft edges.
OutlineAn outline round everything drawn below, outside its edges.
Fractal NoiseClouds of soft noise that can churn over time: smoke, fog, water, a texture, or a map for Displacement Map.
Distortion
Turbulent DisplaceSmooth random swirls that change over time: heat haze, water, a dream.
Wave DisplaceWaves traveling across the picture: a flag, a reflection.
BulgeSwells the picture round a point, or pinches it in.
RippleRings of waves spreading from a point, as on water.
BendBends the picture into a curve, across or down.
Displacement MapPushes the picture about by another layer, by name: its lighter parts push one way, darker the other. Hide the map layer to keep it out of sight; it still drives the push.
Color
Color CorrectionBrightness, contrast, saturation and hue.
TintToward a color, keeping light and dark.
LevelsBlack point, white point, gamma and the range shown.
CurvesTones through a curve of input,output points, for all channels or one.
Hue/SaturationTurns the hues, and sets how strong and how light the colors are; Colorize makes it all one hue.
TritoneDarks, middles and lights mapped to three colors.
VignetteDarkens toward the edges.
GrainFilm grain, still or changing every frame.
Chromatic AberrationPulls the red and blue apart, as a cheap lens or a glitch does.
Transitions
Linear WipeWipes the picture away behind a moving edge; key Completion from 0 to 100.
Radial WipeWipes it away round a point like a clock hand.
Venetian BlindsWipes it away in stripes.
Block DissolveDissolves it in random blocks.

Effects on one instance

A symbol instance can have the same effects on its own picture, rather than on everything below a layer: an outline round one character, a glow on one sign, a ripple through one picture. Select the instance, click Effects at the top of the Behaviors panel (beside Behaviors), and use Add Effect as for an adjustment layer. With several instances selected, an effect added goes on each.

They show on the stage, in Test Movie and in every export. In other apps the instance carries them as filters and a color effect, as in the list above; when one has no counterpart, the instance is drawn into a bitmap on each frame where it changes, in its place on its layer. Scripts and AI assistants set them with set_effects and "picture": true. The lesson Effects on one instance (Help › Tutorials...) walks through it.

A contact sheet of the adjustment effects on a striped picture with a title: blurs, generators, distortions, color changes and wipes
The new effects on the same striped picture with its title: blurs, generators, distortions, color changes and wipes.

Bake to keyframes

Baking turns behaviors into ordinary animation: each frame they touch becomes a keyframe holding the instance where its behaviors put it (frames where nothing changes are held from the keyframe before, so a keyframe stays only where something moves), its copies become instances of their own beside it, and the behaviors come off. What plays does not change, and you can then edit the frames by hand. Baking is one step you can undo.

Behaviors in saved files

Behaviors are Phoenix's own. They are saved with the instance in .phx and .fla files and come back when Phoenix opens the file. Another app that opens the FLA file shows the instances as they are keyed, without the motion behaviors add; when you save, Phoenix lists behaviors among the things such an app leaves out.

To hand the file to someone using another app, choose File › Export › Export FLA for Other Apps. It writes a copy (an .fla file or an XFL folder) with every behavior in the document baked into keyframes, so the other app plays the same motion. Your document itself keeps its behaviors.

Write your own behavior

You never need to write code to use behaviors, but you can make new ones in JavaScript. A behavior is a .js file in the Behaviors folder of your script configuration folder (beside the Commands folder). Phoenix reads the folder when it starts and again whenever a file there changes, so you can edit a behavior and watch the stage follow. The built-in behaviors are written the same way.

To start one, click Add Behavior and choose New Behavior...: Phoenix writes an example like the one below under the name you give and opens it in the script editor. Open Behaviors Folder shows where they are kept. The lesson Write your own behavior (Help › Tutorials...) walks through it.

behavior({
    name: "Drift",
    description: "Floats slowly to one side.",
    params: {
        speed: { label: "Pixels per second", value: 20, min: -500, max: 500 },
        bob: { label: "Bob (pixels)", value: 4, min: 0, max: 50 }
    },
    evaluate: function (ctx, p) {
        return {
            x: p.speed * (ctx.frame - ctx.start) / ctx.fps,
            y: Math.sin(ctx.time * 2) * p.bob
        };
    }
});

Each entry under params becomes a control in the Behaviors panel. Its type is "number" (the default, a slider from min to max by step), "angle", "checkbox", "choice" (with a choices list) or "seed"; value is where it starts and label what the panel calls it.

evaluate is called for each frame with the settings as p and what it needs to know as ctx:

In ctxWhat it is
frame, time, fpsThe frame (from 0), the time in seconds and the frame rate.
start, endThe first and last frames of the run of keyframes the instance is on.
keyedWhat its keys give it now: x, y (its transformation point), rotation, scaleX, scaleY and alpha.
keyedAt(frame)The same on another frame of the run, or null.
random(n), noise(t, n)A number from 0 to 1, and a smooth one from -1 to 1 that changes with t; both follow the seed and differ from copy to copy, and n picks a separate stream.
pathThe motion guide's line, or null: its length, and at(distance), the x, y and angle there.
other(name, frame)Another instance on the timeline, by its instance name, as its keys and its own behaviors leave it (on this frame, or frame), or null.
controller(name)A master controller's value from 0 to 1, or null.
parentAt(frame, x, y)Where the layers it is parented to put the point (x, y) on a frame, as {x, y}: the world its keys live in.
loudness(frame)How loud the scene's sound is on this frame (or frame), from 0 for silence to 1 for its loudest moment.
spectrum(frame)The scene's sound on this frame as 32 bands from low notes to high, each from 0 to 1.
waveform(frame)The scene's sound's wave over this frame as 64 points, each from -1 to 1.
control(holder, name)A control on the instance named holder (see Controls on a null): a number, {x, y}, "#RRGGBB", or true or false; null when there is none.
currentWhat the behaviors above it have done so far to this copy.
copy, copiesWhich copy this is, from 0, and how many there are, after the behaviors above it made them.

It returns what to add: x and y in pixels, rotation in degrees, scale, scaleX and scaleY as factors (1 is no change), alpha as a factor, and frame, the frames a graphic's loop runs on by. Leave out what it does not change. To make copies, return { copies: [...] }, a list of those, one for each copy. Settings can be keyed in the panel, and p always holds their values on the frame being worked out. A file named like a built-in one (wiggle.js) takes its place.

Behaviors run on their own, away from the document: they cannot read files, the clock or anything but what ctx offers, and one that takes too long is stopped. That keeps every frame the same each time it is drawn. An error is shown in the Output panel, and the behavior adds nothing until it is fixed.