Problem with calling subclass function

i have this problem with calling subclass function
please help
this is how the code is :

package{
    public class A{
        public function  A(){
        //
        }
    }
}
package{
    public  class B extends A{
        public function B(){
        }
         public function bSayHello(){
        //
        }
    }
}
package{
     public class C{
        private var bInstance:A;
        public  function C(){
            bInstance = new B();
             bInstance.bSayHello();
        }
    }
}

and i get this error
1061: Call to a possibly undefined method bSayHellothrough a reference with static type code.bInstance:A.
please help…!!!