Yeah you can;
package com.package
{
public class MyClass()
{
}
}
internal class Utility
{
public function Utility()
{
}
}
It's good for structs and utility classes. You can also declare package functions to.
function myTrace()
{
}
Then you wouldn't have to create the class just to use the function.
Peace, Mike
On 7/16/06, Andy McIntosh <[EMAIL PROTECTED]> wrote:In beta 2, the DragManager.as file contained 2 classes: DragManager and DragProxy. In the production release, DragProxy is in it's own .as file and lives in a dragClasses package. What's the advantage of breaking it out into another .as file? Exposing it so it can be extended? Is it still possible to have internal classes? In the source from Beta 2, the DragManager class in DragManager.as was declared as public and DragProxy wasn't declared public or private. I'm trying to do something similar with the production release and it's complaining about "A file found in a source-path can not have more than one externally visible definition." Declaring the internal class as private causes flex to complain, "The private attribute may be used only on class property definitions."
The entire concept of multiple classes per .as file seemed really bizarre to me at first, but I sort of understand the appeal now. I don't *need* to have an internal class, but I thought I'd give it a shot to keep the file structure a bit tighter.
Andy
-- What goes up, does come down.