Solved

flash and php

Posted on 2004-08-23
6
166 Views
Last Modified: 2010-04-03
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
0
Comment
Question by:mad_man77450
  • 2
6 Comments
 
LVL 11

Accepted Solution

by:
Buffon earned 75 total points
ID: 11878661
Probably the path to text boxes txtBox1 and txtBox2 isnt right.
0
 
LVL 3

Expert Comment

by:mixart
ID: 11888634
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
 
LVL 11

Expert Comment

by:Buffon
ID: 11889879
he declared myData inside mc, so the myData is not an issue. It can be only txtBox.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now