Monthly Archives: November 2011

This post assumes an intermediate knowledge of AndEngine and Java for Android. The assumption that the Scene and Engine have been initialized is also made.

Introduction

I’ve been working and experimenting with AndEngine for a little over a year now and I wanted to share some information regarding the “Pinch and Zoom” functionality built into the engine. The engine itself makes it pretty easy to utilize multi-touch pinch and zoom, but documentation explaining how to do so is lacking. There are examples which will help developers understand the intended purposes of many of the engine’s core concepts, and they can be found at http://code.google.com/p/andengineexamples/ .

Anyway, for my implementation I created the class TouchAndCameraManager which, as you might guess, helps me manage user touches and the camera’s reactive behavior. Below are the core steps needed to complete pinch and zoom in Android using AndEngine.

Read More »

This is a republish from my previous lab. The original publish date was Apr 17, 2010.

Introduction

In working on projects and experimenting with memory management in Actionscript 3, I’ve come across a simple but very important checklist to properly remove objects from memory. The solution comes from looking back at chapter 14 of Essential Actionscript 3 by Colin Moock. The excerpt that triggered the light bulb above my head comes from the section “Disposing of Objects Intentionally” on page 273. It reads, “To eliminate all references to an object, we must manually remove it from any arrays that contain it and assign “null” (or some other value) to any variable that references it.”

The problem I had involved arrays. I thought removing objects that were in the array from the display list and setting their values to null as well as nulling the array itself would be enough. This isNOT the case however, you need to also manually remove the object from the array.

Read More »