Hi

georgecalgary's answer was enough to help me. Taking my posted code as an example, I simply changed this line

public function test() : void

to

public function test(stageisplayObject) : void

and callled it like this :

var tester:Main = new Main()
tester.test(stage)