Copy link to clipboard
Copied
I have a movie clip that is tracking the horizontal location of the mouse. Id like to pass the location from the movieclip (track_mc) to a text box on the parent movieclip. Any simple way to do that or am I going to need to dig and really learn about classes ;] ?
There are other ways to do it, but you should be able to something like so within your track_mc clip:
parent.textBox.text = String(mouseX);
Copy link to clipboard
Copied
There are other ways to do it, but you should be able to something like so within your track_mc clip:
parent.textBox.text = String(mouseX);
Copy link to clipboard
Copied
Thanks! that worked
(I did need to use MovieClip(parent) instead of just parent for as3 if anyone else views this)
Copy link to clipboard
Copied
Well, you don't actually have to cast parent to MovieClip - but you'd have to turn off strict mode, and that's not a good idea. You need to cast to MC, because the compiler only knows .parent as a DisplayObjectContainer
Copy link to clipboard
Copied
You answered that so quickly it gave me an opportunity to experiment. I was trying to take it a step further now and trying to use similar logic to pass it just as a variable, (Learning more ticks) not into a text box, but a trace (in the parent MC). Not having any luck still experimenting. any suggestions?
Copy link to clipboard
Copied
Looking into it on some other web sites. I'm probably going to need global variables (hoping I could sneak around it. looks like I'm learning about classes ;]
Thanks again for the previous help