# Return value on function

**URL:** <https://forum.kirupa.com/t/return-value-on-function/279551>\
**Category:** Uncategorized\
**Created:** [January 16, 2009, 12:47am UTC](https://forum.kirupa.com/t/return-value-on-function/279551 "2009-01-16T00:47:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Icy\_Penguin](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@Icy\_Penguin](https://forum.kirupa.com/u/Icy_Penguin)\
**Post date:** [January 16, 2009, 12:47am UTC](https://forum.kirupa.com/t/return-value-on-function/279551/1 "2009-01-16T00:47:30Z")

</div>

So I’m using the Full-Browser scrollbar for AS3, and am trying to customize it a bit in terms of the look of it, so in OBO\_FullScrollBar.as, I’m modifying the createScroller method and am using a Loader to grab another SWF’s (assets/swfs/assets.swf) library.

In that library, I have a scroller MovieClip with a linkage ID of “Scroller”. My onLoadComplete method looks like this:

```auto
var scroller:Class = e.target.applicationDomain.getDefinition("Scroller");
            var temp:DisplayObject = new scroller();

```

So I end up with a DisplayObject of that Library item.

My problem is this:

How do I return that DisplayObject in the createScroller method (the swf obviously has to load before it is returned)?
