Exit Message
If you’re using CocoonIO, you can switch to this Tutorial. But you also can use the additional plugin Cordova Dialog by Cranberrygame.
[creativ_button url=”https://shatter-box.com/knowledgebase/cocoonio-make-a-on-exit-message-in-construct-2/” icon=”book” label=”CocoonIO – Make an on exit message in Construct 2″ colour=”blue” colour_custom=”” size=”medium” edge=”straight” target=”_blank”]
Install the plugin
For this tutorial you need the Cordova Dialog plugin by Cranberrygame. You get them in the scirra store.
Cranberrygame - Cordova Plugins 150 MB 5109 downloads
Download the awesome Cordova Plugin Package provided by Cranberrygame. The package...
Download the package and drag & drop the
[code]cranberrygame_CordovaDialog_1.0.14.c2addon[/code]
file into Construct 2.
Then restart Construct 2.
Code
Then start coding the dialog function. An easy example is shown below.
The result will look like that then.
Demo (Android file)
You can try the demo android application file to see it in action. Just download it here.
Cocoon - On Exit Dialog 6 MB 1322 downloads
Download our demo application for the Cocoon On Exit Dialog game template. ...Source file
Moreover you can download the capx example over here. But remember to install the plugins “CocoonCanvas+” & “CordovaDialogs” first.
Cocoon - Exit Message (CordovaDialog) 0.2 MB 1689 downloads
Download our free game template Cocoon Exit Message. This template uses the plugin...Additionally you can use the CocoonCanvasPlus plugin to make an exit dialog.
Cocoon - On Exit Message 0.2 MB 1581 downloads
Download our free game template Cocoon On Exit Message. This template shows you how...File is for learning purposes only!
Compilers
For this example you must also install the core plugin “Dialogs” in CocoonIO and Intel XDK.
CocoonIO
Go to cocoon.io and select your project. Then click on the “Plugin” tab and select “Core“.
Find “Dialogs” and click install. Don’t forget to save your settings then.
Intel XDK
If you use Intel XDK there are no further steps required. In this case the plugin is included in the config.xml file.