Created
August 13, 2012 17:57
-
-
Save revmob-sdk/3342758 to your computer and use it in GitHub Desktop.
Adobe Air SDK
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
package com.revmob.air.sample | |
{ | |
import com.revmob.airextension.RevMob; | |
import flash.display.Sprite; | |
import flash.display.StageAlign; | |
import flash.display.StageScaleMode; | |
import flash.system.Capabilities; | |
public class RevMobExtensionSample extends Sprite | |
{ | |
// Just replace the ID below with your appID. | |
private static const ANDROID_APP_ID:String = "4f56aa6e3dc441000e005a20"; | |
// Just replace the ID below with your appID. | |
private static const IOS_APP_ID:String = "4fd619388d314b0008000213"; | |
private var revmob:RevMob; | |
public function RevMobExtensionSample() | |
{ | |
super(); | |
// support autoOrients | |
stage.align = StageAlign.TOP_LEFT; | |
stage.scaleMode = StageScaleMode.NO_SCALE; | |
var appId:String = null; | |
if ( isIOS() ) { | |
appId = IOS_APP_ID; | |
} else if ( isAndroid() ) { | |
appId = ANDROID_APP_ID; | |
} | |
revmob = new RevMob(appId); | |
} | |
public function openAdLink():void { | |
revmob.openAdLink(); | |
} | |
protected static function isIOS():Boolean | |
{ | |
return Capabilities.os.toLowerCase().indexOf("ip") > -1; | |
} | |
protected static function isAndroid():Boolean | |
{ | |
return Capabilities.os.toLowerCase().indexOf("linux") > -1; | |
} | |
} | |
} |
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
package com.revmob.air.sample | |
{ | |
import com.revmob.airextension.RevMob; | |
import flash.display.Sprite; | |
import flash.display.StageAlign; | |
import flash.display.StageScaleMode; | |
import flash.system.Capabilities; | |
public class RevMobExtensionSample extends Sprite | |
{ | |
// Just replace the ID below with your appID. | |
private static const ANDROID_APP_ID:String = "4f56aa6e3dc441000e005a20"; | |
// Just replace the ID below with your appID. | |
private static const IOS_APP_ID:String = "4fd619388d314b0008000213"; | |
public function RevMobExtensionSample() | |
{ | |
super(); | |
// support autoOrients | |
stage.align = StageAlign.TOP_LEFT; | |
stage.scaleMode = StageScaleMode.NO_SCALE; | |
var appId:String = null; | |
if ( isIOS() ) { | |
appId = IOS_APP_ID; | |
} else if ( isAndroid() ) { | |
appId = ANDROID_APP_ID; | |
} | |
var r:RevMob = new RevMob(appId); | |
r.showFullscreen(); | |
} | |
protected static function isIOS():Boolean | |
{ | |
return Capabilities.os.toLowerCase().indexOf("ip") > -1; | |
} | |
protected static function isAndroid():Boolean | |
{ | |
return Capabilities.os.toLowerCase().indexOf("linux") > -1; | |
} | |
} | |
} |
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
package com.revmob.air.sample | |
{ | |
import com.revmob.airextension.RevMob; | |
import flash.display.Sprite; | |
import flash.display.StageAlign; | |
import flash.display.StageScaleMode; | |
import flash.system.Capabilities; | |
public class RevMobExtensionSample extends Sprite | |
{ | |
// Just replace the ID below with your appID. | |
private static const ANDROID_APP_ID:String = "4f56aa6e3dc441000e005a20"; | |
// Just replace the ID below with your appID. | |
private static const IOS_APP_ID:String = "4fd619388d314b0008000213"; | |
public function RevMobExtensionSample() | |
{ | |
super(); | |
// support autoOrients | |
stage.align = StageAlign.TOP_LEFT; | |
stage.scaleMode = StageScaleMode.NO_SCALE; | |
var appId:String = null; | |
if ( isIOS() ) { | |
appId = IOS_APP_ID; | |
} else if ( isAndroid() ) { | |
appId = ANDROID_APP_ID; | |
} | |
var r:RevMob = new RevMob(appId); | |
// Set testing mode. Remove this line before release your app. | |
r.setTestingMode(true); | |
r.showFullscreen(); | |
} | |
protected static function isIOS():Boolean | |
{ | |
return Capabilities.os.toLowerCase().indexOf("ip") > -1; | |
} | |
protected static function isAndroid():Boolean | |
{ | |
return Capabilities.os.toLowerCase().indexOf("linux") > -1; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment