Storyline Custome Frame with Sdk 2.0 May 13, 2015 By Nadja Sherelis 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
Leslie McKerchie Staff almost 9 years ago05/13/15 at 6:27 pm (UTC) Hi Nadja! You may be able to get some more assistance if you check out our SDK Forum here.
Nadja Sherelis Author Leslie McKerchie almost 9 years ago05/13/15 at 6:41 pm (UTC) 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
Leslie McKerchie Staff almost 9 years ago05/13/15 at 6:51 pm (UTC) No problem Nadja! Please note that replying to the forums via e-mail attaches your signature, which you are welcome to pop in and edit if needed.
Senthil Kumar almost 9 years ago05/19/15 at 9:11 pm (UTC) 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
Ashley Terwilliger-Pollard Staff almost 9 years ago05/20/15 at 1:58 pm (UTC) Thanks Senthil for sharing here.
5 Replies
Hi Nadja! You may be able to get some more assistance if you check out our SDK Forum here.
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
No problem Nadja! Please note that replying to the forums via e-mail attaches your signature, which you are welcome to pop in and edit if needed.
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
Thanks Senthil for sharing here.
This discussion is closed. You can start a new discussion or contact Articulate Support.