Dynamic Blend (dynBlend v1.1.3)
Component description:
This Flash MX component allows you to build blend groups based on your symbols.
It can be used as a component in Flash MX only, but the resulting movie can also be published as Flash 5.
Uses standard actions which are already available in Flash 5.
Blend groups can be used to create custom gradients, distribute a number of objects to some
space, create visual effects, etc.
It acts similar to “Blend” tools in CorelDRAW or Freehand, but, unlike them, builds blend
groups dynamically, e.g. as a movie is playing. As a result, it will help to create very
small flash files (good for preloaders).
It is strongly recommended that you learn something about using Blend tools in a program like
Freehand - it will help to use this component more efficiently.
To make a blend group, follow these steps:
- Create a movie clip from which you want to build a blend.
- Set Linkage identifier for this movie clip. To do this, right-click movie clip in the
library, choose “Linkage…”, check “Export for Actionscript” flag.
- Place back and front movie clips on the scene and assign instance names to them. Usually
these movie clips are instances of the symbol you have just set Linkage for.
- If you want to use Blend Colors feature, modify colors of these two movie clips by
using Color > Advanced dialog from the Properties panel. You can modify just transparency
(Alpha) for each of them, without changing colors.
- Place an instance of dynBlend movie clip on the scene.
Note: two base objects and their
dynBlend movie clip must be placed at the same level of your movie (or enclosed within the
same parent clip) to work properly. You can, however, place several such “groups” to one
level (or into one parent clip).
- Open Properties panel for dynBlend movie clip. Click Parameters tab
- Enter required information into fields: Number of steps, names of back and front
instances, Linkage identifier for blend clip.
- Check Blend Colors if needed (checked by default).
- Check Hide this clip if you don't want the dynBlend clip to be visible in resulting movie (checked by default).
- Publish your movie to see the result. Play with values to get desired results.
You can also dynamically:
- Move, rotate and scale one or two of your base objects;
- Change their colors or Alpha while the movie is playing;
and then rebuild blend group using buildBlend() method.
Note, however, that, as this script uses a lot of calculations, it’s not recommended to
rebuild blend group frequently (e.g. by onEnterFrame event), as this can slow the movie on
old computers.
You can download this HTML tutorial with all swf samples (10 kb zip file)
Acknowledgments
I would like to thank Bethany Nash for her assistance with this component and this help file.
I also thank a lot Shane Hunt for his great book - Coreldraw 8 F/X: Inventive Techniques & Outrageous Effects, which taught me all these blend tricks.
|