No, you can't use onCreated() in a GANI script.
onCreated() will overwrite params, and onCreated() will be given no params. So I would do something like this:
PHP Code:
SCRIPT
if (created)
{
play( params[0] );
}
SCRIPTEND
and then do
setAni( "flute_play", "sound1.wav" );
For more advanced gani scripts, you can do
PHP Code:
if ( created )
{
this.args = params;
startScript();
}
function startScript()
{
// Now params is in this.args
doSomething();
}