# Scrolling image from xml in flash

**URL:** <https://forum.kirupa.com/t/scrolling-image-from-xml-in-flash/188941>\
**Category:** Uncategorized\
**Created:** [May 11, 2006, 11:57pm UTC](https://forum.kirupa.com/t/scrolling-image-from-xml-in-flash/188941 "2006-05-11T23:57:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![factisk](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@factisk](https://forum.kirupa.com/u/factisk)\
**Post date:** [May 11, 2006, 11:57pm UTC](https://forum.kirupa.com/t/scrolling-image-from-xml-in-flash/188941/1 "2006-05-11T23:57:53Z")

</div>

Hi, I was just using kirupa’s scrolling thumbnail and xml gallery script and wanted to try something similar with the actual images.

I have a long poster image that I wanted the user to be able to scroll through using the hit\_left and hit\_right method of kirupa’s thumbnails but I can’t get the single image to scroll using the same script.

I tried to modify the script into a button that calls my xml image link but I’m not sure what to do with it next.

The script for it so far is here:

manifesto\_btn.onRelease = function() {  
if (p=0) {  
picture.\_alpha = 0;  
picture.loadMovie(image[p+9], 1);  
title\_txt.text = title[p+9];  
desc\_txt.text = description[p+9];  
current\_pos = 10;  
pos\_txt.text = current\_pos+" / "+total;

function imageScroller() {  
scroll\_speed = 10;  
if ((\_root.\_ymouse\>=picture.\_y) && (\_root.\_ymouse\<=thumbnail\_mc.\_y+picture.\_height)) {  
if ((\_root.\_xmouse\>=(hit\_r.\_x-40)) && (picture.hitTest(hit\_r))) {  
picture.\_x -= scroll\_speed;  
} else if ((\_root.\_xmouse\<=350) && (picture.hitTest(hit\_l))) {  
picture.\_x += scroll\_speed;  
}  
}  
};

} else {

p=0;  
picture.\_alpha = 0;  
picture.loadMovie(image[p+9], 1);  
title\_txt.text = title[p+9];  
desc\_txt.text = description[p+9];  
current\_pos = 10;  
pos\_txt.text = current\_pos+" / "+total;

function imageScroller() {  
scroll\_speed = 10;  
if ((\_root.\_ymouse\>=picture.\_y) && (\_root.\_ymouse\<=thumbnail\_mc.\_y+picture.\_height)) {  
if ((\_root.\_xmouse\>=(hit\_r.\_x-40)) && (picture.hitTest(hit\_r))) {  
picture.\_x -= scroll\_speed;  
} else if ((\_root.\_xmouse\<=350) && (picture.hitTest(hit\_l))) {  
picture.\_x += scroll\_speed;  
}  
};  
}  
};  
}

* * *

Thanks for any help or suggestions you can provide!
