PDA

View Full Version : Loading diffent Variables from ext. Text fil


VKotek
08-02-2008, 07:03 PM
Hello everyone, I am new to the forum, and Flash.

I have created a small image photofolio, where you can click next and previous image. the image displays fine, so does the text, but instead of having all the text seperate, is it possible to have it all in one text file?
like maybe load the text file but set the variable of the text field to be differnt (eg var1 and on next it would load var2)


var r=0;
this.createEmptyMovieClip("holder_mc", this.getNextHighestDepth());
loadButton_next.onRelease = function(){
r++
loadVariables(""+r+".txt",photo_text);
holder_mc.loadMovie("images/"+r+".jpg");
}
loadButton_previous.onRelease = function(){
r--
loadVariables(""+r+".txt",photo_text);
holder_mc.loadMovie("images/"+r+".jpg");
}


Any help appreciated, thanks!

oh and feel free to crit anything that can be improved on my code.