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 listFiles( file:File, prefix:String="" ):void | |
{ | |
if (file.isDirectory) | |
{ | |
var files:Array = file.getDirectoryListing(); | |
for each (var f:File in files) | |
{ | |
listFiles( f, prefix + file.name + "/" ); | |
} | |
} |
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
var year:int = Application.service.device.yearClass; | |
if (year >= 2013) | |
{ | |
// Do advanced animation | |
} | |
else if (year > 2010) | |
{ | |
// Do simple animation | |
} | |
else |
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
var keyPressGenerator:FeedbackGenerator = Vibration.service.createFeedbackGenerator( FeedbackGeneratorType.KEY ); | |
keyPressGenerator.performFeedback(); | |
// com.distriqt.Vibration |
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
Vibration.service.vibrate( 500 ); | |
// com.distriqt.Vibration |
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
rewardedVideoAd.addEventListener( RewardedVideoAdEvent.REWARD, rewardHandler ); | |
function rewardHandler( event:RewardedVideoAdEvent ):void | |
{ | |
// Here you should reward your user | |
// event.rewardAmount contains the amount that should be awarded to your user | |
// event.rewardType contains the type of this reward | |
} |
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 (rewardedVideoAd.isLoaded()) | |
{ | |
rewardedVideoAd.show(); | |
} | |
// com.distriqt.Adverts |
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
var rewardedVideoAd : RewardedVideoAd = Adverts.service.rewardedVideoAds.createRewardedVideoAd(); | |
rewardedVideoAd.addEventListener( RewardedVideoAdEvent.LOADED, loadedHandler ); | |
rewardedVideoAd.addEventListener( RewardedVideoAdEvent.ERROR, errorHandler ); | |
rewardedVideoAd.load( | |
adUnitId, | |
new AdRequestBuilder().build() | |
); |
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
var rewardedVideoAd : RewardedVideoAd = Adverts.service.rewardedVideoAds.createRewardedVideoAd(); | |
rewardedVideoAd.addEventListener( RewardedVideoAdEvent.LOADED, loadedHandler ); | |
rewardedVideoAd.addEventListener( RewardedVideoAdEvent.ERROR, errorHandler ); | |
rewardedVideoAd.addEventListener( RewardedVideoAdEvent.OPENED, openedHandler ); | |
rewardedVideoAd.addEventListener( RewardedVideoAdEvent.VIDEO_STARTED, videoStartedHandler ); | |
rewardedVideoAd.addEventListener( RewardedVideoAdEvent.LEFT_APPLICATION, leftApplicationHandler ); | |
rewardedVideoAd.addEventListener( RewardedVideoAdEvent.CLOSED, closedHandler ); | |
rewardedVideoAd.addEventListener( RewardedVideoAdEvent.REWARD, rewardHandler ); |
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 (NFC.isSupported) | |
{ | |
NFC.service.registerForegroundDispatch(); | |
} | |
// com.distriqt.NFC |
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
Dialog.service.addEventListener( PopoverEvent.POPOVER_CLOSED, popover_closedHandler, false, 0, true ); | |
Dialog.service.addEventListener( PopoverEvent.POPOVER_CHANGE, popover_changeHandler, false, 0, true ); | |
var options:PopoverOptions = new PopoverOptions(); | |
options.position = new Rectangle( 50, 250, 150, 50 ); | |
options.size = new Rectangle( 0, 0, 300, 350 ); | |
options.arrowDirection = PopoverOptions.ARROW_DIRECTION_ANY; | |
Dialog.service.showSelectPopover( 1, "Genres", ["All", "Punk", "Rock", "Jazz"], options, [ 1 ] ); |