0
Отвечен

How can IR.CreateEffect be used?

rocfusion 9 лет назад в iRidium Script обновлен Ekaterina (head of support) 9 лет назад 2

Hi,


In the wiki there is an simple explanation for using IR.CreateEffect for Fading a popup. http://wiki2.iridiummobile.net/Systems_API#Create_Effects


How Is it possible in script to specify the type of animation and for when it happen ( on show and on hide )? ie could a do something like use the slide effect to slide from the left when showing the popup and slide out to the right when hiding the popup.



Thanks,



Roger

Отвечен

Please read more about animation here: http://dev.iridiummobile.net/JS_Guide/en#Library_of_Animation


You can create some effect before call the popup, like it shown in sample

IR.AddListener(IR.EVENT_START, 0, function()
{
  // create effect, add in variable
	var Fade = IR.CreateEffect(IR.EFFECT_FADE);
	Fade.Group = 1000;	// assign number of group
	Fade.Delay = 0;		// choose delay
	Fade.Duration = 400;  	// choose duration of effect
	Fade.Tween = 0; 	// coose tweener
  // show popup with created effect
	IR.ShowPopup("Popup 1", 1000)
});

http://dev.iridiummobile.net/Systems_API/en#IR.CreateEffect

Сервис поддержки клиентов работает на платформе UserEcho