# Library Linkage to an .as class

**URL:** <https://forum.kirupa.com/t/library-linkage-to-an-as-class/258062>\
**Category:** flash\
**Created:** [April 20, 2008, 1:36pm UTC](https://forum.kirupa.com/t/library-linkage-to-an-as-class/258062 "2008-04-20T13:36:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikomax](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nikomax/32/3664_2.png) [@nikomax](https://forum.kirupa.com/u/nikomax)\
**Post date:** [April 20, 2008, 1:36pm UTC](https://forum.kirupa.com/t/library-linkage-to-an-as-class/258062/1 "2008-04-20T13:36:29Z")

</div>

Hi there.

I’m starting my first AS3 project and I’m trying to make a generic Pre-loader class which is the document class of my Pre-loader .fla.

I have made my logo in CS3 and set the linkage class but I can’t access it from the document class, in fact with this code I can only use it in the .fla’s time line.

Is there something I’m doing wrong, I basically want to load library item from .as files.

```php

package {

    import flash.display.*;
    import flash.events.*;

    public class Preloader extends Sprite {

        public function Preloader() {
           //This section here works in the fla's time line
            var _loaderLogo:Logo = new Logo();
            _loaderLogo.x = _loaderLogo.y = 100;
            addChild(_loaderLogo);

        }
    }
}

```
