It should be simple, but hey!

Guys need help!!

Got three text boxes:

textbox1
textbox2
textbox3

each with a dynamic variable:

news1
news2
news3

I have a text file with variables news1 to news30

I want to load in each news variable 3 by 3 by the click of a ‘Down’ button. And also an ‘Up’ button to go in reverse.

I have tried some Action Script, but have had major problems - nearly worked, but no way reliable - any ideas from you guru’s?

make three additional variable that would serve as a counter. For example count1=1, count2=2, count3=3. then rename your textfield to tf1, tf2, tf3 <- this would lessen the confusion since you are using the same variables in your textfile.

on the first frame load the text file:


loadVariable("yourtext.txt","");

on the third frame place a stop action. leave the second frame blank. your buttons and text field should be on the same timeline and on must be present at the third frame.

on the down button place this script:


on(release){
tf1 = this["news"+count1];
tf2= this["news"+count2];
tf3 = this["news"+count2];
count1+=3;
count2+=3;
count3+=3;
}

on the up button place this script:


on(release){
count1-=3;
count2-=3;
count3-=3;
tf1 = this["news"+count1];
tf2= this["news"+count2];
tf3 = this["news"+count2];

}

this isn’t fool proof but this is the basic theory… I think. :slight_smile:

I hope this helps!

Cheers!