# Accessing stage items while main class inheritance

**URL:** <https://forum.kirupa.com/t/accessing-stage-items-while-main-class-inheritance/321936>\
**Category:** flash\
**Created:** [May 5, 2011, 9:35am UTC](https://forum.kirupa.com/t/accessing-stage-items-while-main-class-inheritance/321936 "2011-05-05T09:35:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rambosz](https://avatars.discourse-cdn.com/v4/letter/r/0ea827/32.png) [@rambosz](https://forum.kirupa.com/u/rambosz)\
**Post date:** [May 5, 2011, 9:35am UTC](https://forum.kirupa.com/t/accessing-stage-items-while-main-class-inheritance/321936/1 "2011-05-05T09:35:08Z")

</div>

I try to access stage items (made in flash graphics editor) through inherited class. But I can’t

I’ve made it this way

1. I made clip and it’s main class (eg. timeline.as) - at this point it works
2. I put code from main class to another class (eg. timeline\_template.as) and in main class (timeline.as) I inherit it by :

public dynamic class timeline extends timeline\_template {

1. I added stage items declarations in timeline\_template.as because without that any code couldn’t reach target an I got

1120: Access of undefined property xxx

error on each item

after these steps whole clip works but items on stage ( buttons, etc. ) are not affected by code. That’s logical because code references to properties declared in timeline\_template but not in timeline.fla. But how to get around that - I need several usage of timeline\_template and I would like to avoid code redundancy
