problems sending arguments to function in XML file

Hi Clifton,
Thanks for the update.
I'm still plodding on, 1 step forward 2 steps back most of the time. To reduce the size of my TBK file and make the Dump Book Actions function work again I want to put as many of my shared actions as possible into an XML file. Working without an action scripts TXT file makes debugging very difficult.
I cannot manage to pass arguments to my XML defined function. Here is the shared action I am trying to replace. There are no problems with this version.

Because I don't know exactly when and where it is used in the program I need to keep part of the shared script like this.

My XML version looks like this.
And it returns this

which is not helpful. I notice that in your javascript example you put square brackets around the argument list. Would it perhaps work if I added "[" & at the beginning of the args variable and & "]" at the end? This is about the only thing I have not tried yet. I should have tried this before I put the original shared action back (just to end on a positive outcome). I suspect the mixture of text and integers is causing the problem.
Thanks for your time
John
Thanks for the update.
I'm still plodding on, 1 step forward 2 steps back most of the time. To reduce the size of my TBK file and make the Dump Book Actions function work again I want to put as many of my shared actions as possible into an XML file. Working without an action scripts TXT file makes debugging very difficult.
I cannot manage to pass arguments to my XML defined function. Here is the shared action I am trying to replace. There are no problems with this version.
Because I don't know exactly when and where it is used in the program I need to keep part of the shared script like this.
My XML version looks like this.
- Code: Select all
<function name="setPauseTime" event="" params="reply,replyN1,replyN2,preview,MSecs,unit,currentTrigger,txt">
<![CDATA[
alert (replyN1 + ' ' + replyN2 + ' ' + reply); //Cancel,No limit!!
if (reply == replyN1 || reply == replyN2)
{
tbfunction_pgTBObjSet("info","user","nextAction," + 8);
tbfunction_pgTBObjSet("info","user","stage," + 1);
tbfunction_showRequest("294`1","190`1","180`1"); //Do you want the media player to continue without pausing?!!
}
else //Pause time is in reply.!!
{
if (preview == 3)
{
tbfunction_pause1(reply,MSecs,unit,currentTrigger)
}
else if (preview == 4)
{
tbfunction_pause2(reply,MSecs,unit,txt,currentTrigger)
}
}
]]>
</function>
And it returns this
which is not helpful. I notice that in your javascript example you put square brackets around the argument list. Would it perhaps work if I added "[" & at the beginning of the args variable and & "]" at the end? This is about the only thing I have not tried yet. I should have tried this before I put the original shared action back (just to end on a positive outcome). I suspect the mixture of text and integers is causing the problem.
Thanks for your time
John