<p>What I'd like to do is something like the following:</p>

<pre><code>FooClass.prototype.method = function():String
{
    return "Something";
}

var foo:FooClass = new FooClass();
foo.method();
</code></pre>

<p>Which is to say, I'd like to extend a generated class with a single method, not via inheritance but via the prototype.</p>

<p>The class is generated from a WSDL, it's not a dynamic class, and I don't want to touch the generated code because it will be overwritten anyway.</p>

<p>Long story short, I'd like to have the moral equivalent of C# 3:s Extension Methods for AS3.</p>

<p>Edit: I accepted aib's answer, because it fits what I was asking best -- although upon further reflection it doesn't really solve my problem, but that's my fault for asking the wrong question. :) Also, upmods for the good suggestions.</p>

Yes, such a thing is possible.
In fact, your example is very close to the solution.
Try
```
```
foo["method"]();
```
```
instead of
```
```
foo.method();
```
```