# AS3.0 Project Structure - Placement of Actionscript code

**URL:** <https://forum.kirupa.com/t/as3-0-project-structure-placement-of-actionscript-code/294816>\
**Category:** flash\
**Created:** [August 20, 2009, 8:22am UTC](https://forum.kirupa.com/t/as3-0-project-structure-placement-of-actionscript-code/294816 "2009-08-20T08:22:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JimTester](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@JimTester](https://forum.kirupa.com/u/JimTester)\
**Post date:** [August 20, 2009, 8:22am UTC](https://forum.kirupa.com/t/as3-0-project-structure-placement-of-actionscript-code/294816/1 "2009-08-20T08:22:25Z")

</div>

Hi

I hope you can help.

**Question**  
How do you access a MovieClip on stage (which has an instance name) from within a .AS class file (where the class file is not the document class)?

**Background:**  
I have an instance name on stage called “world”  
Within that I have another MC called “hitCountBelt”  
Within that I have a textfield called “hitCount”

So in my external class (PushHitCount.as) I’m trying to populate the text property of hitCount something like this:

world.hitCountBelt.hitCount.text = “999”;  
//Where 999 actually gets replaced by a value returned from an .aspx script

The trouble is - I don’t know how to correctly access the MC instances on stage from within this external class file.

Am I approaching this the wrong way in terms of project structure? Should I even be trying to access the instances this way?

Can anyone help?

Thanks a bunch

James 🙂
