Loading dynamic text into button instance

Okey, Ive created a button which has a dynamic text field in it.
Is there a way to load text into tht text field…
The text is beeing loaded from a mysql db using php.

:thumb:

It is possible. I’ve used it before on a project for my father. Depending on how you are loading in the variable(s), you have to target the textbox in the button like:

_root.buttoninstance.textboxname = variable

Is that what you’re asking?

okey Ive tried ur way but it wont load
this is my script for loading the text
[AS]
$lv = new loadVars();
$lv.load(“http://myhost.nu/get_text.php?menu=fakta&ruta=fakta_txt”)
//fakta_txt is the var and instancename of my txtfield
$lv.onLoad = function() {
snurr._alpha = 0; //never mind this one
_root.daniibut.fakta_txt = $lv.danii_ladd
}
[/AS]
I used this names and vars without putting the txtfield in a button and the text is loaded perfectly, so it cant be something wrong with my php script or anything…

I’m gonna have to go home and check my code because I don’t have Flash at work. I’ll get it for you. Here’s part of an example of what I did. The text on the buttons is loaded in from a text file with the loadVars method, so that should be the same:

http://www.freddythunder.com/dad/buttons.html

Hang on!!

Aight =]
thx a lot!
ill be waiting.

=) :thumb:

It’s rainy and I’m really tired and at work, so as I was about to fall asleep at work I was thinking of the problem :stuck_out_tongue:

First, you should take a look at this:
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=31032&highlight=loadvars
This talks about loading vars into an object vs loading them onto the timeline.

After looking at your script, it should work. if your button is called ‘daniibut’. I’m still going to have to check that other thing. Is there anyway you can post your fla and PHP?

Hey thx a lot thunder it works fine now =]

What did you change to make it work?

Not much, the var was mispelled ^-^

That’ll do it!!:stuck_out_tongue: