Lieve, That was the answer!! Thank you so much!! I made an interactive widget with Captivate (on the main menu under File => New Project => Widget , chose "interactive", not static, from the Create a Widget box dropdown. I created an action layer inside Flash in the widget and added my code. I also had to add a call to the setSuccess() method (this is in the code that Captivate adds to the widget, it sets success to true) to my own code on the action layer, before I set cpCmndGotoSlide to the number from my text file.
I published my widget and added it to my project. In the properties window I now saw "On Success" in the action panel. I chose "Execute Advanced Action" and set it to my ResumePrevious advanced action!
Your articles on advanced actions have helped me so much in learning how to get the most out of Captivate.