I've come accross may Avi incorporating scripts, none of which have worked (For me anyway, I don't know about anyone else)
But, might I suggest, if you have Macromedia Flash, you could always use this:
http://rmxp.org/forums/index.php?topic=35668.0
It's not AVI, but I've found that it works, it's only a suggestion.
(Maybe you could import the AVI into flash?)