# Object oriented question

**URL:** https://forum.kirupa.com/t/object-oriented-question/244122
**Category:** flash
**Created:** [November 14, 2007, 2:18pm UTC](https://forum.kirupa.com/t/object-oriented-question/244122 "2007-11-14T14:18:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sumo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/sumo/32/1950_2.png) [@sumo](https://forum.kirupa.com/u/sumo)
#### Post date: [November 14, 2007, 2:18pm UTC](https://forum.kirupa.com/t/object-oriented-question/244122/1 "2007-11-14T14:18:18Z")

</div>

I have a question regarding to object oriented Actionscripting.

I have a class A, which is the document class. Then I have a class B and class C. I create an instance of class B in the document class like this  
[AS]  
var \_b:B = new B();  
addChild(\_b);  
[/AS]  
in class B I create an instance of class C. In class C I want call a method that is defined in class B. How do I do this? As I understand it, I can’t create another instance of class B inside of class C, because I have already done that in class A. So in class C this  
[AS]  
var \_b:B = new B();  
\_b.someMethod();  
[/AS]  
isn’t acceptable? How do call class B’s method from a class that is created in class B?

I hope this makes sense to some of you :sen:
