At least up to and including FlexBuilder 3, alas, you'll have to declare the type if you want to comply with the compiler's strict-typing rules, and I don't know of an existing "infer this variable's type" feature in there anywhere, either.
I'm sure that's by design, though -- those who want the benefits of strict typing will get them by declaring explicitly, whereas those who might prefer to change what "g" refers to at runtime can appreciate being able to switch off compiler warnings (Project > Properties > Flex Compiler) and do so.
Wish I had a better answer for ya! Perhaps someone else knows of something and can chime in with a more satisfying solution. :)
If it's just the extra characters that bug you, you might try using the Eclipse/FlexBuilder shortcuts (e.g., Ctrl+Space for type auto-completion) -- there's a great list of them here.