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!

using variables 2

Status
Not open for further replies.

bigbird3156

Programmer
Feb 20, 2001
183
AU
Hello again....

ok, the bird is going one step further and yet stepped in his own mess in the process...

I am trying to play with variables in my movie and I am having no luck, I'll explain how I have done things and see if anyone can help.

on the first frame of the first scene of the movie i have set the variable:

page = "empty";

on various scenes or movies (depending on selection) I change the value of the variable in the first frame...

eg. page ="wannabs";

Then in a movie that is found inside a movie that can be called by any other particular movie or scene, I have a lot of if's and else if's to tell the movie which file to load up and to display(found in frame1)...

if (page == "wannabs") {
loadVariables ("./data/wannabstext.txt", _root.descholder);
} else if (page == "links") {
loadVariables ("./data/linkstext.txt", _root.descholder);
} else if (page == "resources") {
loadVariables ("./data/resourcestext.txt", _root.descholder);
} else if (page== "cool") {
loadVariables ("./data/cooltext.txt", _root.descholder);
} else if (page =="scods") {
loadVariables ("./data/scodstext.txt", _root.descholder);
} else if (page == "perv") {
loadVariables ("./data/pervtext.txt", _root.descholder);
} else if (page == "plank") {
loadVariables ("./data/planktext.txt", _root.descholder);
} else if (page == "servant") {
loadVariables ("./data/servanttext.txt", _root.descholder);
} else if (page == "third") {
loadVariables ("./data/thirdtext.txt", _root.descholder);
} else if (page == "funda") {
loadVariables ("./data/fundatext.txt", _root.descholder);
} else {
loadVariables ("./data/errortext.txt", _root.descholder);
}

the files load up info called scrolltext... eg. scrolltext=blah blah blah blah

in the next frame (frame2) there is an action to check that there has been text loaded

if (scrolltext ne "") {
loadVariables ("./data/errortext.txt", _root.descholder);
gotoAndPlay (2);
}

this then goes into the scroll text loop.

This set up worked when I had the scrollbox that loaded only the one text file, but now that I want it to work on selecting one of many text files it does not work,

Any ideas Old, Dav or Virt, or is there another hero in the tek tips ranks who can help....????
(-: The Bird from Down Under
bigbird_3156@bb3.com.au
 
hi,

in the code :


if (page == "wannabs") {
loadVariables ("./data/wannabstext.txt", _root.descholder);
} else if (page == "links") {
loadVariables ("./data/linkstext.txt", _root.descholder);
} else if (page == "resources") {
loadVariables ("./data/resourcestext.txt", _root.descholder);
} else if (page== "cool") {
loadVariables ("./data/cooltext.txt", _root.descholder);
} else if (page =="scods") {
loadVariables ("./data/scodstext.txt", _root.descholder);
} else if (page == "perv") {
loadVariables ("./data/pervtext.txt", _root.descholder);
} else if (page == "plank") {
loadVariables ("./data/planktext.txt", _root.descholder);
} else if (page == "servant") {
loadVariables ("./data/servanttext.txt", _root.descholder);
} else if (page == "third") {
loadVariables ("./data/thirdtext.txt", _root.descholder);
} else if (page == "funda") {
loadVariables ("./data/fundatext.txt", _root.descholder);
} else {
loadVariables ("./data/errortext.txt", _root.descholder);
}

have you tried putting in _root.page instead of page? just a thought though.

biggie


 
loadVariables ("./data/wannabstext.txt", _root.descholder);

From where is... Or what's this red notation?
How about:
Code:
loadVariables ("[URL unfurl="true"]http://www.yourserver.com/data/wannabstext.txt",[/URL] _root.descholder);

Regards,
wink4.gif
ldnewbie
 
that could be it also, a misplaced dot, if oftentimes the coz of many great problems, right old?
 
Thanks guys, a joint effort by both newbies and its solved!!!! (-: The Bird from Down Under
bigbird_3156@bb3.com.au
 
it was a combination of both of your suggestions that fixed it....
_root.page = "whatever"
instead of
page = "whatever"

and also calling the whole URL instead of just a part of it as you suggested...

But it works now, and all I need to do is the finishing touches!!! - then I can drop this project like a.... you fill in the apropriate negative noun here...
(-: The Bird from Down Under
bigbird_3156@bb3.com.au
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top