# NOOB Question! reuse scrollbar in other frame

**URL:** <https://forum.kirupa.com/t/noob-question-reuse-scrollbar-in-other-frame/279412>\
**Category:** Uncategorized\
**Created:** [January 14, 2009, 2:34pm UTC](https://forum.kirupa.com/t/noob-question-reuse-scrollbar-in-other-frame/279412 "2009-01-14T14:34:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![prezz](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@prezz](https://forum.kirupa.com/u/prezz)\
**Post date:** [January 14, 2009, 2:34pm UTC](https://forum.kirupa.com/t/noob-question-reuse-scrollbar-in-other-frame/279412/1 "2009-01-14T14:34:45Z")

</div>

Hi,

this is my first time building a website in as3. Still young and learning.  
my problem:

my code in actionsscript 3 timeline scrollbar:

import fl.controls.ScrollBar;  
import fl.events.ScrollEvent;

var mc: txt01MC = new txt01MC();  
mc.x = 405,9  
mc.y = 201

var mcMask:MovieMaskMC = new MovieMaskMC();  
mcMask.x = mc.x;  
mcMask.y = mc.y;  
mc.mask = mcMask;

var sb:ScrollBar = new ScrollBar();  
sb.x = mc.x + mc.width;  
sb.y = mc.y;  
sb.height = mcMask.height;  
sb.enabled = true;  
sb.setScrollProperties(mcMask.height, 0, (mc.height-mcMask.height));  
sb.addEventListener(ScrollEvent.SCROLL, scrollMC);

this.addChild(mc);  
this.addChild(mcMask);  
this.addChild(sb);

function scrollMC(event:ScrollEvent):void{  
mc.y = -event.position + mcMask.y;  
}

Now I want it to use it on another frame, but first I need to delet the child (mc,mcMask,sb) right? how?  
Than is it possible to use the same vars as above?

please help this noob!!!
