-
Notifications
You must be signed in to change notification settings - Fork 6
Using Native Extensions
1. Place the .ane and the .swc in the libs/ folder.
2. You have to explicitly add the SWC to your IDE project for code-completion. FlashDevelop users; right-click on SWC > Add to Library.
3. If you need to add extra data in the manifest xml, you can put that in the flambe.yaml file.
# Android-specific configuration
android:
# https://developer.android.com/guide/topics/manifest/manifest-intro.html
AndroidManifest.xml: |
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
4. Write the code, and use conditional compilation tags (air
,android
,ios
) to prevent conflicts on the HTML/Flash version.
This example demonstrates how to use adds from RevMob. You can download the RevMob Native Extension here.
#if air
import com.revmob.airextension.RevMob;
#end
public function addAds()
{
#if air
var revmob:RevMob = new RevMob("XXXXXX");
revmob.showBanner(0, (System.stage.height - 60), System.stage.width, 60);
#end
}
Check out the extensions demo https://github.com/aduros/flambe-demos/tree/master/extensions
Tip: Find great native extensions over here: http://www.as3gamegears.com/category/air-native-extension/
Documentation guide for Flambe - Targeted to version 4.0+
Flambe | Installation | Demo projects | Showcase | API Reference | Forum
Flambe is MIT licensed and available for free. Feel free to contribute!
- Home / Installation
- Entity / Components
- Core
- Assets
- Publish your game
- Other
- Editors
- Plugins, tools, extensions
- Help
- More Flambe