AS3 Flash Full Screen Button for Adobe Captivate Page

 

This is a flash swf button file which you can use to bring your Captivate courses to the next level.¬† Simply drag and drop swf into your Course window and publish the project. Alternatively¬† you can place swf button on Master slide or on a first slide and assign timing¬† “rest of project” for it. Easy to use and works for all browsers.

Note: You can’t test properly output SWF without any html wrapper.

 

Here is the code:

[cc lang=’actionscript3′ ]
//AS3 Flash Full Screen Button for Adobe Captivate Page

MyBtn.buttonMode = true;

function MyBtnScreen(event:MouseEvent):void
{

if (this.stage.displayState == StageDisplayState.FULL_SCREEN)
this.stage.displayState=StageDisplayState.NORMAL;
else
this.stage.displayState=StageDisplayState.FULL_SCREEN;
}

function onFullScreen(fullScreenEvent:FullScreenEvent):void
{
var bFullScreen=fullScreenEvent.fullScreen;
if (bFullScreen)
{
//this text is optional, delete this and textField instance
this.textField.text= “EXIT FULLSCREEN”;
MyBtn.gotoAndStop (“2”);
}
else
{
//this text is optional, delete this and textField instance
this.textField.text= “RESIZE TO FULLSCREEN”;
MyBtn.gotoAndStop (“1”) ;
}
}

MyBtn.addEventListener(MouseEvent.CLICK, MyBtnScreen);
MyBtn.stage.addEventListener(FullScreenEvent.FULL_SCREEN, onFullScreen);

[/cc]

Final outcome:

[swfobj src=”http://media2vito.megakrafts.com/2012/10/FullscreenButton.swf” align=”center” width=”190″ height=”50″ allowfullscreen=”true”]
Proof: SWF button inside CP 5.5 project
[swfobj src=”http://media2vito.megakrafts.com/2012/10/fullscreenbtn.swf”]

 

 

 

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

Leave a Reply

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