# AS3: Using objects when accessing a public function problem

**URL:** <https://forum.kirupa.com/t/as3-using-objects-when-accessing-a-public-function-problem/287640>\
**Category:** flash\
**Created:** [May 4, 2009, 4:25pm UTC](https://forum.kirupa.com/t/as3-using-objects-when-accessing-a-public-function-problem/287640 "2009-05-04T16:25:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jessicaD](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@jessicaD](https://forum.kirupa.com/u/jessicaD)\
**Post date:** [May 4, 2009, 4:25pm UTC](https://forum.kirupa.com/t/as3-using-objects-when-accessing-a-public-function-problem/287640/1 "2009-05-04T16:25:28Z")

</div>

Hi people,

I have (may be a simple solution needed) a problem with a class I’ve wrote. I’ve wrote a class named Navigation (code: [http://pastebin.com/m1858bb23](http://pastebin.com/m1858bb23)) and in there I make all the buttons for the navigation. Next to that I have a Ipage class (code: [http://pastebin.com/m4a081551](http://pastebin.com/m4a081551)) and in there I have all the pages stored. When I click on a button, the Navigation Class is called and tries to access the public function ChangePage in the Ipage class. In the ChangePage function I trace if the function is called and the trace comes back. So it works… BUT if I want to access another object it’s not working. I can’t even set sprites on visible = false. Can someone tell me what is going wrong?

Thanks in advance!

Bye Jessica
