| Frames (Show Nav) | No Frames |
Fuse Kit は核となる堅牢なアニメーションエンジンと、それを補助する多くの便利なツールで構成されています。
Fuse Kit は、ニッチなニーズに特化させるのではなく、初心者からオブジェクト指向の達人までの全ての Flash ユーザーの役に立てるように、汎用的なツールとして作られています。 ± 詳細
Regular programmers will find a sturdy, tight feature set, with beginner features conveniently separated out for exclusion. Beginners should start with those extra features, like Shortcuts, which are easy to learn even with no programming experience. Almost every feature of the kit is available using beginner options, including some very advanced functionality, the decision is in how you prefer to work.
The Fuse Kit contains an extra set of Shortcuts features modeled on L. Zigo's lmc tween system, that you'll want to start with.
Using the ZigoEngine you can generate graceful motions and color transformations with simple commands right on MovieClips and other targets. For example if you name a clip
myStaryou can make the star spin by writing,myStar.rotateTo(360);.FuseFMP adds the ability to generate and animate filters easily:
myStar.Glow_strengthTo(35);is clearly a tween for a Glow filter's strength parameter. FuseFMP is also a useful standalone utility for customizing filters, you don't have to use the engine to use it.If your work demands more than just a tween here and there, you'll next want to explore Fuse, starting with its Simple Syntax option. Fuse lets you build complex layered motion sequences, just as you would in a timeline. Starting to do this is as easy as wrapping a few shortcut tweens in some simple open and close commands, causing the tweens to run back to back instead of at once. You can get more advanced with grouped tweens, advance-triggers and function-calls, as your needs progress.
The ZigoEngine class provides a single core manager for all programmatic tweens in a SWF.
FuseFMP is a standalone utility for BitmapFilter management that can be optionally registered in the engine to enable tweening filters as natural pseudo-properties like "Blur_blurX".
Fuse is a sequencing utility primarily for use with the engine, although it can be used without if you only plan to sequence timed events and function-calls without animation. Fuse provides a clear, time-based format called Object Syntax for sequencing program events, while avoiding the pitfall of needing to hard-code values in advance. It can clean up your classes by wrapping verbose, scattered code into tight, bare-bones instruction lists that tuck neatly into a single method.
The Shortcut feature-set is optional, and can be used without altering base class prototype objects.
キットの 機能概要や、サンプルコードについては、ウェブサイトから入手できる PDF: "Using Fuse" - a primer in plain English を読んで下さい。
± The ZigoEngine class は swf 内で一局管理しつつ、あらゆる動的なトゥイーンを管理してくれます。
- The engine's format is that of a single compact automaton, efficiently spinning through any number of tweens, then shutting itself off when not in use. ± more
- When you make a tween call, an internal animation object is built, managed throughout its duration, then automatically removed on completion.
- This means you don't have to create and manage multiple tween-handling objects yourself, as you do with the mx Tween class.
- Centralization makes the engine fast and efficient, which can run hundreds of animations at once. It is architected for speed, attempting to overcome the processing limitations of AS2.
- Shortcut tweens are not part of the ZigoEngine class. They are an optional feature. ± more
- Tween calls are made directly on a target itself, like
myButton.fadeOut();which is a more intuitive way to code for beginners (but can be used by anyone).- Advanced coders can also choose to add & remove shortcuts on specific targets without modifying base class prototypes, and make tween calls in shortcut formatting via doShortcut.
- Besides dispatching events at each tween's start, update and end, ZigoEngine also features built-in callback functionality, making it very easy to fire single functions without listeners.
- You can tween a timeline's playhead using the engine's _frame property. However, beyond this it's recommended that you don't try to mix engine tweens with timeline tweens in the same scope, as this will often cause timeline tweens to fail.
- ZigoEngine alone adds about 10kb to your swf when trace actions are omitted in publish settings.
± The Fuse sequencer は長く複雑になりがちなトゥイーンやイベントの時間管理のためのツールです。
- Everything that can be done in Fuse can be done in other ways; the magic of Fuse is its ability to reduce and simplify your code. Fuse is best utilized for applications that need to mix motion with programmatic content or dynamic elements. ± example
- A great application for Fuse might be a demo or slide-show app with complex transitions that need to mold themselves to different image sizes at runtime.
- Fuse is NOT the same thing as ZigoEngine. Don't use Fuse for individual tweens like rollovers! ± Why?
- It is bad practice to create a new Fuse() every time the user rolls over a button, and will bloat player memory. If ZigoEngine tweens are essentially free, Fuses are more ± expensive.
- Be conservative. Reuse Fuses when you can: Play and stop any Fuse as often as you want. Destroy instances or set them to auto-clear when they won't be reused.
- A Fuse provides a second tier of management that wraps the engine. This adds complexity. ± Under the hood..
- When you build a Fuse, each action is converted and parsed into a new FuseItem instance internally.
- When played, FuseItems further parse actions and actively generate tweens, calculating missing end-values and creating safety nets for any events that are left dangling in the process. They mirror and closely track each tween's details in an internal list, setting boolean end-values and handling any additional events assigned to that action block before finally triggering sequence advance.
- All of this, plus the dispatching of events like onStart, onAdvance and onComplete, is at work at runtime in every single Fuse.
- UI & gaming tweens need to be fast, responsive, and ultra-temporary. While the engine can handle rapid-fire overlapping, interruption and stripping of tweens, you don't want to force a bunch of addtional Fuse manager objects into the mix when they aren't needed.
- Fuse has a distinct advantage over the engine though when it comes to more complex sequencing: it enables compact and legible code. Situations where Fuse is truly well-fitted usually allow for (and welcome) its extra management layer and functionality — just use it wisely.
- Fuse's standard usage is called Object Syntax, because you use Objects and Arrays to define action lists. Actions are composed of animation and event elements. ± more
{ start_scale:200, delay:.5 }is an ± action object.
- One of this syntax's great strengths is its legibility. By enumerating each property in an action object like this one, you have essentially noted exactly what you want to happen in the clearest, most concise language — arguably even trumping XML for brevity and certainly for tying directly into your code base.
- Unlike traditional method-calls which can resemble lengthy, confusing argument-lists once written, Fuse action Objects are self-explanatory on a return visit.
- Fuse starts there, then adds many useful ± features
- Simply group actions into an Array to play them in parallel, most concisely just use square brackets.
- Fuse's smart parsing helps you avoid hard-coding your sequences. You can set any value to be retrieved as the action executes at runtime in the sequence! It also lets you omit many details that can be otherwise surmised, slimming down actions even further. The action object above actually translates to, "Start x and y scale at 200, and after half a second tween them back to 100 using default easing and duration" — all that with just two properties enumerated.
- Fuse is excellent for dealing with time-based program events, and mixing them with animation. Besides triggering scoped callbacks, you can even fire custom events from any Fuse, as easily as adding a parameter like
event:"something"to any action.- You can add Object Syntax parsing to ZigoEngine for one-off doTween() calls, even without including the Fuse class (by registering FuseItem).
- Fuse has a secondary option called Simple Syntax, which was originally designed to give beginning coders a simple way to be able to chain shortcut-tweens into sequences. ± more
- Simple Syntax is a small collection of static methods in the Fuse class. It works by "intercepting" tween calls after Fuse.open has been called, building Fuses in the background.
- It has also proved helpful for programmers by providing a highly legible alternative syntax for building sequences of timed function-calls, for instance to run a program setup routine.
- Fuse is not a total replacement for Flash's timeline. ± more
- Don't be afraid to use the timeline when it makes more artistic or production sense to get a job done. When code would be more manageable or flexible, use Fuse.
- A fantastic production trick is to combine the strengths of the two environments. Build more complex visual layouts inside class-bound MovieClips, naming each guide subclip. These guides can then be accessed in your class code (either read once for size and position and then toggled off, or directly manipulated), thus combining the visual layout strengths of the timeline with the runtime flexibility of programming.
- For information on Fuse and asynchronous events, see the Fuse constructor documentation.