PDA

View Full Version : links in dynamic textField



danielbento
02-11-2007, 12:37 AM
I have a dynamic textField, formatted in html, that receives data from a php file, which is getting from a mysql db.

In php i can include in the data received a link to each item, and it works perfect is flash.

But i want a different thing:
- each item retrieved in flash dinamic textfield is in a seperate line. Clicking in each item should pass info to php in which item was clicked and trigger an animation in flash.
So, each item should be a link, but perhaps controled inside flash and not through php. Is it possible to define inside the flash, in a textfield that each line is a link that retrieves its content? Is it possible to find out which line in a textfield was clicked and retrive the data in that specific line?
If it's possible, i can do the rest.

The final purpose is to use the specific data to send it back to php to do another query to the db with that specific criteria.

Can anyone help me?

BLiZZaRD
02-11-2007, 02:28 PM
Yes it is possible. Your ideas are coming across slightly vague though, so I will do my best here.



Is it possible to define inside the flash, in a textfield that each line is a link that retrieves its content?


If you are talking about the "multiline, no wrap" options, then no. One element will do one thing. However, you can make individual lines (dynamic txt boxes) each with it's own var name.



Is it possible to find out which line in a textfield was clicked and retrive the data in that specific line?


Again, not easily, so really no. In essence you would need to make multiple txtboxes inside a movie clip, referenced outward with _root. _parent. and a combo of both. Much easier to make just one txt box for each line and go that route, then yes, using simple if/else statements inside the Actions panel on the links there you can finish it off.

danielbento
02-11-2007, 05:31 PM
I found a good way to do exactly what i want in this link:

http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001719.html