Материал из Module developer
module.CreateEffect
Create an animation effect that starts at app launch and use it to show and hide popup.
Синтаксис
var name = module.CreateEffect(Type)
| Название | Пример | Описание |
| name | name | type: string Variable name for saving a group of effects (required to assign a number and other parametres to a group) |
| Type | IR.EFFECT_FADE | type: Object Тип эффекта |
| На выходе |
| Object | [Object EffectPrototype] | type: Object A link to a group of animation effects |
Пример
var Fade = module.CreateEffect(IR.EFFECT_FADE); // create a group and save it in the variable Fade.Group = 1000; // assign a group number Fade.Delay = 0; // a delay in performing effects Fade.Duration = 400; // effect duration Fade.Tween = 0; // a formula to calculate an effect (tween) module.ShowPopup("Popup 1", 1000) // show a popoup with effects from group 1000
Effects:
- IR.EFFECT_FADE - appearing / disappearing;
- IR.EFFECT_ROTATE - 360 degree rotation, the rotation center is the popup middle;
- IR.EFFECT_SCALE - increasing / decreasing;
- IR.EFFECT_SLIDE - movement from side to side;
- IR.EFFECT_TVSCAN - horizontal compression;
Effect properties:
- Group (number) - the number of a group of effects where the effect is located. We recommend using group numbers starting from 1000. It will prevent you from repeating the group numbers creted by the studio. In case you want to add groups of effects created dynamically to groups of effects created in the studio, use it consciously.
- Delay (number, ms) - delay before an effect;
- Duration (number, ms) - effect duration ;
- Tween (number) - calculation formula
