# Beginner question

**URL:** <https://forum.kirupa.com/t/beginner-question/316350>\
**Category:** Uncategorized\
**Created:** [November 19, 2010, 1:19am UTC](https://forum.kirupa.com/t/beginner-question/316350 "2010-11-19T01:19:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tolgainam](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tolgainam](https://forum.kirupa.com/u/tolgainam)\
**Post date:** [November 19, 2010, 1:19am UTC](https://forum.kirupa.com/t/beginner-question/316350/1 "2010-11-19T01:19:37Z")

</div>

Hello (:

I have the fallowing classes,  
tavla.as which is the document class also is:

```auto

package tavla {
	
	import flash.display.MovieClip;
		
	public class tavla extends MovieClip {
													   //
private var blackChecker:Array = [2,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,3,0,5,0,0,0,0,0];
private var whiteChecker:Array = [0,0,0,0,0,5,0,3,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,2];
		
		var blackArray:Array = new Array();
		
		public function tavla() {
			startButton = new startButton();

						
		}
		
		public function startUpBlack() {
// Some Code here
}

```

and the startButton class is:

```auto

package tavla {
	
import flash.events.MouseEvent;
import flash.Display.Sprite;
	
	public class startButton {

		public function startButton() {
			// constructor code
			startButtoni.gotoAndStop(1);
			startButtoni.addEventListener(MouseEvent.CLICK, startUpT);
		}
		
				function startUpT(e:MouseEvent){
					trace('hola');
			startButtoni.gotoAndStop(2);
			startUpBlack();
				
		}
					
		}
			
}

```

And finally I have a image in my Library which is goig to be the startButtoni of the future.

Now what I want to achive is, and I know most of you guessed,

1- I want to draw that button in my Lib on to the stage  
2- and when I press it I want it to work (in this case call startUpBlack(); function inside the document class (tavla.as) )

I am new to AS3 and getting some trouble at the moment.

Thank you very much.
