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!

loading & displaying mutiple variables 2

Status
Not open for further replies.

bigbird3156

Programmer
Feb 20, 2001
183
AU
Hi again guys....

I have just created a scroll box after following a tutorial. it reads a text file and prints up the info found in the file. It reads one variable and prints it as one block of text.

I want to do this but have multiple variables and records on the one scroll sheet...

Ie, I want to read a file (.txt or whatever works best) and have it display, a heading, a small blurb & a hyperlinked URL, for mutiple records any idea how I do this?

The records will be added to by another user who wont have access to flash...

has anyone seen a tutorial or anything for this sort of thing. *Flash 4*

Thanks (-: The Bird from Down Under
bigbird_3156@bb3.com.au
 
Do you want to do it in ASP ??? Do you need a database? Do you have Access?

It's up to you...


Have Fun...

Sharky99 >:):O>
 
Hi big,

Did this for someone who wanted something similar:

Both text boxes can be uptaded by editing simple text files (Notepad...etc...), and without - in most cases, provision has to be made in the original movie for a certain amout of display frames - having to modify the Flash movie.
Was written with Flash 5, uses Flash methods, and I guess it could be adapted to Flash 4.

Although these text files can be updated by a 3rd party user, some care has to be taken as to how they are written, if only for html(1.0) text formating. Obviously this 3rd party user should also be able to upload the new edited files to the server!

Regards,
wink4.gif
ldnewbie
 
Thanks Old,

Now that you have shown me that it can be done, I'd love to know how to do it, is there somewhere i can download the .fla or is there a tutorial for this or something??


