PDA

View Full Version : problem calling variable and external .txt file from within MC


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

Mortimer Jazz
07-28-2001, 09:45 AM
Can you post a fla (to me or up on the net) so I get a clearer idea of what you're trying to do?

Do you mean you give the user a set of buttons and they can press button1 to load in text1, button2 to load in text2 etc?

If so do you have a lot of text because there are a couple of ways you can do this....


[Edited by Mortimer Jazz on 07-28-2001 at 03:50 AM]

Mortimer Jazz
07-28-2001, 08:09 PM
A reply email with working attachments is winging its way to you. Let me know if you don't receive it.

Hope it's what you needed.
Regards,
Mort. :D