AS3/flex newbi - please help


I have just started learning AS3/flex with lynda essentila AS3 training CD.

i have downloaded flex2.

when i tried the first CD writing a simple class i get errors. can anyone please check the codes and guide me here. i’m doing exaactly as its in the CD. maybe not exactly…??

ok heres the code for the new class.

[LEFT]    package com.lynda.as3et.programmingbasics{
    public class InventoryItem    {
    private var _productName:String;
    private var _quantity:Number;
    public function InventoryItem(productName:String,quantity:Number) {
        _productName = productName;
        _quantity    = quantity;
    public function getProductName():String {
        return _productName;
    public function getQuantity():Number {
        return _quantity;
    public function addItems(quantity:Number):void {
        _quantity += quantity;

and this is importing that class to use it


    package {
    import flash.display.Sprite;
    import com.lynda.as3et.programmingbasics.InventoryItem;
    public class ProgrammingBasics extends Sprite
        var item:InventoryItem = new InventoryItem("Test Item",1000);


but when debugged it gives this error:
1120: Access of undefined property item…

Please Help me