# Simple Question: Importing Package Functions

**URL:** <https://forum.kirupa.com/t/simple-question-importing-package-functions/255643>\
**Category:** flash\
**Created:** [March 25, 2008, 3:59pm UTC](https://forum.kirupa.com/t/simple-question-importing-package-functions/255643 "2008-03-25T15:59:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alpha\_eX](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Alpha\_eX](https://forum.kirupa.com/u/Alpha_eX)\
**Post date:** [March 25, 2008, 3:59pm UTC](https://forum.kirupa.com/t/simple-question-importing-package-functions/255643/1 "2008-03-25T15:59:06Z")

</div>

Hi everyone,

I’m new to Flash AS3, just trying to get my head around it. At the moment I’m trying to figure out packages and how to make a package full of functions.

I wrote a package with a function in it, I want to import this package and be able to use the function in it.

```auto
//Align.as

package com.madebyluke.display.align
{
	import flash.display.MovieClip;
	
	function alignCenter(target:MovieClip):void
	{
		target.x = stage.stageWidth/2 - target.width/2;
		target.y = stage.stageHeight/2 - target.height/2;
	}
}

```

```auto
//Align_exanple.fla

import com.madebyluke.display.align.Align;
alignCenter(box_center);

```

With that code, I get the following error,

```auto

ReferenceError: Error #1065: Variable alignCenter is not defined.
	at align_example_fla::MainTimeline/align_example_fla::frame1()

```

Any idea what I’m doing wrong, the path for the packages is fine, I already have a class working in another example.
