Skip to main content
Participant
February 8, 2010
Question

Flash navigation in captivate

  • February 8, 2010
  • 2 replies
  • 2420 views

Hi,

I would like to be able incorporate Flash buttons into Captivate 4 projects to navigate between slides ( and potentially a lot more). I have searched the web trying to find the necessary actionscript 3 code, but have been unsuccessful, so I would appreciate anyone’s help.

I have set the Captivate 4 file to AS3

I have created two button in Flash , giving them instance names of: SlideOneButton and SlideOneButton

Does anyone know what actionscript 3 code in Flash I will need to add to make the buttons when placed into Captivate as .swfs work?

Here is a link to some example files I have created: http://dl.dropbox.com/u/119560/Captivate%20and%20Flash.zip

I would like the code to use AS3 code. Any help will be greatly appreciated

I have tried using actionscript 3 code with captivate variables – no luck. Any ideas?

Thanks

Ian

    This topic has been closed for replies.

    2 replies

    Participating Frequently
    June 7, 2010


    To avoid hardcoding a different target for each button in your project (unless this was your original intent?), shouldn't it be possible to make the navigation code relative to the current slide, as in:

    mainmov.rdcmndGotoSlide = mainmov.rdinfoCurrentSlide + 1

    I don't claim to be a Flash developer, but I belive this should allow any instance of the button to always go to the next slide, rather than always go to slide 2 as in the original example:

    mainmov.rdcmndGotoSlide = 1

    Cheers,

    John

    Legend
    June 8, 2010

    John,

    You are exactly right!  You could also use the rdcmndNextSlide command.  You think like a Flash developer... are you sure you're not one?

    Jim Leichliter

    Legend
    February 8, 2010

    Hi Ian,

    I used the below code for jumping to slide 2 using your button:

    import flash.events.*;

    var mainmov:MovieClip = MovieClip(root);

    this.addEventListener(MouseEvent.MOUSE_UP, mouseReleaseSlide1Btn);

    function mouseReleaseSlide1Btn(event:Event):void {
        //Go to slide 2
        mainmov.rdcmndGotoSlide = 1; // rdcmndGotoSlide uses a zero based index
    }

    Hope that helps,

    Jim Leichliter

    IanGil123Author
    Participant
    February 8, 2010

    Hi Jim,

    Thank you very much for the quick response. I have copied your code, gone back to Flash and added it to the button (assigned to a keyframe), then published the button file as an .swf. Then put the swf back into captivate - is that the correct way to use? at the moment it isn't working for me - i'm gonna try again.

    Thanks very much for your help

    Ian

    Legend
    February 8, 2010

    Ian,

    I've attached the Slide1Button.fla to this post and added some more comments to the code.  Publish this and import the swf as an animation on the first slide.  When clicked, it will take you to slide 2.

    HTH,

    Jim Leichliter