View Full Version : Dynamic Text Field not populating
Chrisie1013
03-23-2006, 09:05 PM
:confused: Hi there! I am trying to use a dynamic text field to display "YES" or "NO" when a user drags and drops text to a certain place. I am using the following code, but nothing is happening in my text field... I'd appreciate any advice or suggestions.
Thanks!
*******MY CODE*******
on (release)
{
stopDrag();
if (this.droptarget == "/OfficeDT")
{
_root.yesOrNo = "YES!";
}
}
where "OfficeDT" is the correct field for the text to be dropped into and "yesOrNo" is the name of my dynamic text field
davidterranova
03-23-2006, 09:10 PM
how have you named your text box? as a var name or as the name of the textfield itself? -basically, did u give its name in the top left box of the properties window, or the bottom right one?
Chrisie1013
03-24-2006, 02:53 PM
Hi, thanks for your post. I named it in the upper left, right under the drop-down where you determine the type of text field. Is this not the right place?
Thanks again!!
davidterranova
03-24-2006, 03:38 PM
Hi, thanks for your post. I named it in the upper left, right under the drop-down where you determine the type of text field. Is this not the right place?
Thanks again!!
in that case:
root.yesOrNo.text = "YES"
Chrisie1013
03-24-2006, 04:32 PM
Thank you!!! So now I have....
on(press) {
startDrag(this);
_root.YesOrNo.text="";
}
on(release)
{
stopDrag();
if (this._droptarget == "/OfficeDT")
{
_root.yesOrNo.text="YES!";
}
}
Does this look correct? It still isn't working so I'm wondering if I have an error elsewhere. If i put something in the line under the startDrag, it will display, but never gets replaced by the other text.... they can all be movie clips, right? Do I ned to make anything a button.... do I need an "else" statement?
Thanks for any help!!
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.