You have 2 possibilities.
1. Create a movie with a movieclip in the library and link it to the class ChildSprite.
PHP Code:
package
{
import flash.display.MovieClip;
public class ChildSprite extends MovieClip
{
public function ChildSprite ()
{
this.buttonMode = true;
this.addEventListener("click", onClick);
}
private function onClick (obj:Object)
{
trace("Hello World");
}
}
}
Then create a document class.
PHP Code:
package
{
import flash.display.MovieClip;
import ChildSprite;
public class Example extends MovieClip
{
private var myBut:MovieClip;
public function Example()
{
var myBut:ChildSprite = new ChildSprite();
addChild(myBut);
myBut.x = 100;
myBut.y = 100;
}
}
}
In the Document class field in the fla add: Example and test movie.
2. Create a movie with a movieclip in the library and link it to the class ChildSprite_2, which is basically empty.
PHP Code:
package
{
import flash.display.MovieClip;
public class ChildSprite_2 extends MovieClip
{
public function ChildSprite_2 ()
{
}
}
}
Then create a document class.
PHP Code:
package
{
import flash.display.MovieClip;
import ChildSprite_2;
public class Example_2 extends MovieClip
{
private var myBut:MovieClip;
public function Example_2 ()
{
var myBut:ChildSprite_2 = new ChildSprite_2 ();
addChild(myBut);
myBut.x = 100;
myBut.y = 100;
myBut.buttonMode = true;
myBut.addEventListener("click", onClick);
}
private function onClick (obj:Object)
{
trace("Hello World");
}
}
}
This last example is closer to the original stage example. 
A third possibility is this to mark the movieclip as button.
PHP Code:
package
{
import flash.display.MovieClip;
public class ChildSprite_2 extends MovieClip
{
public function ChildSprite_2 ()
{
this.buttonMode = true;
}
}
}
and then an above script as document class without the buttonmode.