# How do I access a function in one class from another?

**URL:** <https://forum.kirupa.com/t/how-do-i-access-a-function-in-one-class-from-another/320414>\
**Category:** flash\
**Created:** [March 23, 2011, 12:51am UTC](https://forum.kirupa.com/t/how-do-i-access-a-function-in-one-class-from-another/320414 "2011-03-23T00:51:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RichGags](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/richgags/32/685_2.png) [@RichGags](https://forum.kirupa.com/u/RichGags)\
**Post date:** [March 23, 2011, 12:51am UTC](https://forum.kirupa.com/t/how-do-i-access-a-function-in-one-class-from-another/320414/1 "2011-03-23T00:51:32Z")

</div>

I have a AS3 MP3 player. The player class controls the play and pause buttons. The playlist class loads the track names into a playlist from XML. In the playlist is a download button. When the download button is pressed, I want the player to pause. I thought I could just \_player.pause(); from the playlist class but it doesnt work.

How do I access the function in the MP3 player class from the playlist class?

Thanks!  
Rich
