class Shortcuts
extends Object
Pass this class to ZigoEngine.register or ZigoEngine.simpleSetup to enable tween-shortcut functionality and 'easyfunc' callback parsing.
Usage:
Example 1: You can use shortcut syntax without modifying prototypes or targets.
Example 3: Use simpleSetup instead of register to modify prototypes for classic lmc_tween style usage. Remember that any setup command only needs to be called once at the beginning of your program.
import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup(Shortcuts, PennerEasing);
my_mc.brightOffsetTo(200, 1, 'easeOutElastic');
// If you also pass FuseItem during simpleSetup,
// you can use Object Syntax with the tween shortcut:
my_mc.tween({ start_x:"-100", start_y:"-100", ease:"easeInOutBack", time:1.5 });
Shortcut methods are variations on ZigoEngine.doTween syntax and return a formatted string indicating properties successfully tweened. In each method listed below target refers to whatever MovieClip or TextField you wish to tween.
Shortcut Properties:
If you've extended prototypes with ZigoEngine.simpleSetup, you may use these the same as normal properties like _x:
my_mc._brightness = 50;
_brightness (See brightnessTo)
_brightOffset (See brightOffsetTo)
_colorReset (See colorResetTo)
_colorTransform Accepts or returns a generic color-transform object with properties like ra, rb, etc. (See colorTransformTo)
_contrast (See contrastTo)
_fade A proxy for _alpha that sets _visible false for any value less than 50, typically used with 0 or 100 values.
_frame Sets or retrieves the current frame of a MovieClip's timeline.
_invertColor (See invertColorTo)
_scale Sets _xscale and _yscale to the same value.
_size Sets _width and _height to the same value.
_tint Accepts 0x000000 or "#000000" formats. Returns a color-value number.
_tintPercent Sets or retrieves the tint percentage of a target that has had its color altered previously.
_tintString Like _tint, but returns a human-readable hex-string like "0xFF33FF" easily converted to a usable color value using Number().
Generates a simple curved path. Supports relative (string) values; use "0" for x or y to affect no change, use null for controlX or controlY to auto-center the control point. In this way a curve can be generated with only two values, like this arc that hops up-then-down while sliding right: my_mc.bezierTo("200","0",null,"-50");
Use 100 to fully restore a target's colors to normal. (For most color effects a positive number less than 100 can be passed to affect a partial change.)
Tweens specific properties of a color-transform. Supports relative (string) values or pass null to affect no change on that property. The "a" values are percentages while "b" values are -255 to 255 offsets.
(retained for compatibility with earlier versions)
target.stopTween (props:Object):Void
target.stopAllTweens ():Void
target.unpauseTween (props:Object):Void
target.unpauseAllTweens ():Void
FuseFMP tweening shortcuts
For use with FuseFMP and ZigoEngine.simpleSetup (prototype extension) only. The format follows the convention short-filtername+"_"+filter property+"To".
FuseFMP property formatting follows the convention: short-filtername+"_"+filter property.
Example with ZigoEngine.register (see FuseFMP for more info):
Example 2: You can copy and remove shortcut methods to individual targets without modifying prototypes.
Example 3: Use simpleSetup instead of register to modify prototypes for classic lmc_tween style usage. Remember that any setup command only needs to be called once at the beginning of your program.
Shortcut methods are variations on ZigoEngine.doTween syntax and return a formatted string indicating properties successfully tweened. In each method listed below
target
refers to whatever MovieClip or TextField you wish to tween.Shortcut Properties:
If you've extended prototypes with ZigoEngine.simpleSetup, you may use these the same as normal properties like_x
:_brightness
(See brightnessTo)_brightOffset
(See brightOffsetTo)_colorReset
(See colorResetTo)_colorTransform
Accepts or returns a generic color-transform object with properties like ra, rb, etc. (See colorTransformTo)_contrast
(See contrastTo)_fade
A proxy for _alpha that sets _visible false for any value less than 50, typically used with 0 or 100 values._frame
Sets or retrieves the current frame of a MovieClip's timeline._invertColor
(See invertColorTo)_scale
Sets _xscale and _yscale to the same value._size
Sets _width and _height to the same value._tint
Accepts 0x000000 or "#000000" formats. Returns a color-value number._tintPercent
Sets or retrieves the tint percentage of a target that has had its color altered previously._tintString
Like _tint, but returns a human-readable hex-string like "0xFF33FF" easily converted to a usable color value usingNumber()
.Property-Tweening Shortcut Methods:
Tweens_alpha
. Supports relative (string) end-value. Generates a simple curved path. Supports relative (string) values; use"0"
forx
ory
to affect no change, usenull
forcontrolX
orcontrolY
to auto-center the control point. In this way a curve can be generated with only two values, like this arc that hops up-then-down while sliding right:my_mc.bezierTo("200","0",null,"-50");
Automatically sets the target's_visible
property to true, then tweens_alpha
to 100. Tweens_alpha
to 0 then automatically sets the target's_visible
property to false. MovieClip only: tweens the clip's timeline to the desired frame. Tweens_rotation
. Supports relative (string) end-value, such as this counter-clockwise rotation:my_mc.rotateTo("-90");
Tweens_xscale
and_yscale
to the same value. Supports relative (string) end-value. Tweens_width
and_height
to the same value. Supports relative (string) end-value. Tweens_x
and_y
. Supports relative (string) values; use"0"
ornull
to affect no change for either coordinate.Color-Tweening Shortcut Methods:
Tweens brightness between -100 (black), 0 (normal) and 100 (white) Tweens a burn effect between -100 (black), 0 (normal) and 100 (white) Tweens a clip's color. Accepts 0x000000 or "#000000" formats. Use 100 to fully restore a target's colors to normal. (For most color effects a positive number less than 100 can be passed to affect a partial change.)Tweens specific properties of a color-transform. Supports relative (string) values or pass
null
to affect no change on that property. The "a" values are percentages while "b" values are -255 to 255 offsets. Tweens photo contrast between 0 (gray), 100 (normal), or higher (200 for extreme contrast, higher to posterize image). Supports relative (string) end-value. Photo-negative effect from 0-100. Supports relative (string) end-value. Similar tocolorTo
, with a tint-percentage value in the second parameter. Supports relative (string) end-value for percentage. Tweens the tint percentage of a target that has had its color altered previously. Supports relative (string) end-value.Tween Control Methods:
(see similar methods in ZigoEngine for additional info.)Legacy Methods:
(retained for compatibility with earlier versions)FuseFMP tweening shortcuts
For use with FuseFMP and ZigoEngine.simpleSetup (prototype extension) only. The format follows the convention short-filtername+"_"+filter property+"To".FuseFMP Shortcut Methods
(see similar methods in FuseFMP for additional info.)FuseFMP Shortcut Properties: Blur_blurX, etc.
FuseFMP property formatting follows the convention: short-filtername+"_"+filter property.Example with ZigoEngine.register (see FuseFMP for more info): If ZigoEngine.simpleSetup is used you may also get/set properties directly on a target: (Note that this is an optional feature of FuseFMP that may be used without ZigoEngine.)
Methods and properties of this class are excluded here - see class file for further documentation.