-
When loading variables from an external text file into a text field within a nested flash movie, only seems to work locally.
BUG or am I missing something?
-
-
Ditto. I have a projector that will read from the text file great BUT when I put it online ( with the .swf and .txt in the same folder) it just wont work.
Will someone hear our pleas??!! You can help 3 little flashers all at once.
-
Loading variables into a nested movie clip and displaying them in a nested movie off or online works fine for me. What script are you all using?
Rich.
-
Im using this in the nested movie...
loadVariablesNum ("Home.htm", 0);
Check it out here
http://www.philcreations.com/test.htm
notice how there's no text in "the poop!" section
-
Originally posted by rich
Loading variables into a nested movie clip and displaying them in a nested movie off or online works fine for me. What script are you all using?
Rich.
Here is my script:
loadVariables ("about.txt", "about screen");
-
oh god...
How can such a group of Flash guru's not be able to answer our question?
<sigh>
-
I actually had a dream about dynamic text boxs last night. Is that a bad sign? Not only do I dream in color, I dream in FLASH!!
-
Originally posted by skyboy
Here is my script:
loadVariables ("about.txt", "about screen");
You have probably already done this, but just to make sure:
1. Is your target movie clip instance named properly on stage? I sometimes drag a MC on stage and simply forget to name it.
2. Did you use the correct path to the target? For example you cannot call this script from inside the target itself.
3. Does your text file have the correct syntax, i.e. varname1=content1&varname2=content2 ...?
4. Do the names of the variables in the text file correspond with the names of the variables (e.g. text fields) you use in your target movie clip?
Finally, I would like to mention that using instance names with blanks could be a problem when you use dot syntax. So try to avoid the blanks.
Maybe that was of some help.
Marc
-
thanks for the responce mrc...
Ok, I did all that from the start. When I test the nested movie on it's own everything works fine. But when the whole site is tested (Main movie with nested movie inside) the text is gone.
-
Phil,
Do you *load* the target movie into the main movie?
In that case don't forget to use _level in your paths.
Marc
-
Re: Phil,
Originally posted by mrc
Do you *load* the target movie into the main movie?
In that case don't forget to use _level in your paths.
Marc
OF COURSE WE DO.
-
Of course ..
... I was just checking
Well, I gues that leaves me with no answer for now. Sorry.
I will try an reproduce the problem on my PC now.
Marc
-
Ok, mine is working, so I will post exactly how I have it all set.
1.) Create a new MC symbol.
2.) In the new MC created 3 dynamic text fields:
a.) testText1
b.) testText2
c.) testText3
3.) Drag a copy of the MC into the main timeline at frame 1
4.) Name the instance varLoader
5.) Created text file called test.txt with the following:
Code:
testText1=Hidey Ho Neighbor
&testText2=Is this thing on?!
&testText3=I assume so if I see this
6.) on frame 1 of the main Timeline I have this code.
Code:
loadVariables("test.txt", _root.varLoader);
I load it all up and everything is hunky dory.
If that doesn't help, send me your .fla file and I'll be glad to help ya.
Spyder
-
Hi guys,
I also have the same problem. I thought I'd try curing it with a smart clip but if NetSpyder101 has the solution then I'll give that a blast first.
Cheers,
Evildrome.
[Edited by evildrome_boozerama on 09-30-2000 at 11:56 AM]
-
Originally posted by NetSpyder101
Ok, mine is working, so I will post exactly how I have it all set.
.........................
If that doesn't help, send me your .fla file and I'll be glad to help ya.
Spyder
IF you want my .fla I will be glad to send it to you. I would be very happy to have another Flasher give me suggestions on my work.
-
wrong...
Your not simulating our problem at all. My file loads a SEPERATE MC on the same directory, on to a MC on the stage. This MC loads the HTML file...
take a look
http://www.philcreations.com/test.htm
-
ok, then this should be what you mean. I created a .fla (.swf) called textLoad.swf. in that movie I had the following:
1 MC imported with an instance called varLoader
1 dynamic text field called testText
the following code
Code:
(in frame 1 of main timeline)
loadVariables("mytext.txt", "varLoader");
(in the MC instance of varLoader)
onClipEvent( load )
{
this.counter = 0;
_root.testText = "Click to cycle through items.";
}
onClipEvent( mouseDown )
{
counter++;
if (counter > 3)
counter = 1;
_root.testText = this["testField"add counter];
}
ok, then I saved and published that file
created a new .fla (.swf) called overLay.swf. In this movie I had the following:
1 button
1 dynamic text field called text with default text:
"Click this button to load a new .swf file into place"
the following code:
Code:
(frame 1 of movie)
counter = 1;
(on the button)
on (release)
{
if (_root.counter == 1)
{
loadMovieNum ("textLoad.swf", 1);
_root.text = "Click it again to center the movie.";
counter++;
}
else
{
_level1._x = 175;
_level1._y = 125;
_root.text = "Hidey ho!";
}
}
Is that what you meant? you can take a look at the .swf by itself at:
http://www.geocities.com/netspyder101/textLoad.html
and the movie that loads that .swf at:
http://www.geocities.com/netspyder101/overLay.html
I think the problem you are having is that you are loading the new movie using:
loadMovie("blahblah.swf", "variable name");
and loading it into a MC on your timeline.
that works, but your variable names get shifted around and you can no longer address them the same way.. For instance:
if you load a movie like:
loadMovie("blahblah.swf", "temp");
then you must now access it like this:
_root.temp.{variable in the swf}
if you load it like this:
loadMovieNum("blahblah.swf", 1);
then you can still access it the standard way.
If that is confusing, open up your movie in debug mode and look at the variable names.
HTH,
Spyder
-
call me stupid but i don't get it...
I simulated my situation, ziped it and posted it here...
http://www.philcreations.com/TextTest.zip
-
quickest answer I can give that works.
Edit your .txt file and change the variable name from text
to box.text
It will work fine, if you know the name of the instance you are going to load the movie into, just include that before the variable name in your .txt file.
The reason it's not working:
When you have it in it's own movie, the variables load into _level0.variable, but when you load them into a MC instance in another movie, the variables load into _level0.{instance name}.variable.
Did I make that clear?? Sorry, I haven't had much sleep.
Spyder
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|