# I cant load image transitions using this xml actionscript

**URL:** <https://forum.kirupa.com/t/i-cant-load-image-transitions-using-this-xml-actionscript/264128>\
**Category:** flash\
**Created:** [June 23, 2008, 1:59pm UTC](https://forum.kirupa.com/t/i-cant-load-image-transitions-using-this-xml-actionscript/264128 "2008-06-23T13:59:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wdv](https://avatars.discourse-cdn.com/v4/letter/w/9fc29f/32.png) [@wdv](https://forum.kirupa.com/u/wdv)\
**Post date:** [June 23, 2008, 1:59pm UTC](https://forum.kirupa.com/t/i-cant-load-image-transitions-using-this-xml-actionscript/264128/1 "2008-06-23T13:59:26Z")

</div>

var thumb\_spacing = 40;  
// load variables object to handle loading of text  
var description\_lv = new LoadVars();  
description\_lv.onData = function(raw\_text){  
description\_txt.text = raw\_text;  
}  
function GeneratePortfolio(portfolio\_xml){  
var portfolioPictures = portfolio\_xml.firstChild.childNodes;  
for (var i = 0; i \< portfolioPictures.length; i++){  
var currentPicture = portfolioPictures\*;

var currentThumb\_mc = menu\_mc.createEmptyMovieClip(“thumbnail\_mc”+i,i);  
currentThumb\_mc.\_x = i \* thumb\_spacing;

currentThumb\_mc.createEmptyMovieClip(“thumb\_container”,0);  
currentThumb\_mc.thumb\_container.loadMovie(currentPicture.attributes.thumb);

currentThumb\_mc.title = currentPicture.attributes.title;  
currentThumb\_mc.image = currentPicture.attributes.image;  
currentThumb\_mc.description = currentPicture.attributes.description;

currentThumb\_mc.onRollOver = currentThumb\_mc.onDragOver = function(){  
info\_txt.text = this.title;  
}  
currentThumb\_mc.onRollOut = currentThumb\_mc.onDragOut = function(){  
info\_txt.text = “”;  
}  
currentThumb\_mc.onRelease = function(){  
image\_mc.loadMovie(this.image);  
description\_lv.load(this.description);  
}  
}  
}  
function loadTheImage (e):void {  
TransitionManager.start(image\_mc, {type:Wipe, direction:Transition.IN, duration:3, easing:None.easeNone, startPoint:1});  
}  
loader.contentLoaderInfo.addEventListener([Event.CO](http://Event.CO) MPLETE,loadTheImage);  
// xml object for xml content (defines sources for selections)  
var portfolio\_xml = new XML();  
portfolio\_xml.ignoreWhite = true;  
portfolio\_xml.onLoad = function(success){  
if (success) GeneratePortfolio(this);  
else trace(“Error loading XML file”); // no success? trace error (wont be seen on web)  
}  
// load  
portfolio\_xml.load(“portfolio.xml”);

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [June 23, 2008, 2:02pm UTC](https://forum.kirupa.com/t/i-cant-load-image-transitions-using-this-xml-actionscript/264128/2 "2008-06-23T14:02:41Z")

</div>

at a wild guess, Intialised is when you want it not complete

loadClip is better than loadMovie for this sort of thing as it has own listerner

---

<div class="post-metadata">

**Author:** ![wdv](https://avatars.discourse-cdn.com/v4/letter/w/9fc29f/32.png) [@wdv](https://forum.kirupa.com/u/wdv)\
**Post date:** [June 23, 2008, 2:14pm UTC](https://forum.kirupa.com/t/i-cant-load-image-transitions-using-this-xml-actionscript/264128/3 "2008-06-23T14:14:40Z")

</div>

huh? im not that great with xml, actually i suck, could u show me what I would have to change?

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [June 23, 2008, 2:20pm UTC](https://forum.kirupa.com/t/i-cant-load-image-transitions-using-this-xml-actionscript/264128/4 "2008-06-23T14:20:40Z")

</div>

_reaches for suicide pill_

from the code you want a button which loads an image with a transistion effect on it

nothing to do with xml really,

as long as the images load 😜

you load them with loadClip(), and when its “Int’d” you run your tween effect

---

<div class="post-metadata">

**Author:** ![wdv](https://avatars.discourse-cdn.com/v4/letter/w/9fc29f/32.png) [@wdv](https://forum.kirupa.com/u/wdv)\
**Post date:** [June 23, 2008, 2:59pm UTC](https://forum.kirupa.com/t/i-cant-load-image-transitions-using-this-xml-actionscript/264128/5 "2008-06-23T14:59:12Z")

</div>

thanks
