Skip navigation
Currently Being Moderated

gotoAndStop is Erratic

Jun 28, 2012 8:08 AM

I am building a Flash (Pro CS6) interface for use in Captivate 5.5.  It has a pause button which, when clicked, should stop playback, then jump to frame 10 where the play button appears.  The play button, when clicked, should resume playback then jump to frame 1 where the pause button appears again.


Previewing in Flash (using F12), clicking on Pause does nothing; no jumping, and Play never appears.


If I change the MovieClip declaration to (root), the Pause/Play buttons cycle properly (but without issuing any commands to Captivate).


There are Replay and Restart buttons on the UI as well, which always seem to work.


Help!  Thanks.


This is the code for Frame 1, with the Pause button (PausePlay).


// Stop Playback at this frame and wait



// Importation and Decalration

import flash.display.MovieClip;


var captivate:MovieClip = MovieClip (root.parent.root); // The problem may live here.

var now:Number = captivate.cpInfoCurrentSlide;


// Pause button, on click, jump to frame 10 and pause Cap playback

PausePlay.addEventListener (MouseEvent.CLICK,away);


function away (event:MouseEvent):void {
    captivate.rdcmndPause = 1;
    gotoAndStop (10);


// Replay button, on click, have Cap start the current slide again

Replay.addEventListener (MouseEvent.CLICK, noJump);


function noJump (event:MouseEvent):void {
    captivate.cpCmndGotoSlideAndResume = now - 1;


// Restart button, on click, Cap will jump to slide 2 to restart session from the beginning

Restart.addEventListener (MouseEvent.CLICK, reStart);


function reStart (event:MouseEvent):void {
    captivate.cpCmndGotoSlideAndResume = 1;


  • kglad
    72,340 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 28, 2012 10:22 AM   in reply to dcrouse10

    var captivate:MovieClip = MovieClip (root.parent.root); // is incorrect.


    what that should be i'm unable to say without knowing the relationship between the fla that contains your code and your captivate swf.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points