# External .as, adding scroll bar

**URL:** <https://forum.kirupa.com/t/external-as-adding-scroll-bar/294067>\
**Category:** flash\
**Created:** [August 7, 2009, 8:15pm UTC](https://forum.kirupa.com/t/external-as-adding-scroll-bar/294067 "2009-08-07T20:15:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_Print](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@Mr\_Print](https://forum.kirupa.com/u/Mr_Print)\
**Post date:** [August 7, 2009, 8:15pm UTC](https://forum.kirupa.com/t/external-as-adding-scroll-bar/294067/1 "2009-08-07T20:15:58Z")

</div>

Newbie, First let me say I’m looking for direction, make my project work, and to learn. I would have no problems making the scroll bar inside flash, however to do it in an external file and the code I’m using. I’m totally lost. My project is a scrollable help box inside a flash file.

I call the function with this code from an external AS file:

```auto
private function onHelp():Void {
		
		var obj=m_popupWnd.getValue();

		m_popupWnd.lock();
			
			GlobalCs.help("Help Menu","<span class='bodySmall'> Some lines of text goes here</span>",Style.m_cssStyles,"","",_global.cardRoot);
		} 

```

This is my GlobalCs.as file:

```auto
class GlobalCs
{
	static public function help(strTitle:String, strText:String, cssStyle:TextField.StyleSheet,
		strType:String, owner:MovieClip):MovieClip
	{
		var wnd:MovieClip = Pseudo.PseudoHelp.alert(strTitle, strText, cssStyle, strType, null, owner, "CardAlert");
		wnd.setTheme(Style.m_strTheme);
		wnd.update();
		var nW:Number = Math.min(Stage.width, owner.getW() ? owner.getW() : owner._width); //left positionscreen 
		var nH:Number = Math.min(Stage.height, owner.getH() ? owner.getH() : owner._height); //screen vertical position
		wnd._x = Math.round((nW - wnd.getW()) / 2); //screen right position
		wnd._y = Math.round((nH - wnd.getH()) / 2); //screen position bottom
		wnd.draw();
		return wnd;
	}
}

```

and this is my PseudoHelp.as file:

```auto
class Pseudo.PseudoHelp extends Pseudo.PseudoWindow
{
	static public function alert(strTitle:String, strText:String, cssStyle:TextField.StyleSheet,
		strType:String, null, owner:MovieClip, strClass:String):MovieClip
	{
		var win:MovieClip = createWindow(owner, "mcAlert" + m_nCount, strTitle, "modal", false, strClass); 
		return win;
	}
}

```

The above code will draw a help box and allow me to have text within a draggable box, but I need to make it a srcoll bar to enter more text than can display at one time in a browser window.

I appreciate all posts on direction, and very much understand that people are giving up their time to help.
