mad_man77450
asked on
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
he declared myData inside mc, so the myData is not an issue. It can be only txtBox.
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;