How can IR.CreateEffect be used?

rocfusion 8 years ago in iRidium Script updated by Ekaterina (head of support) 8 years ago 2


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.




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)