# Problems with child reference and links

**URL:** <https://forum.kirupa.com/t/problems-with-child-reference-and-links/301680>\
**Category:** flash\
**Created:** [December 13, 2009, 10:37pm UTC](https://forum.kirupa.com/t/problems-with-child-reference-and-links/301680 "2009-12-13T22:37:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marjoth](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@Marjoth](https://forum.kirupa.com/u/Marjoth)\
**Post date:** [December 13, 2009, 10:37pm UTC](https://forum.kirupa.com/t/problems-with-child-reference-and-links/301680/1 "2009-12-13T22:37:15Z")

</div>

I’m trying to learn ActionScript, but I end up with errors, even though my code seems fine.

Case 1:  
If I go to “Show Pictures” first, the animation plays fine. But when I go to “Play Movie” afterwards, I get a “Child object reference cannot be null” because I want to remove a button from stage. Has the reference changed? It seems completly unlogical!

Also, when I go forth and back betweens the two links, the links suddently stops working! I have added eventlisteners in the first frame, and the instance names of the buttons are the same everywhere.

If someone could help me point out the problem, I would be very grateful!

My project: [http://www.stalo.org/external/dockdrop/mediaProject.fla](http://www.stalo.org/external/dockdrop/mediaProject.fla)

Thanks.
