Web Developer

Etiqueta: AIR

Optimizing performance for mobile Adobe AIR apps

CPU or GPU Rendering
GPU can work only with bitmaps. Use cacheAsBitmap and cacheAsBitmapMatrix with vector graphics is a very processor intensive process. Basically means that at every new frame this movieclip has to be converted to bitmap. Try using the draw method of BitmapData. GPU mode makes sense to use it when there is a lot of animated objects moving and interacting with each other across the screen.

Seguir leyendo

Connect to Google Analytics Data in Air/ActionScript

Google Analytics blog published a post to present a new library to access Google Analytics Data Api. You can get this open source library from here.

In the following example you can see one of the ways to get data without using GAView.

	import com.denivip.ga.APILoader;
	import com.denivip.ga.GAAccount;
	import com.denivip.ga.dimensions.*;
	import com.denivip.ga.feed.*;
	import com.denivip.ga.filter.Filter;
	import com.denivip.ga.filter.FilterItem;
	import com.denivip.ga.filter.FilterOperator;
	import com.denivip.ga.metrics.*;

Seguir leyendo

Aplicaciones iOS con Adobe Flash CS5.5

A continuación podéis ver los pasos que hay que seguir en Windows para poder testear aplicaciones creadas con Flash CS5.5 en vuestro dispositivo Apple (iPod/iPhone/iPad). Suponiendo que ya habéis pagado los 80 euros anuales que cuesta la cuenta de desarrollador iOS.

A la hora de publicar nuestra aplicación generamos un archivo .ipa, que utilizaremos en el iTunes para pasarlo a nuestro dispositivo. Para poder crearlo se nos pide un certificado con extensión .p12 y el archivo de suministro. Primero crearemos el certificado, daremos de alta nuestro dispositivo (solo podremos testearlo en el que seleccionamos) y crearemos el id de nuestra futura aplicación.

Seguir leyendo

JavaScript security errors in Adobe Air

Event callbacks assigned through onevent attributes in innerHTML and outerHTML statements

When you use innerHTML or outerHTML to add elements to the DOM of a document, any event callbacks assigned within the statement, such as onclick or onmouseover, are ignored. No security error is generated. Instead, you can assign an id attribute to the new elements and set the event handler callback functions using the addEventListener() method.

For example, given a target element in a document, such as:

<div id="container"></div>

Replace statements such as:

document.getElementById('container').innerHTML =
    '<a href="#" onclick="code()">Click Me</a>';


document.getElementById('container').innerHTML = '<a href="#" id="smith">Click Me</a>';
smith = document.getElementById('smith');
if(smith!=null) smith.addEventListener("click", function() { code(); });

by Help Adobe


Tema por Anders NorenArriba ↑