Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The idea in this new movie is that 1

Status
Not open for further replies.
Dec 24, 2001
857
GB
The idea in this new movie is that I have to show every member of staff (over 100) and give a bit of info on them.

I've decided that I'm going to have the person's picture on the left and the info in a curved box on the right.

The text then scrolls from the bottom of the box up to the top and eventually disappears (using mask layers etc).

Anyway, because this is going to get updated countless times in very short spaces of time, I was wondering if I could use a similar thing as what oldnewbie and davdesign set up for me in a previous thread (the one about the welcome screen).

What I mean is can I set a variable as a persons name, make it equal all this text I'm going to write (taking into account I'll have pressed enter a few times), and have a dynamic text box read it?
The 'Test' movie I did had the loadvariables action in the first frame which loaded 'textvars.txt' in the root directory. In this file, there was a variable called 'Test' which equalled a load of gibberish. Then I set a dynamic text box as 'test_text'.

(I thought I should also mention that this is all in a movie clip).

I set the actions on the movie clip as...can't quite remember, something along the lines of 'onClip(load Data)' or something and put test_text=test. Anyway, in the end it did nothing.

If this is a bit confusing, let me know and I'll try to clear it up.

Thanks...
 
ok, I hope I've understood you, but here goes anyway:

1>
First frame, set up an array:
Code:
mypeople = new Array();

2>
Create your text file which holds everyones details:
Code:
&mypeople[0]=jimmys info
&mypeople[1]=bobs info
&mypeople[2]=sallys info
etc, etc

3>
Use load variables command to load array into movie:
Code:
loadVariablesNum ("mypeople.txt", 0);

4>
Create the dynamic text field for the information, give it a variable name, say _root.currentperson

5>
If your making a separate button for each person in order to view their details you're gonna just have to remember where they were placed in the array, ie for Sally's button:
Code:
on (release) {
    _root.currentperson = mypeople[2];
}



That should do it!

dave
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
Thanks.

I'll have a play about with this tonight. If I have any problems, I know who to ask...
 
Also bear in mind that if this is all in a movie clip, as you mentioned, you may also have to include that movie clip's instance name in the target.

Regards,
wink4.gif
ldnewbie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top