pbyuk
07-27-2001, 01:07 PM
I know the topic has been over and over tackled but here is the pb...
The whole thing is related to the 'scroll a text box II' tutorial...
in it, there's a MC with a dynamic text field which on loading loads a .txt file in it...
pretty easy.
onClipEvent (load) {
this.loadVariables(tribune.txt);
I want to modify it so that depending on which tribune has been chosen by the reader to be displayed, a variable is created with the value of the corresponding .txt file on_press of the button which then send to the MC which then retrieves the value of the variable, hence the correct file.
I'm sure it's easy but I can't figure out how to do it...
-------------------
Here's where I'm at now...
I have a MC named LAYOUT_NEWS with two buttons inside.
on press on the button there is a variable created:
on (press) {
tribune = "tribune1.txt";
}
but the other button does tribune2.txt
it give the variable tribune the value of the file that is supposed to be loaded by the following MC...
on Release of the button, you are sent to that MC with a MC inside that calls for the variable value like that:
this.loadVariables(_root/LAYOUT_NEWS/tribune_page_1.tribune);
I thought it would work cos it s calling for the value of the variable where it has been created...
but the MC doesn't load the file...
what's wrong???
I'm sure it's basic but I'm beginner...
cheers
pbyuk
The whole thing is related to the 'scroll a text box II' tutorial...
in it, there's a MC with a dynamic text field which on loading loads a .txt file in it...
pretty easy.
onClipEvent (load) {
this.loadVariables(tribune.txt);
I want to modify it so that depending on which tribune has been chosen by the reader to be displayed, a variable is created with the value of the corresponding .txt file on_press of the button which then send to the MC which then retrieves the value of the variable, hence the correct file.
I'm sure it's easy but I can't figure out how to do it...
-------------------
Here's where I'm at now...
I have a MC named LAYOUT_NEWS with two buttons inside.
on press on the button there is a variable created:
on (press) {
tribune = "tribune1.txt";
}
but the other button does tribune2.txt
it give the variable tribune the value of the file that is supposed to be loaded by the following MC...
on Release of the button, you are sent to that MC with a MC inside that calls for the variable value like that:
this.loadVariables(_root/LAYOUT_NEWS/tribune_page_1.tribune);
I thought it would work cos it s calling for the value of the variable where it has been created...
but the MC doesn't load the file...
what's wrong???
I'm sure it's basic but I'm beginner...
cheers
pbyuk