Ad via The Deck

Banner for eyelogic

  • eyelogic
  • Users offline eyelogic
  • Hamburg
  • Germany
  •  
  • Rank: 219

eyelogic is currently Browsing Computerlove

Full Name:
Born:
September 20, 1979
Job:
Flash Developer
Website
eyelogic
Status:
Freelance
Biography:

I´m a Flash developer from Hamburg, Germany, currently searching for a job in London.
I have focused my education on the Flash platform, especially in programming ActionScript 3.0 websites and applications.
visist my portfolio website at www.eyelogic.de and leave me a note! I am always open minded for new contacts.

Interests:

Flash, Music, Nature, Digital Arts, Sun, Water, Jogging, Reading

Member since:
May 14, 2008
Last login on:
September 07, 2008

Blog

Refresh | 5 posts | Alert me on update | Get RSS

Google Analytics for Flash websites

Corban Baxter writes on his blog how easy it is to enable Google Analytics page tracking in Flash websites with just a few lines. Just write a small method submitting your current section (trackPage(/home/page1). In this method just referencing the JS function pageTracker._trackPageview(), referencing the current path of your website. Very easy done. Have a look at Corban´s blog

/// GOOGLE ANALYTICS SIMPLE TRACKING
/// Script by: corban baxter

import flash.external.ExternalInterface;

function gaTracking(page) {
ExternalInterface.call("pageTracker._trackPageview", page);
}

//end

call:

gaTracking("/flash/home"); //sends event to google's analytics system

Comments (1)

Memory management in Flash Player 9 - a little helper class

Since the release of ActionScript 3.0 and Flash Player 9, memory management (garbage collection) is a very serious topic for Flash developers.

Here is a simple helper class i use in my projects to be always aware of the memory usage of the Flash Player.
Just create a file MemoryControl.as, save it in the root folder of your project and add the following code:

package de.eyelogic {

import flash.display.Sprite;
import flash.events.Event;
import flash.system.System
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.utils.Timer;
import flash.events.TimerEvent;

/**
* ...
* @author Wanja Stier
*/
public class MemoryControl extends Sprite{
private var tf:TextField;
private var mb:Boolean;
private var timer:Timer;

public function MemoryControl(mb:Boolean, updateFreq:int, color:uint)
{
//set mb to true or false
this.mb = mb;

tf = new TextField();
tf.textColor = color;
tf.autoSize = TextFieldAutoSize.LEFT;
addChild(tf);

//set up the timer object and pass the update frequency in milliseconds to it
//invoke updateMemoryUsage on each TimerEvent.Timer
timer = new Timer(updateFreq);
timer.addEventListener(TimerEvent.TIMER, updateMemoryUsage);
timer.start();
}
private function updateMemoryUsage(e:TimerEvent):void
{
//if mb is true, display memory usage in MB, else display it in KB
if (mb)
{
tf.text = (Math.round (((System.totalMemory / 1024)/1024) * 10)) / 10 + " MB";
}
else
{
tf.text = (Math.round ((System.totalMemory / 1024) * 10)) / 10 + " KB";
}

}
}

}

usage:

//parameter 1: if first parameter is set to true, memory usage will be displayed in MB, if set to false it will be displayed in KB
//parameter 2: sets the update frequency in milliseconds
//parameter 3: sets text color of the text field instance
memoryControl = new MemoryControl(true, 500, 0xFFFFFF);
memoryControl.y = 400;
memoryControl.x = 50;
addChild(memoryControl);

Flash Player 10 beta released

Flash Player 10 beta (Astro) is finally available on Adobe Labs. It comes with amazing new filters and effects and GPU rendering that relieves the CPU and hopefully gives a massive performance boost for 3D engines, apps and videos.
Key New Features

3D Effects - Easily transform and animate any display object through 3D space while retaining full interactivity. Fast, lightweight, and native 3D effects make motion that was previously reserved for expert users available to everyone. Complex effects are simple with APIs that extend what you already know.

Custom Filters and Effects - Create and share your own portable filters, blend modes, and fills using Adobe Pixel Bender™, the same technology used for many After Effects CS3 filters. Shaders in Flash Player are about 1KB and can be scripted and animated at runtime.

Advanced Text Layout - A new, highly flexible text layout engine, co-existing with TextField, enables innovation in creating new text controls by providing low-level access to text offering right-to-left and vertical text layout, plus support for typographic elements like ligatures.

Enhanced Drawing API - Runtime drawing is easier and more powerful with re-styleable properties, 3D APIs, and a new way of drawing sophisticated shapes without having to code them line by line.

Visual Performance Improvements – Applications and videos will run smoother and faster with expanded use of hardware acceleration. By moving several visual processing tasks to the video card, the CPU is free to do more.
Related Links:

Read this excellent article about GPU acceleration in Flash Player 10: www.kaourantin.net/2008/05/what-does-gpu-acceleration-mean.html

How to compile for Flash Player 10 Astro: etc.joshspoon.com/2008/05/16/how-to-compile-and-examples-for-flash-player-10-or-astro-beta www.gotoandlearn.com/player.php?id=73