# Pls help whit flash loader

**URL:** <https://forum.kirupa.com/t/pls-help-whit-flash-loader/203448>\
**Category:** Uncategorized\
**Created:** [October 11, 2006, 6:13am UTC](https://forum.kirupa.com/t/pls-help-whit-flash-loader/203448 "2006-10-11T06:13:55Z")\
**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 11, 2006, 6:13am UTC](https://forum.kirupa.com/t/pls-help-whit-flash-loader/203448/1 "2006-10-11T06:13:55Z")

</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]
