References to the classes by using their full name
package { import com.example.shapes.Rectangle; import flash.geom.Rectangle; public class PackagesTest { public function PackagesTest() { var a:com.example.shapes.Rectangle = new com.example.shapes.Rectangle(); var b:flash.geom.Rectangle = new flash.geom.Rectangle(); } } } package com.example.shapes { public class Rectangle { // define Rectangle here. } }