Using contents of a txt box as a variable

i have a dynamic text box that is filled with the path to an image form a database. for instance the database will say images/picture.jpg

then i have a symbol called pic that is on the _root into which i want to load the image corresponding to the path that is in the textbox.

the column in the database is called picture and my asp script sends the data to flash. the text field is populated so i know the asp script works. but i can’t seem to use the contents of the populated text box as a variable from which i will tell _root.pic to load the image


var holder = picture
_root.pic.loadMovieNum(holder, 10000);

Well, I’ve run into something similar. First of all, check where you’ve loaded the text variables into (i.e. level). Then, provided it’s level 0, make sure you use _root.variableFromList as that’s what it is. So, I know you’re probably familar with bug testing, I’d check to make sure the variable is what I want it to be via a trace first. Then, if that’s right, I’d make sure I’m loading the jpeg into the proper place OR that the jpeg is of the right format (YES! there are some formats that FLASH doesn’t read properly and won’t show!)

Anyway,
–Elios

P.S. To remedy that jpeg format problem, if you’ve got a copy of Adobe Photoshop, save the jpeg as the standard baseline form.

i don’t understand what the variableFromList means. I’m not familiar with that command

here’s a zip of the files i’m working with

i don’t know asp very well so i’ve edited what i have to the best of my ability from a tutorial

copy the file waves.jpg into a folder called images and all the other files can go in the root directory.

thanks very much for your time and help =)

Well, I just mean that your variable “picture” as “_root.picture”. And the zip didn’t attach.

–Elios

www.aaronsleeper.com/peoplesearch.zip

i guess it was too big

Hmm…when you run it on your computer (from the flash export movie thing), do you get an asp error? (I do.) And you didn’t have a your mc (with instance name “pic”) on the last frame (or stop command to keep it there…if you planned on keeping it there, I mean.)

–Elios

sorry … for some reason the earlier version i uploaded was corrupted. i think i messed it up somehow. anyway, i’ve redone it to how it was when i posted this question. the file works fine for me … no asp errors etc. all is well except the picture that i’m trying to load doesn’t come up

thanks again =)
http://www.aaronsleeper.com/peoplesearch.zip

i figured it out. thanks for your help

the problem was i used loadMovieNum instead of loadMovie

thanks again =)