# Trying to Iris mx:Transition to a random slideshow

**URL:** <https://forum.kirupa.com/t/trying-to-iris-mx-transition-to-a-random-slideshow/301539>\
**Category:** flash\
**Created:** [December 10, 2009, 11:38pm UTC](https://forum.kirupa.com/t/trying-to-iris-mx-transition-to-a-random-slideshow/301539 "2009-12-10T23:38:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikki65](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mikki65](https://forum.kirupa.com/u/mikki65)\
**Post date:** [December 10, 2009, 11:38pm UTC](https://forum.kirupa.com/t/trying-to-iris-mx-transition-to-a-random-slideshow/301539/1 "2009-12-10T23:38:33Z")

</div>

Hi All,  
I am building a web banner with a slideshow with random picts via xml,  
but i want to use a iris transition _**[COLOR=Red]to fade in[/COLOR]**_ while getting the pict, and fade out with the iris transition, the last action works but when getting i cannot get the transition to work below is a piece of the code:

}  
function randomImage() {  
if (loaded == filesize) {  
var ran = Math.round(Math.random() \* (totalImages - 1));  
picture\_mc.\_alpha = 0; // Start image clip as invisible  
picture\_mc.loadMovie(imageFileName[ran], 1); //Load random image from xml  
var pictureTweenIn:Tween = new Tween(picture\_mc, “\_alpha”, Normal.easeIn, 0, 100, 4, true);//[COLOR=Red]works[/COLOR]!  
mx.transitions.TransitionManager.start(picture\_mc, {type:mx.transitions.Iris, direction:mx.transitions.Transition.OUT, duration:3, easing:mx.transitions.easing.Regular.easeInOut});//[COLOR=Red]does not work… [/COLOR]  
pictureTweenIn.onMotionFinished = function () { // When done fading  
\_root.pause(); // Start pause() function  
}  
}

If anyone can help me out this would be great!
