# as3 vars and packages with same name causing flash builder to throw 3599 error

**URL:** <https://forum.kirupa.com/t/as3-vars-and-packages-with-same-name-causing-flash-builder-to-throw-3599-error/329029>\
**Category:** flash\
**Created:** [July 14, 2012, 4:51pm UTC](https://forum.kirupa.com/t/as3-vars-and-packages-with-same-name-causing-flash-builder-to-throw-3599-error/329029 "2012-07-14T16:51:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![parkerjkir](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@parkerjkir](https://forum.kirupa.com/u/parkerjkir)\
**Post date:** [July 14, 2012, 4:51pm UTC](https://forum.kirupa.com/t/as3-vars-and-packages-with-same-name-causing-flash-builder-to-throw-3599-error/329029/1 "2012-07-14T16:51:48Z")

</div>

[LEFT][COLOR=#000000][FONT=Arial]Just switched to flash builder and working as3 code from flash is throwing lots of 3599 errors:  
[/FONT][/COLOR][COLOR=#000000][FONT=Arial]  
3599 Definition name is the same as an imported package name. Unqualified references to that name will resolve to the package and not the definition.  
[/FONT][/COLOR][COLOR=#000000][FONT=Arial]  
I know that this is due to my packages having the same name as class property vars that reside inside the package, but I don’t know what the best practice is for resolving these name conflicts. The problem is I like to name packages and variables after classes sometimes. for example:[/FONT][/COLOR][/LEFT]

```auto

package icon {
[COLOR=#00008B]import[/COLOR] flash.display.[COLOR=#2B91AF]DisplayObject[/COLOR];
[COLOR=#00008B]import[/COLOR] flash.display.[COLOR=#2B91AF]Graphics[/COLOR];
[COLOR=#00008B]import[/COLOR] flash.display.[COLOR=#2B91AF]Shape[/COLOR];
[COLOR=#00008B]import[/COLOR] flash.display.[COLOR=#2B91AF]Sprite[/COLOR];

[COLOR=#00008B]public[/COLOR] [COLOR=#00008B]class[/COLOR] [COLOR=#2B91AF]IconMaker[/COLOR] extends [COLOR=#2B91AF]Sprite[/COLOR]{

    [COLOR=#00008B]private[/COLOR] [COLOR=#00008B]var[/COLOR] icon:[COLOR=#2B91AF]Icon[/COLOR];

    [COLOR=#00008B]public[/COLOR] [COLOR=#00008B]function[/COLOR] [COLOR=#2B91AF]IconMaker[/COLOR](icon:[COLOR=#2B91AF]Icon[/COLOR]):[COLOR=#00008B]void[/COLOR]{
        [COLOR=#00008B]this[/COLOR].icon = icon;
    }
    [COLOR=#00008B]public[/COLOR] [COLOR=#00008B]function[/COLOR] make():[COLOR=#00008B]void[/COLOR] {
        icon.iconButton = [COLOR=#00008B]new[/COLOR] [COLOR=#2B91AF]IconButton[/COLOR]();
        icon.addChild(icon.iconButton);
    }
}
}

```

[LEFT][COLOR=#000000][FONT=Arial]  
So my question is what is the best practice: underscore prefix (\_icon) or “my” prefix (myicon) or should I rename the package? or what.[/FONT][/COLOR][COLOR=#000000][FONT=Arial]Thank you very much[/FONT][/COLOR][/LEFT]
