# Scope of object in library issue

**URL:** <https://forum.kirupa.com/t/scope-of-object-in-library-issue/275701>\
**Category:** Uncategorized\
**Created:** [November 17, 2008, 6:46pm UTC](https://forum.kirupa.com/t/scope-of-object-in-library-issue/275701 "2008-11-17T18:46:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobcahill](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bobcahill](https://forum.kirupa.com/u/bobcahill)\
**Post date:** [November 17, 2008, 6:46pm UTC](https://forum.kirupa.com/t/scope-of-object-in-library-issue/275701/1 "2008-11-17T18:46:38Z")

</div>

I am working on an application that dynamically populates the program with assets from the library. I have a simple need to call a function from the root timeline. so in the AS layer of the Object I have the following

pr\_01\_01\_pdf.addEventListener(MouseEvent.CLICK, sendPDF);  
function sendPDF(event:MouseEvent):void {  
root.openPDF(event.target.name);  
}

I get the following error: 1061: Call to a possibly undefined method openPDF through a reference with static type flash.display:DisplayObject.

I have about 45 of these that go in the application and I basically need the hyperlink to call a function with the targeted name.
