joe,
afraid your code's getting worse!
there's three main issues -
1. as kglad said, "you can't get a return from a listener
function". this means that your getGreenInfo function should return
void, NOT Number.
2. this also means that your event handler(aka listener
function) should not have the following line:
return greenNumber;
3. but wait! the return is actually stopping your trace line
from being called. but your trace line at the moment:
trace(getGreenInfo());
is self-referential, meaning that it is calling the function
it is in, and your computer will hang for a little while until
flash works out there's a never-ending loop.
so anyway, what are you trying to do? if you want to trace
the currentFrame of greenbar every frame, then this will
suffice: