Storyline Custome Frame with Sdk 2.0

May 13, 2015

I am playing around creating a custom frame for a project, but I can't seem to get the "CloseButton" to work. This is my first attempt at doing this and I was wondering if someone knew the best way to add a close window function to the frame.

Thanks

5 Replies
Nadja Sherelis

Thank you.

Nadja Sherelis
Flash Developer | LearnSomething, A Xerox Company
Direct: 850-201-3343 | Cell: 585-953-1580
LearnSomething.com

Satisfying DEA Standards When Dispensing Controlled Substances
Online course for pharmacists now available<http://learnsomething.com/Files/Org/b232ef1c21e8408788f9f1fb4cf00e7a/site/Satisfying

Senthil Kumar

hi,

1. create a button in "customframe.xfl" and name it as "exitButton"

2.  inside the below function in "frame.as", declare the button first

public class Frame extends CustomSprite implements wgIFrame
{

...

public var exitButton:SimpleButton;

...

}

3. inside the below function in "frame.as", add listener 

public function Frame()
{

.......

this.exitButton.addEventListener(MouseEvent.CLICK, this.clickExit);
....

}

4. below this function

create the following function

public function clickExit(event:MouseEvent):void
{
closeMenu();
ExternalInterface.call('window.parent.close()');

}

that's it.

 

There are several methods to do this, refer the following like for another method

https://community.articulate.com/discussions/developer-sdks-and-apis/how-to-get-the-browser-window-to-close-using-the-sdk-frame

 

 

 

This discussion is closed. You can start a new discussion or contact Articulate Support.