Ok guys, I ran into this problem before and alway manage to find a way around it.
I’m messing around with an XML menu. Usually I make a button movieClip in which there is a dynamic text field and I give it an instance name of txt or something. In this case I have no problem setting the text of that text field to what is read from the XML file. Something like this: btns[i].txt = ...Here what I read from the XML …
Now if I make a button movieClip and I make another movieClip inside this button movieClip (let’s call it inside for now) and inside that movie clip I place the dynamic textfield with an instance name txt. Can I just do this: btns[i].inside.txt = ...Here what I read from the XML …
Cause this doesn’t seem to work for me and I was curious to know if it is possible at all. If it is, then I’m doing something else wrong. But if it isn’t possible, then I don’t have to look any further.
Cheers in advance!
Extra: btw don’t know if it’s important but anyways. The btns[i] is an instance of a btn (button of course) movieclip which is attached to the stage using the attachMovie method.
btns[i].movieClip.txt.text = xml
That’s what I did, but that didn’t seem to work. Guess my problem lies somewhere else.
Well actually you did it just the way I would. I never had the problem like this before, but I also know that even a little typing mistake can mess everythin up.
I suppose you go over that section again- the syntax is right, I think.
For what I have experienced with textfields within buttons, is that they dont duplicate. So Im not sure that this applies to what you did, but could you check if there is a textfield to begin with? You can do this by just typing something in there, and then do your attachmovieclip thing.
If nothing appears on screen, while you did type something, this means that the textfield is not being duplicated…
- Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
- Open a support ticket if you would like specific help with your account, deposits or purchases.
- Item Support by authors is optional and may vary. Please see the Support tab on each item page.
Most of all, enjoy your time here. Thank you for being a valued Envato community member.