Animation Library
1. Add the Script to your proejct Add > Add Script from File:
Animation_Release.js
2. Create a new script Add > New Script
3. Write the special method Animation ()
4. The Animation method has parameters:
- Effects (array or one item)
- Items (array or one item)
- Duration (number)
- Delay (number)
- Repeat (bool)
- Type of the Tween (number)
5. Syntax:
Animation (Effects , Items, Duration, Delay, Repeat, Tween);
6. Available Effects in the Library:
- MoveHorrizontal
- MoveVertical
- MoveDiagonal
- Rotate
- Show
- Hide
- ScaleXY
- ScaleX
- ScaleY
- Value
- Text
- Value_to_Text
Syntax example wrth array of effects:
Animation ([Rotate (300), MoveHorrizontal (10, 400) ], Items, Duration, Delay, Repeat, Tween);
7. Syntax example wrth array of items and effects:
Animation ([Rotate (300), MoveHorrizontal (10, 400) ], [Item_1, Item_2 ], Duration, Delay, Repeat, Tween);
8. Set Duration 3000 ms:
Animation ([Rotate (300), MoveHorrizontal (10, 400) ], [Item_1, Item_2 ], 3000, Delay, Repeat, Tween);
9. Set Delay 1000 ms:
Animation ([Rotate (300), MoveHorrizontal (10, 400) ], [Item_1, Item_2 ], 3000, 1000, Repeat, Tween);
10. Set Repeat:
Animation ([Rotate (300), MoveHorrizontal (10, 400) ], [Item_1, Item_2 ], 3000, 1000, LOOP, Tween); // to Repeat
Animation ([Rotate (300), MoveHorrizontal (10, 400) ], [Item_1, Item_2 ], 3000, 1000, NOT_LOOP, Tween); // to Once Run
11. Type of tweens:
- LINEAR = 0;
- SINE_IN = 1;
- SINE_OUT = 2;
- SINE_IN_OUT = 3;
- QUINT_IN = 4;
- QUINT_OUT = 5;
- QUINT_IN_OUT = 6;
- QUART_IN = 7;
- QUART_OUT = 8;
- QUART_IN_OUT = 9;
- QUAD_IN = 10;
- QUAD_OUT = 11;
- QUAD_IN_OUT = 12;
- EXPO_IN = 13;
- EXPO_OUT = 14;
- EXPO_IN_OUT = 15;
- ELASTIC_IN = 16;
- ELASTIC_OUT = 17;
- ELASTIC_IN_OUT = 18;
- CUBIC_IN = 19;
- CUBIC_OUT = 20;
- CUBIC_IN_OUT = 21;
- CIRC_IN = 22;
- CIRC_OUT = 23;
- CIRC_IN_OUT = 24;
- BOUNCE_IN = 25;
- BOUNCE_OUT = 26;
- BOUNCE_IN_OUT = 27;
- BACK_IN = 28;
- BACK_OUT = 29;
- BACK_IN_OUT = 30;
Animation [Rotate (300), MoveHorrizontal (10, 400) ], [Item_1, Item_2 ], 3000, 1000, NOT_LOOP, EXPO_IN );
12. Пример:
Download