# How to load library symbols from .as file?

**URL:** <https://forum.kirupa.com/t/how-to-load-library-symbols-from-as-file/241153>\
**Category:** flash\
**Created:** [October 10, 2007, 2:55pm UTC](https://forum.kirupa.com/t/how-to-load-library-symbols-from-as-file/241153 "2007-10-10T14:55:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![schmichael](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@schmichael](https://forum.kirupa.com/u/schmichael)\
**Post date:** [October 10, 2007, 2:55pm UTC](https://forum.kirupa.com/t/how-to-load-library-symbols-from-as-file/241153/1 "2007-10-10T14:55:51Z")

</div>

Hi there, I want to load symbols from the library in Flash using a .as file. I have a custom class that should trigger this to happen but I am not sure of the syntax to do it.

I have checked a tutorial:  
[http://www.bit-101.com/blog/?p=853](http://www.bit-101.com/blog/?p=853)

Which explains what to do but this does not seem to work when using flash alone.

Currently I have objects in my library names ‘star’, ‘square’ and 'circle. Here is my .as file:

[AS]  
package  
{  
import flash.display.Sprite;  
import flash.display.StageAlign;  
import flash.display.StageScaleMode;

```
public class App extends Sprite
{
    [Embed(source="library.swf", symbol="star")]
    private var Star:Class;

    [Embed(source="library.swf", symbol="square")]
    private var Square:Class;

    [Embed(source="library.swf", symbol="circle")]
    private var Circle:Class;

    public function App()
    {
        init();
    }

    private function init():void
    {
        stage.scaleMode = StageScaleMode.NO_SCALE;
        stage.align=StageAlign.TOP_LEFT;

        var star:Sprite = new Star();
        addChild(star);
        star.x = 100;
        star.y = 100;

        var square:Sprite = new Square();
        addChild(square);
        square.x = 200;
        square.y = 100;

        var circle:Sprite = new Circle();
        addChild(circle);
        circle.x = 300;
        circle.y = 100;
    }
}

```

}[/AS]  
This runs but I can’t see my symbols,if someone could let me know the syntax to do this I would be very grateful 🙂

Thanks in advance 🙂  
Schm
