# "1120: Access of undefined property" error, need help with howto

**URL:** <https://forum.kirupa.com/t/1120-access-of-undefined-property-error-need-help-with-howto/276311>\
**Category:** Uncategorized\
**Created:** [November 25, 2008, 6:27pm UTC](https://forum.kirupa.com/t/1120-access-of-undefined-property-error-need-help-with-howto/276311 "2008-11-25T18:27:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jebediah](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jebediah](https://forum.kirupa.com/u/jebediah)\
**Post date:** [November 25, 2008, 6:27pm UTC](https://forum.kirupa.com/t/1120-access-of-undefined-property-error-need-help-with-howto/276311/1 "2008-11-25T18:27:29Z")

</div>

I’m struggling to adapt to AS3… I was an AS2 hack and now I’m paying for it.

I’ve tried set up a function to toggle the visiblity on an MC that gets created at runtime. Obviously the compiler wants that movieclip to be there to validate the code before I want the MC to be there. I think.

So, how do I go about setting a toggle on an MC’s visiblity from a keystroke in AS3?

Thanks!

Jeb
