Hello all-
Heres my problem. I have a “sliding photo slideshow” which hinges on this variable -
thumbNum = 10;
This variable specifies the number of photos in the slideshow
I want to have this variable in an external .txt file so I can update the number of photos without having to reexport the flash file
I figured it would look like this
.txt file:
num = 10
flash:
loadVariables("thumbnum.txt","");
thumbNum = num;
I thought this would work, but it doesnt. I know that the .txt file is loaded, but when I trace the “num” variable, it says its undefined. If anyone can help I would be very thankful!
Here is a larger portion of my Flash actionscript if you need to see more
thumbNum = 47;
total = (thumbNum * 200)-800;
wholeNum = Math.floor(total/600);
wholeSteps = wholeNum * 600;
remainder= total - wholeSteps;
trace (total);
trace (wholeNum);
trace (wholeSteps);
trace (remainder);
b1._visible = false;
final_x=0;
speed = 8;
if(thumbNum <= 4){
b1._visible = false;
b2._visible = false;
photo_mc._x = 0;
}
else{ photo_mc.onEnterFrame = function() {
photo_mc._x += (final_x - photo_mc._x)/speed;
}
}
b2.onRelease = function() {
if(final_x==0){b1._visible = true;}
if(total!=wholeSteps) {
if(final_x==-wholeSteps){b2._visible = false;}
}
else{if(final_x==-wholeSteps + 600){b2._visible = false;}}
if(remainder!=0){
if(final_x==-wholeSteps){final_x = final_x - remainder;}
else{final_x = final_x - 600;}
}
else{final_x = final_x - 600;}
}
b1.onRelease = function() {
if(final_x==-600){b1._visible = false;}
if(final_x==-total){b2._visible = true;}
if(remainder!=0){
if(final_x==-total){final_x = final_x + remainder;}
else{final_x = final_x + 600;}
}
else{final_x = final_x + 600;}
}
stop();
You can also see an example of the slideshow at DaraLevinePhoto.com/countries/australia