# Dynamically add clip from library

**URL:** <https://forum.kirupa.com/t/dynamically-add-clip-from-library/306071>\
**Category:** flash\
**Created:** [March 9, 2010, 7:37am UTC](https://forum.kirupa.com/t/dynamically-add-clip-from-library/306071 "2010-03-09T07:37:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![burger](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@burger](https://forum.kirupa.com/u/burger)\
**Post date:** [March 9, 2010, 7:37am UTC](https://forum.kirupa.com/t/dynamically-add-clip-from-library/306071/1 "2010-03-09T07:37:42Z")

</div>

I have clips in my library (Slide1, Slide2, etc) and I want to add them dynamically, this is how I’m adding them at the mo;

```auto

switch (CS) {
case 1 :
_slide1=new Slide1();
_slide1.alpha=0;
_presentation.addChild(_slide1); Tweener.addTween(_slide1,{alpha:1,time:1,transition:"easeInExpo"});

break;
...

```

this is how I check them;

```auto

public function frameCheck(e:Event):void {
if (this["_slide"+CS].currentFrame==this["_slide"+CS].totalFrames) {
CS++;
addSlide();
}
}

```

any way I can do the first like the second?
