flash and php

hello,
ok i am making a flash website and it going to have a dynamic textbox that connects to php to get info from mysql. it works fine wen i put the code in main timeline but when i put it on a mc's timeline it wont work. the textbox just shows empty.
here is the code:

myData = new LoadVars();
myData.onLoad = function() {
      placeTxt();

};
myData.load("http://localhost/flash/myData.php");
placeTxt = function () {

      txtBox1.text = myData.textbDesc1;
      txtBox2.text = myData.textbLink1;

};


please help me
mad_man77450Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
BuffonConnect With a Mentor Commented:
Probably the path to text boxes txtBox1 and txtBox2 isnt right.
0
 
mixartCommented:
This line of code is placing your data into mydata on the main timeline...
myData.load("http://localhost/flash/myData.php");

if this is inside a MC...
txtBox1.text = myData.textbDesc1;

then you will need to reference the mydata on the main timeline ie.
txtBox1.text = _root.myData.textbDesc1;   //or
txtBox1.text = _parent.myData.textbDesc1;
0
 
BuffonCommented:
he declared myData inside mc, so the myData is not an issue. It can be only txtBox.
0
All Courses

From novice to tech pro — start learning today.