# Add transition blind to xml image gallery

**URL:** <https://forum.kirupa.com/t/add-transition-blind-to-xml-image-gallery/287991>\
**Category:** Uncategorized\
**Created:** [May 8, 2009, 11:20pm UTC](https://forum.kirupa.com/t/add-transition-blind-to-xml-image-gallery/287991 "2009-05-08T23:20:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nwglow](https://avatars.discourse-cdn.com/v4/letter/n/f1d935/32.png) [@nwglow](https://forum.kirupa.com/u/nwglow)\
**Post date:** [May 8, 2009, 11:20pm UTC](https://forum.kirupa.com/t/add-transition-blind-to-xml-image-gallery/287991/1 "2009-05-08T23:20:55Z")

</div>

Hi,  
I’m able to add Photo transition to the image gallery, but when I change the transition to blinds, it doesn’t work. What is wrong with the code?

Code for Photo Transition  
//------------------transition----------------------------\  
//in order to hold transitions, it needs a mc to hold picLoader;  
import fl.transitions._;  
import fl.transitions.easing._;

var fullContainer:MovieClip = new MovieClip();  
var tm:TransitionManager = new TransitionManager(fullContainer);  
var trans\_obj:Object = new Object();  
\*\* trans\_obj.type=Photo;  
trans\_obj.direction=Transition.IN;  
trans\_obj.duration=1;  
trans\_obj.easing=None.easeNone;\*\*  
//------------------transition----------------------------\  
var thLoader:Loader;  
var picLoader:Loader;

var xml:XML;  
var xmlList:XMLList; //treats XMLlist as an array  
var xmlLoader:URLLoader = new URLLoader();  
xmlLoader.load(new URLRequest(“data/images.xml”));

xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);

// use name property to connect thumbnail images to full size images  
function xmlLoaded(e:Event):void {  
xml = XML(e.target.data);//xml as XML  
xmlList = xml.children();

```
for (var i:int=0; i &lt; xmlList.length(); i++) {
    thLoader = new Loader();
    thLoader.load(new URLRequest(xmlList*.attribute("thumb")));
    thLoader.x = 25;
    thLoader.y = i * 75 + 25; 
    thLoader.name = xmlList*.attribute("source");
    addChild(thLoader);
    thLoader.addEventListener(MouseEvent.CLICK, showPic);
}

```

}

//click thumbnail and show picture;  
function showPic(e:MouseEvent):void {  
picLoader = new Loader();  
picLoader.load(new URLRequest(e.target.name));  
picLoader.x = 100;  
picLoader.y = 25;

```
addChild(fullContainer);
fullContainer.addChild(picLoader);
tm.startTransition(trans_obj);

```

}

===============================================  
the only difference for the blinds transition I made are

\*\* trans\_obj.type=Blinds;  
trans\_obj.direction=Transition.IN;  
trans\_obj.duration=2;  
trans\_obj.easing=None.easeNone;  
trans\_obj.numStrips=12;  
trans\_obj.dimension=1;\*\*
