Passing tween value into (this sprite/current layer/current layout) effect to control the result of effect.
1. add tween behavior , user could use lite tween or tween (the older version of tween behavior). Then add tween2effect behavior under tween behavior.
2. configure tween behavior, user need to set tweened properties to "Value".
3. configure properties of tween2effect.
Name: the name of controlled effect
Index: the parameter index of controlled effect
In the demo capx, Index to 3 will pass the tween value into "R Replace" parameter.
Target: set to "Instance" to control this sprite.
Now user could control the effect by setting the tween behavior without adding any event.
Each tween2effect will need to add one tween behavior above that. In the demo capx, user need to add 3 pairs of tween and tween2effect
[/ul]to control the "R Replace", "G Replace", "B Replace" at the same time.
Set the property "Target" to "Layer" could control the parameter of the effect at current layer, since the behavior will be put in a sprite (or a rex_layer object) and this sprite will be put in a layer.
Set the property "Target" to "Layout" could control the parameter of the effect at current layout.
Make sure that the effect had been added in the target (layer, layout, or sprite).rexrainbow2014-01-29 04:07:46