SWF path problem
- Started
- Last post
- 15 Responses
- ganon
when i test external text loaded into a swf, it works fine...but when i load that swf into another, the text doesnt come up...must be a path problem right?...i have this in the first frame of the swf with the text:
stop();
loadVariablesNum ("titles.txt", 0);
then this swf is loaded into a main swf...do i need to specify the swf for the "loadVariableNum"..?do i need the dynamic text box in a MC?...
thank you
- o0o0
that 0 means the level... so when you load that swf, level0 is the parent MC. I think you could just look for your variables in _root instead of in the other swf...
- ganon0
thank you
so i should take that line of actionscript and put it into the main timeline?..i tried that and it didnt work....
- wksp0
change the load variable path to a level or the MC you are loading the text file into
titles.txt", level number
or
titles.txt", instance name
- o0o0
I think you can leave it how it is... but just look for the variables in the root.... so if your txt file loads myvar=x ... you have to reference it with _root.myvar
- arlo0
change it to:
loadVariables("titles.txt", this);
- ganon0
thanks for the help guys, but i still dont have it...
oOo, are you saying to keep the:
loadVariablesNum ("titles.txt", 0);
in the root, but change the text fields variable in the external swf from "titles" to "_root.titles"...?
- o0o0
no, no, I'm saying keep the loadVariablesNum where you have it... but yeah, change the textfields to _root.titles...
I mean ...that 0 means the variables goes to the topmost element... so you need _root to access it.... so I guess it wouldn't matter where you put that loadVariablesNum()...
did you try arlo's suggestion? That sounds like it might work too...
- ganon0
i tried arlos suggestion but it lauched the external text file into a seperate window...!
ok oOo, thanks a lot that works...kind of...i lauched my main swf, click on the external one, and the text came in (by changing the "titles" textfield variable to "_root.titles"...but now the hyerlinks i have in that text file dont work...in the text file i am using:
text here
what do i need to change?.."article 11" is a frame label....
- ganon0
that didnt come through:
(a href="asfunction:_root.gotoAndPl... here(/a)
- o0o0
hmh! I didn't know you could do that, cool...
I'm playing with it now.. I couldn't get that to work either... that asfunction: stuff is interesting, but _root doesn't seem to mean the same thing.. it won't go to the real _root when it's a loaded swf...
I'll keep playing with it...
- ganon0
thanks, let me know if you can figure it out...i am fooling with it too...and if anyone else wants to jump in here, feel free!...
- o0o0
well I got it working...
after asfunction: _root means the real root, the parent...
was 'article11' on the parent swf?I'll just send you the files I played with...
- ganon0
"article11" is a frame label in the swf which is loaded into the main swf....
- o0o0
yeah, then the problem was in your href, you could just put
asfunction:gotoAndPlay, article11
no "_root"