Requirements
- Adobe AIR SDK 裡面的FlashRuntimeExtensions.jar
- Eclipse for Android development
Reference
- Native Extension Android Java API Reference
- AS3 與 Java之間函式呼叫的參數傳遞與回傳值
- 存取ActionScript objects需要注意的事項
- 從Java通知AS3某事件發生(完成)
- Native Extension Thread Issue
- Coding the native side with Java
Samples
- Native extensions for Adobe AIR(Offical)
- Native extensions for Adobe AIR(Un-Offical)
- Free AIR Native Extensions Collection
Step By Step
1. 建立Android Library Project
2. 加入FlashRuntimeExtensions.jar
3. 建立對應Package
4. 實作FREFunction介面
5. 繼承FREContext類別
6. 將所有實作FREFunction介面的類別在 step 5 建立的類別中的 getFunctions 建立對應的Dictionary
7. 實作FREExtension介面, 並在createContext中回傳step5建立的類別
8. 打包成JAR
沒有留言:
張貼留言