# OOP: Multiple Classes accessing the same variable without making it public?

**URL:** <https://forum.kirupa.com/t/oop-multiple-classes-accessing-the-same-variable-without-making-it-public/211062>\
**Category:** flash\
**Created:** [December 26, 2006, 7:52pm UTC](https://forum.kirupa.com/t/oop-multiple-classes-accessing-the-same-variable-without-making-it-public/211062 "2006-12-26T19:52:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fuzzyfluid](https://avatars.discourse-cdn.com/v4/letter/f/fbc32d/32.png) [@fuzzyfluid](https://forum.kirupa.com/u/fuzzyfluid)\
**Post date:** [December 26, 2006, 7:52pm UTC](https://forum.kirupa.com/t/oop-multiple-classes-accessing-the-same-variable-without-making-it-public/211062/1 "2006-12-26T19:52:31Z")

</div>

hi guys, i just like u to know i’m simply looking for the best appropriate approach to go about this.

i’ve got two classes and i’m not extending to MovieClip. I like to attach the mc in the constructor just because i’ll be working with different MC’s that have the same purpose.

however, im using private var loadedMC:Movieclip and now i’ve got another class that needs to be able to access the instance’s variable.

for example, myClass.loadedMC , but this would mean having to make it public and I rather not go that route.

Any ideas?
