# Can't write to variable

**URL:** <https://forum.kirupa.com/t/cant-write-to-variable/222030>\
**Category:** Uncategorized\
**Created:** [April 10, 2007, 8:35am UTC](https://forum.kirupa.com/t/cant-write-to-variable/222030 "2007-04-10T08:35:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![railman](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@railman](https://forum.kirupa.com/u/railman)\
**Post date:** [April 10, 2007, 8:35am UTC](https://forum.kirupa.com/t/cant-write-to-variable/222030/1 "2007-04-10T08:35:41Z")

</div>

Hi! I really need help with this one, i’ve tried to fix it for weeks.  
Basicly I have two movieclips, one can hittest the other. But after the hittest i try to write a variable from the first movie clip to the other:

\_root.tower1.mc = “hi”

Then i have a movieclip inside tower1 where i have:

trace(\_parent.mc)

but i get undefined!

both movieclips are attached using attachmovieclip.

What the hell am I doing wrong? please help me
