Ver Mensaje Individual
  #6 (permalink)  
Antiguo 25/03/2008, 11:57
master_of_puppetz
 
Fecha de Ingreso: marzo-2006
Ubicación: Mexico City
Mensajes: 27
Antigüedad: 18 años
Puntos: 0
Re: Problema con base de datos

hola!
este código:
Código:
conn.addEventListener(SQLEvent.OPEN, openHandler);
			conn.addEventListener(SQLErrorEvent.ERROR, errorHandler);

			var dbFile:File = File.applicationStorageDirectory.resolvePath("DBSample.db");

			conn.openAsync(dbFile);
mételo en una función, por ejemplo:
Código:
private function init():void {
conn.addEventListener(SQLEvent.OPEN, openHandler);
			conn.addEventListener(SQLErrorEvent.ERROR, errorHandler);

			var dbFile:File = File.applicationStorageDirectory.resolvePath("DBSample.db");

			conn.openAsync(dbFile);
}
y al tag de WindowedApplication le agregas el atributo creationComplete en el cual invocas a la función:
Código:
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
Saludos!

PD: no necesitas bajar nada, con que hagas el proyecto de AIR e importes las respecitvas librerias basta.