# OOP problem. class within a class?

**URL:** <https://forum.kirupa.com/t/oop-problem-class-within-a-class/308621>\
**Category:** flash\
**Created:** [April 27, 2010, 7:38am UTC](https://forum.kirupa.com/t/oop-problem-class-within-a-class/308621 "2010-04-27T07:38:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Geki](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@Geki](https://forum.kirupa.com/u/Geki)\
**Post date:** [April 27, 2010, 7:38am UTC](https://forum.kirupa.com/t/oop-problem-class-within-a-class/308621/1 "2010-04-27T07:38:07Z")

</div>

Hey,

I’m quite new to OOP and have come to a problem.

Lets say I have a ‘hands’ class that I use so:

_var h:hands = new hands(0);_ //this gives me the first hand  
_var h2:hands = new hands(1);_ // this gives me the second hand

now. The problem comes when I want to be able to kind of get to a class within a class like so:

_var h:hands = new hands(0).fingers(0);_

If possible I’d also like the fingers class to be on a different .as file than the hands file. How do I do this?
