This is wrong for following reasons:
public function loop(e:Event, Test):void
{
Test.moveme.scaleX++
Test.moveme.x++
}
- Test - is a class name, if you want to make it as a parameter you should write something like public function loop(e:Event, testObj:Test):void
- The event listener won't pass the testObj. So if you want to use it both with an event listener as an event handler AND be able to call it just by yourself, you should change to public function loop(e:Event = null, testObje:Test = null):void
Then the event listener won't cause the error. Calling the function by itself could be done like this: loop(null, yourInstanceOfTest)
Also, the body of the function is trying to call methods, variables of the class, not the instance, it should be:
{
test.moveme.scaleX++
test.moveme.x++
}
In your case, because test is an instance of the Class, Test is a Class.
But then there is no reason to pass Test as a parameter, just remove it and keep only the e:Event part. If you do want to use it, then use the passed parameter instance, like this:
{
// provided that use passed parameter type of Test as a testObj, like in my example
testObj.moveme.scaleX++
testObj.moveme.x++
}