This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* __ __ __ | |
* ____/ /_ ____/ /______ _ ___ / /_ | |
* / __ / / ___/ __/ ___/ / __ `/ __/ | |
* / /_/ / (__ ) / / / / / /_/ / / | |
* \__,_/_/____/_/ /_/ /_/\__, /_/ | |
* / / | |
* \/ | |
* http://distriqt.com | |
* ------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
aps = | |
{ | |
alert = "test example notification message"; | |
sound = "example.caf"; | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
{ | |
Adverts.init( DEV_KEY ); | |
if (Adverts.isSupported) | |
{ | |
Adverts.service.addEventListener( AdvertEvent.RECEIVED_AD, adverts_receivedAdHandler, false, 0, true ); | |
Adverts.service.addEventListener( AdvertEvent.ERROR, adverts_errorHandler, false, 0, true ); | |
Adverts.service.addEventListener( AdvertEvent.USER_EVENT_DISMISSED, adverts_userDismissedHandler, false, 0, true ); | |
Adverts.service.addEventListener( AdvertEvent.USER_EVENT_LEAVE, adverts_userLeaveHandler, false, 0, true ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* __ __ __ | |
* ____/ /_ ____/ /______ _ ___ / /_ | |
* / __ / / ___/ __/ ___/ / __ `/ __/ | |
* / /_/ / (__ ) / / / / / /_/ / / | |
* \__,_/_/____/_/ /_/ /_/\__, /_/ | |
* / / | |
* \/ | |
* http://distriqt.com | |
* ------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
{ | |
Notifications.init( APP_KEY ); | |
if (Notifications.isSupported) | |
{ | |
Notifications.service.addEventListener( NotificationEvent.NOTIFICATION_SELECTED, notifications_notificationSelectedHandler, false, 0, true ); | |
// | |
// This will trigger the start up notification if the application was started from a delayed notification | |
// Also this will perform the required registration for notifications permission on iOS 8+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function applyOrientation( bitmapData:BitmapData, orientation:String ) :BitmapData | |
{ | |
/* | |
1) transform="";; | |
2) transform="-flip horizontal";; | |
3) transform="-rotate 180";; | |
4) transform="-flip vertical";; | |
5) transform="-transpose";; | |
6) transform="-rotate 90";; | |
7) transform="-transverse";; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NetworkInfo.init( "" ); | |
NetworkInfo.networkInfo.addEventListener( | |
NetworkInfoEvent.CHANGE, | |
networkChangeHandler | |
); | |
... | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Adverts.isSupported) | |
{ | |
Adverts.service.initialisePlatform( AdvertPlatform.PLATFORM_ADMOB ); | |
var adView:AdView = Adverts.service.createAdView(); | |
adView.setAdSize( AdSize.SMART_BANNER ); | |
adView.setAdUnitId( AD_UNIT_ID ); | |
adView.setViewParams( new AdViewParamsBuilder() | |
.setVerticalAlign( AdViewParams.ALIGN_BOTTOM ) | |
.setHorizontalAlign( AdViewParams.ALIGN_CENTER ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Adverts.isSupported) | |
{ | |
Adverts.service.initialisePlatform( AdvertPlatform.PLATFORM_ADMOB ); | |
var adView:AdView = Adverts.service.createAdView(); | |
adView.setAdUnitId( AD_UNIT_ID ); | |
adView.setAdSize( AdSize.SMART_BANNER ); | |
// Add advert event listeners | |
adView.addEventListener( AdViewEvent.LOADED, loadedHandler ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (GameServices.isSupported) | |
{ | |
GameServices.init( Config.distriqtApplicationKey ); | |
trace( "GameServices Supported: " + GameServices.isSupported ); | |
trace( "GameServices Version: " + GameServices.service.version ); | |
GameServices.service.addEventListener( GameServicesEvent.INITIALISED, initialisedHandler ); | |
if (GameServices.service.isServiceSupported( Service.GOOGLE_PLAY_GAME_SERVICES )) |
OlderNewer