Skip to content

Migrating to Flambe 2.0

aduros edited this page Dec 3, 2012 · 1 revision

This is a complete list of breaking API changes in Flambe 2.0 that should be considered before upgrading.

AssetPack.loadTexture, loadSound, and loadFile have been renamed getTexture, getSound, and getFile to better indicate that they don't do any loading and simply get from a cache.

AssetPack.getTexture takes a filename without the extension, similar to getSound. This is to support platform-specific image formats like ATF in the future.

Component.onDisposed has been removed. All onDispose cleanup-logic should be moved to onRemoved.

Visitor has been removed. Use the fields on Entity and Component to iterate over the hierarchy. Use Entity.toString() instead of LogVisitor.

DrawingContext has been renamed to Graphics.

Component.getName() has been renamed to Component.name.

Entity is now marked as @:final (should not be subclassed). If you have lots of legacy classes that extends Entity, consider tagging them with @:hack to suppress the error.

The minimum Flash version has changed from 10.1 to 11. Only ~5% of the web is still on Flash 10 (and declining fast), it was no longer worth maintaining the BitmapData renderer.

The Android back button is now handled by using System.keyboard.backButton instead of directly listening for Key.Back.

Clone this wiki locally