Deprecated: Function create_function() is deprecated in /www/webvol12/wr/17cxwq4osjf482g/vitomir.megakrafts.com/public_html/wp-content/themes/megafolio/functions.php on line 78

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; six_banners_widget has a deprecated constructor in /www/webvol12/wr/17cxwq4osjf482g/vitomir.megakrafts.com/public_html/wp-content/themes/megafolio/includes/6-banners.php on line 3

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; two_banners_widget has a deprecated constructor in /www/webvol12/wr/17cxwq4osjf482g/vitomir.megakrafts.com/public_html/wp-content/themes/megafolio/includes/2-banners.php on line 3

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; one_banner_widget has a deprecated constructor in /www/webvol12/wr/17cxwq4osjf482g/vitomir.megakrafts.com/public_html/wp-content/themes/megafolio/includes/1-banner.php on line 3
Flash to Adobe Captivate Using System Variables - Vitomir Gojak Flash to Adobe Captivate Using System Variables - Vitomir Gojak

 Flash to Adobe Captivate Using System Variables

Using Adobe Captivate system variables allows you to add extra functionality to your projects. Full list of variables can be found here. Very, very useful post to help you grasp CP system variables basics.

Here you can find example of external flash Table of Contents (TOC) that uses simple movie clips buttons and  basic variable, such is advancing to a certain slide:  cpCmndGotoSlide. Also, this flash example is based on movie clip visible = true/false function.

 

The main action script looks like this:

[cc lang=’actionscript3′ line_numbers=’false’]
//AS3 SWF External TOC For Adobe Captivate 5.5
stop();

import flash.events.*;
import flash.display.*;

//hide all except TOC button

toc.visible = false;
btn1.visible = false;
btn2.visible = false;
btn3.visible = false;
title1.visible = false;
closeMe.visible = false;
home.visible = false;

//add action
var myRoot:MovieClip=MovieClip(root);
var mainmov:MovieClip=MovieClip(myRoot.parent.root);

home.addEventListener(MouseEvent.MOUSE_UP, mouseReleaseSlide1Home);
function mouseReleaseSlide1Home(event:Event):void {
toc.visible = false;
btn1.visible = false;
btn2.visible = false;
btn3.visible = false;
title1.visible = false;
closeMe.visible = false;
home.visible = false;
mainmov.rdcmndGotoSlide = 1;
return;
}
btn1.addEventListener(MouseEvent.MOUSE_UP, mouseReleaseSlide2Btn);
function mouseReleaseSlide2Btn(event:Event):void {
toc.visible = false;
btn1.visible = false;
btn2.visible = false;
btn3.visible = false;
title1.visible = false;
closeMe.visible = false;
home.visible = false;
mainmov.rdcmndGotoSlide = 2;
return;
}
btn2.addEventListener(MouseEvent.MOUSE_UP, mouseReleaseSlide3Btn);
function mouseReleaseSlide3Btn(event:Event):void {
toc.visible = false;
btn1.visible = false;
btn2.visible = false;
btn3.visible = false;
title1.visible = false;
closeMe.visible = false;
home.visible = false;
mainmov.rdcmndGotoSlide = 3;
return;
}
btn3.addEventListener(MouseEvent.MOUSE_UP, mouseReleaseSlide4Btn);
function mouseReleaseSlide4Btn(event:Event):void {
toc.visible = false;
btn1.visible = false;
btn2.visible = false;
btn3.visible = false;
title1.visible = false;
closeMe.visible = false;
home.visible = false;
mainmov.rdcmndGotoSlide = 4;
return;
}
closeMe.addEventListener(MouseEvent.CLICK, CloseClick);
function CloseClick(event:MouseEvent):void
{
toc.visible = false;
btn1.visible = false;
btn2.visible = false;
btn3.visible = false;
title1.visible = false;
closeMe.visible = false;
home.visible = false;
}
toc_mc.addEventListener(MouseEvent.CLICK, CloseClick2);
function CloseClick2(event:MouseEvent):void
{
toc.visible = true;
btn1.visible = true;
btn2.visible = true;
btn3.visible = true;
title1.visible = true;
closeMe.visible = true;
home.visible = true;
}

//button mode

btn1.buttonMode = true;
btn2.buttonMode = true;
btn3.buttonMode = true;
closeMe.buttonMode = true;
toc_mc.buttonMode = true;
home.buttonMode = true;

btn1.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
btn1.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);
btn2.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
btn2.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);
btn3.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
btn3.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);
toc_mc.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
toc_mc.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);
home.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
home.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);

function onButtonOver(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay(“over”);
}

function onButtonOut(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay(“out”);
}

stop();

[/cc]

 

 

Proof: Captivate 5.5 published project

[swfobj src=”http://media2vito.megakrafts.com/2012/08/CPexternalTOCswf.swf” width=”640″ height=”480″ align=”center” allowfullscreen=”true”]

 

Flash TOC swf file is placed on master slide and for each slide “master slide objects on top” option is selected. This way TOC will overlay slide objects.

masterslide

 

 

Feel free to download full attachment with all files.

 

CPexternalTOCswf

Share on:
Adobe, AS3, Captivate, Code, Flash, vitomir gojak

Leave a Reply

Your email address will not be published. Required fields are marked *