Let me introduce a new project that is a solution for everyone who's feeling a little lack of Axure scripting capabilities.
AXHOOX enables heavy scripting right from Axure authoring environment. Library provides a scripting API reflecting Axure's internals.
scriptContext.get("dynamic-panel-1").setNextState(true);var parent = scriptContext.getParent();parent.fireEvent('OnSomethingSpecial');
Of course it's free and open source. Feel free to use and contribute.