# Quick noob oop question 2 :)

**URL:** https://forum.kirupa.com/t/quick-noob-oop-question-2/298212
**Category:** Uncategorized
**Created:** [October 15, 2009, 7:47am UTC](https://forum.kirupa.com/t/quick-noob-oop-question-2/298212 "2009-10-15T07:47:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![regbolD](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@regbolD](https://forum.kirupa.com/u/regbolD)
#### Post date: [October 15, 2009, 7:47am UTC](https://forum.kirupa.com/t/quick-noob-oop-question-2/298212/1 "2009-10-15T07:47:00Z")

</div>

i have 2 classes, class A and class B

in class A i instantiate class B (but class B doesn’t need visual representation, which means i dont use addChild(classBinstance) when i instantiate class B in class A)

in class B i use some stuff like:

var mySprite:Sprite = new Sprite();  
(of some other stuff that needs to be added to the display list)  
so obviously i need to use addChild(mySprite).

now the only way i can think of is to make a getter getMySprite() in class B and then get that sprite from class A and in class A say: addChild(mySprite);

this works but i am not sure it its the right way to do it…
