Two separate files, they are in the same movie. First one loads second one.
If i would not want to send variables it will work nicely.
I just need a method to pass variables between swf files. I cannot find solution anywhere and im nearly desperate. So, am i in right track here? What is the common way of passing variables?
Well I am not sure if this is related, but when you load one movie into another, the root level changes to the movie LOADING the second movie. Hence the code:
in the second movie would (I believe) actually try to create a texfield in the root timeline of the first movie (since that is now the root). Is this what you are trying to do?
Also, I am not sure why you are specifying a POST method for loading a movie in:
loadMovieNum("2.swf", 4, "POST");
this is generally only done if you are sending variables. Here you are trying to access internal variables.
However, I changed my way to solve my problem complitely, because i just realised that passing variables through files is not the right way. Because i load swf files dynamically.
At present moment I am still in the corner.
I have two files, "index.swf" and "valikko.swf" (1.swf and 2.swf in previous post). I read database with LoadVars.load to get content for the flash.
Loading data to "index.swf" works fine but it do not work from "valikko.swf".
That is the reason i tried to pass variables loaded from db.
I Thought previously:
"Damn! This dont work.. OK, loading data wont work from valikko.swf, but it works from index - so do not panic, just pass them to index. "
-- and then i got new problems
Now i Thought:
"Because loading works from index, theres no any good reason why it wont work from another file. Actionscript is same in both files. And this makes me feel odd."