# Use of packages

**URL:** https://forum.kirupa.com/t/use-of-packages/225013
**Category:** flash
**Created:** [May 8, 2007, 3:59am UTC](https://forum.kirupa.com/t/use-of-packages/225013 "2007-05-08T03:59:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jsimpson](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jsimpson/32/3031_2.png) [@jsimpson](https://forum.kirupa.com/u/jsimpson)
#### Post date: [May 8, 2007, 3:59am UTC](https://forum.kirupa.com/t/use-of-packages/225013/1 "2007-05-08T03:59:40Z")

</div>

I’m slowly making the move to AS3 and am having a few difficulties along the way. One is packages, specifically the scope ans use of them.

Does the package name have to reflect the directory structure. Can I have something like this:  
package com.media.news{

Without that being the current directory structure? Or must the directories reflect the naming convention? Also what is the scope of calling import on a package?

Say the full path is flash/actionscript/com/media/news… can I import that package from flash/testing/curProject?

Also one last question. If I wanted to build a package that was a library of functions, could I do this?

package utils{  
public function f1(){}

public function f2(){}  
}

Thanks for any help.
