package oreilly.cookbook { publicclass Car extends Transport { publicfunction set data(value:Object):void { info = value; speed = value.speed; /* this will throw an error because the speed variable is private and access to it is not allowed to any other class */ } } }
Transport 类的protected属性可用于Car类,但是不能用于把它作为一个属性的其他类实例中。