Thanks
(-: The Bird from Down Under
bigbird_3156@bb3.com.au
 
I Hope this is of some help. I am loading in a textfile into a flash movie by doing the following:-

HTML
<param name=movie value=&quot;movie1.swf?quizref=test&quot;>
//send name of textfile to open into variable quizref
//you probably have a static file so it is not necessary, but useful to know incase you wish to use the same flash file with a different data source.

TEST.TXT
&description=questions+about+roger+melly
&author=my+mothers+dog
&q_points=100
&Qtext1=how+many+pimples+are+on+my+cat
&Qtext2=where+are+you+most+likely+to+see+me

FLASH
//load data
loadVariables (quizref+&quot;.txt&quot;, _root.textMovie);

// remove LF/CR at end of each line for numbers
question_qty = number(q_qty.substring(0,(q_qty.length-2)))

// the array
Qtext=eval(&quot;Qtext&quot;+i);


Haven't managed to do the writing bit in Flash yet, had to resort to VB for now. But since it is a text file you can use Notepad.
 
Big, I can send you the package... But, having re-read your post, I think you're more in need, as Sharky suggested, of some kind of server side script like ASP.

When are going to upgrade? Waiting for Flash 6?

Regards,
wink4.gif
ldnewbie
 
Hi,

Was trying to avoid using ASP as no matter how hard I try I cannot work out how to make ultra dev to download data, have gone through many tutorials have been in contact with my hosting company (not that they have helped at all) and still cannot get it to work... I guess I'm just a dud.... (yes I have posted questions to the ulra dev part of tek tips)

Saw how easy it was to load up a text file into flash and thought... ahhh, here is my answer... unless it is also easy enough to download other data into flash (ie non text) then yeah... but I just don't know what to do...

I can update to Flash 5 if I need to I guess, was not looking forward to the cost and time to re-learn it all though... so if its the only answer then I guess I'll do that... so if you could forward me the info anyway or lead me to the path of enlightenment on downloading not .txt data into flash (4 or 5) then that would be spiffy!

Thanks (-: The Bird from Down Under
bigbird_3156@bb3.com.au
 
I wasn't saying you couldn't use my example in Flash 4!
Merely wondering why you never upgraded!

If I can find some time in the next few days, will try to adapt it to Flash 4, but it would help, if you could give me a little more info on what you're trying to do.

Loading a telephone directory, employee list... Or what exactly?

Regards,
wink4.gif
ldnewbie
 
Just had a quick look in my old Flash 4 application, and all of this wouldn't be very pratical in Flash 4.
Since you can't use html tags in Flash 4, thus you won't be able to call another text file from within a text file, using the link type line, and furthermore you won't be able to format (although that's also limited in Flash 5) the text from the text file being called.
You could allways define sort of dynamic buttons, using invisible buttons and a variable imported from a text file (that could be edited), to name these buttons and call some appropriate display in another same text box, but you would be limited to the original number of buttons created in the original Flash movie, and also, as I've already said, limited in the format in which the text files called could be displayed.

Hope I'm making sense here... And you do understand most of this!

Regards,
wink4.gif
ldnewbie
 
Ok, Here goes on a better explination fpr you....

I have a scroll box that will hopefully hold all the information.

I want it to call a data file, be it text or whatever works, the file will hopefully have multiple records in it, each of which will contain...

an article heading (which I hope to make bold)
a 1 paragraph blurb on the article
a hyper link that will call a .pdf file that will load in a blank window.

The client will hopefully be able to update the data file as he sees fit and upload it to the site, along with the pdf files and so update the site without my interference. I would hope to not have to limit the number of records that he can create so creating buttons probably would not work that well...

Does this help any? I hope so,

Thanks for your help. (-: The Bird from Down Under
bigbird_3156@bb3.com.au
 
oh yeah, and I am in the process of upgrading to flash 5 too (-: The Bird from Down Under
bigbird_3156@bb3.com.au
 

&quot;...an article heading (which I hope to make bold)
a 1 paragraph blurb on the article
a hyper link that will call a .pdf file that will load in a blank window...&quot;

For the bold stuff & hyperlink, think you'll definately have to upgrade to Flash 5, or have someone that has Flash 5, create the movie for you.
Then if your client respects some rigorousness in the formating of the text file, he can easily edit it and upload it. To open .pdf files online, might be another story! Guess the user would have to have the Acrobat reader installed on his system, and even then, the whole process may go through security messages (in IE at least!), before any such files are downloaded.

Regards,

wink4.gif
ldnewbie
 
Ok so I have flash now,

any hints or tips on where to go from here? (-: The Bird from Down Under
bigbird_3156@bb3.com.au
 
Old is a legend.... horray!!!!....

Well, thanks old I am almost there now, I fiddled around with your text file for desc1 and entered in some test stuff that called the file I wanted and everything - execelent!

HOWEVER - I then put this file into my own scroll box program (after importing it to Flash 5) and it printed up the text as is i.e. it displayed all the html coding rather than following the instructions (if you know what I mean>...

look at
There is obviously something more i have to do to make my scroll window read the text file as a set of commands rather than just a slab of text... can you help?

(-: The Bird from Down Under
bigbird_3156@bb3.com.au
 
First thing that jumps up in my face, is the use of the <p> tag!
&quot;Malheureusement&quot;, eventhough Flash 5 does support html tags, it only support a few tags from html 1.0. The <p> tag is obviously not one of them!
For more info on the tags that do work, see this link:

In any case, didn't you want your client to be able to open up PDF files?

Regards,
wink4.gif
ldnewbie
 
i use it in promaintenance old..the <p> tag works fine for me in my loaded text...he should check to make sure he has html checked in the dynamic text panel..

maybe..
logo.gif


carlsatterwhite@orlandomediasolutions.com
 
You're right! Must be getting too old for this!
Even re-checked the link before I posted, where <p> is in fact one of the tags that work!
Got that Big?

Regards,
wink4.gif
ldnewbie
 
In fact Big,
Maybe it's because you haven't added the textfield variable in the file being read.
Check my files they start with either cours=bla...bla...bla! or desc2=bla...bla...bla!
Those are the textfields' variable names use in the movie!

Regards,
wink4.gif
ldnewbie
 
Hoooooooo Raaaaaaaaahhhhhhhhhhhhhh!!!!!!!!!!!

pip pip and tally ho hey what!!!

It Works, It Works It Works It works!!!!!!

Thanks Old!!! and Virt tooo as he clinched it for me with the dynamic text pannel thingy!!!!

You guys are legends!!!!!

(the hyperlinks dont actually point anywhere....) (-: The Bird from Down Under
bigbird_3156@bb3.com.au
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top