# Can't make UIScrollBars appear in published SWF

**URL:** https://forum.kirupa.com/t/cant-make-uiscrollbars-appear-in-published-swf/325826
**Category:** flash
**Created:** [November 7, 2011, 4:25am UTC](https://forum.kirupa.com/t/cant-make-uiscrollbars-appear-in-published-swf/325826 "2011-11-07T04:25:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rassy7](https://avatars.discourse-cdn.com/v4/letter/r/977dab/32.png) [@rassy7](https://forum.kirupa.com/u/rassy7)
#### Post date: [November 7, 2011, 4:25am UTC](https://forum.kirupa.com/t/cant-make-uiscrollbars-appear-in-published-swf/325826/1 "2011-11-07T04:25:31Z")

</div>

So I’ve thumbed around a little through Google, looking at other threads trying to figure out why I can make my UIScrollBars preview all right, but not get them to show up in teh SWF after it’s published.

I’m coding the whole thing. I did add the UIScrollBar component to my library and imported the UIScrollBar class, but there is nothing on the timeline. I’ve read stuff about linking to library components or something along those lines. I’m not sure if that’s what I’m missing. Any help would be great. Here’s the code:

// There classes ar imported  
// Sprite is extended

import flash.display.Sprite;  
import flash.text.TextField;  
import flash.text.TextFormat;  
import flash.events.Event;  
import flash.events.MouseEvent;  
import flash.net.navigateToURL;  
import flash.net.URLLoader;  
import flash.net.URLRequest;  
import flash.text.TextFormatAlign;  
import fl.controls.UIScrollBar;  
import flash.display.Loader;  
import flash.net.URLRequest;

// ALL of my UIScrollBar code  
var scrollText1:UIScrollBar = new UIScrollBar();  
scrollText1.x = displaytext2.x + displaytext2.width;  
scrollText1.y = displaytext2.y;  
scrollText1.height = displaytext2.height;  
scrollText1.width = 15;  
scrollText1.scrollTarget = displaytext2;

var scrollText2:UIScrollBar = new UIScrollBar();  
scrollText2.x = displaytext3.x - 15;  
scrollText2.y = displaytext3.y;  
scrollText2.height = displaytext3.height;  
scrollText2.width = 15;  
scrollText2.scrollTarget = displaytext3;

addChild(scrollText1);  
addChild(scrollText2);

~Thanks … Josh
