# Need Help with Flash Loaders

**URL:** <https://forum.kirupa.com/t/need-help-with-flash-loaders/203330>\
**Category:** flash\
**Created:** [October 10, 2006, 8:05am UTC](https://forum.kirupa.com/t/need-help-with-flash-loaders/203330 "2006-10-10T08:05:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkaoshi](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@darkaoshi](https://forum.kirupa.com/u/darkaoshi)\
**Post date:** [October 10, 2006, 8:05am UTC](https://forum.kirupa.com/t/need-help-with-flash-loaders/203330/1 "2006-10-10T08:05:32Z")

</div>

Hi im new here, the thing is im a noob in Flash too lol so i saw a tutorial on how to use loaders to load external jpg, that i can do but well i tried to modify the cose to put a next button and a back button so here is my code:

var n:Number = 0;  
var i:Number = n+1;  
var k:Number = n+2;  
var j:Number = n+3;

comp1\_btn.contentPath = “thumb”+i+".jpg";  
comp2\_btn.contentPath = “thumb”+k+".jpg";  
comp3\_btn.contentPath = “thumb”+j+".jpg";

function portfolioLoader (image) {  
main\_mc.contentPath = image;  
}

comp1\_btn.onRelease = function (){  
portfolioLoader(“image”+i+".jpg");  
}  
comp2\_btn.onRelease = function (){  
portfolioLoader(“image”+j+".jpg");  
}  
comp3\_btn.onRelease = function (){  
portfolioLoader(“image”+k+".jpg");  
}

btnNext.onRelease =function() {  
n = n+3;  
};

btnBack.onRelease =function() {  
if (n\>=4) {  
i = i - 3;  
j = j - 3;  
k = k - 3;  
};  
if (n \<= 3) {  
i = 1;  
j = 2;  
k = 3;  
};

};

stop();

[SIZE=5]The Problem:[SIZE=2]When i click on the Buttons the value of the variables changes only and just only inside the Button, but i wont change the value of the initial variables so can someone please help me fix this please :P, My MSN messenger is (darka\_aoshi@ufm.edu.gt) email ([darkaoshi@gmail.com](mailto:darkaoshi@gmail.com)) please i would really apreciate if u guys help me with this [/SIZE][/SIZE]
