Tom Krcha's FlashRealtime

Hey amigo!
I am Tom Krcha, Gaming Evangelist at Adobe. These are my notes


On the road to Milan - MAX BUS

November 30th, 2008

Here we are, a small group of freaks travelling to Adobe MAX Milan in a special bus connected to internet and lot of entertaining stuff.

The way started this morning at 7:00 from Hamburg and went through Hannover, Dortmund, Köln and Frankfurt, where i hopped in. Now we are approaching Stuttgart continuing to München and Mailand to Milan.

I have to say that bus is really nice piece of ****, em art :) But really, I love the graphics, guys were working 4 days just on putting the stickers on it.

MAX Bus

MAX Bus

Hannover

Hannover

We are connected

We are connected

Flo and Christoph

Flo and Christoph

Girls are watching movies or playing baseball on Nintendo Wii. Really lovely group of people. Make sure you try to meet them during MAX community dinners or parties.

FlashPlatform.cz is up!

November 28th, 2008

FlashPlatform.cz is first czech flash experts blog aggregator, which is community open and everybody can join. This site is a result of the official Adobe Flash Platform User Group Czech Republic, which has been just started by local Platform gurus.

Logo FlashPlatform.cz

Quarterfoil = Flash, Flex, AIR, Flash Catalyst :)

Logo and website was created by Robin Raszka (YellowMedia.cz), who is Flex styles and skinning professional. So you can expect such tuts on his blog soon.

If you want to become a member and get closer to what’s happening in Czech Republic around Flash/Flex/AIR/DataServices… just sign in to FPUGCZ at groups.adobe.com and click “Join this group”.

There is a lot of things going to happen - regular meetings, sharing knowledge, talking about projects, playing around with latest Adobe Labs stuff or other 3rd party technologies, presentations, networking and parties!

Be sure to check user group event calendar, next meeting is scheduled to Wednesday 10th December 2008 18:00 at Adobe Office Prague.

Few of the group guys are attending Adobe MAX - so flashplatform.cz will also aggregate MAX news!

You can expect more blogs aggregated very soon.

Adobe MAX Milan live updates at Twitter

November 27th, 2008

For all of you who are interested in the latest news at MAX Milan we are setting up Twitter account, where will appear tips to go or attend at MAX and what is happening right on the place.

Be sure to bookmark http://twitter.com/maxeurope/

I will be in charge of this account and hopefully others will help me to keep it updated as most as possible.

See you at MAX folks!

Pixel Bender 2. - filter ve Flashi

November 26th, 2008

V minulém díle (http://tom.krcha.com/pixel-bender-1-uvod/) jsme si představili v kostce jazyk Pixel Bender. Vzhledem k tomu, že je již konečně ke stažení CS4 Trial a všichni si jej můžou vyzkoušet, přešel bych rovnou k věci, a sice aplikaci Pixel Bender filtrů ve Flashi 10.

Aplikace, kterou si dnes vytvoříme je zde.
pixel bender in flash

(MusĂ­te mĂ­t nainstalovanĂ˝ Flash Player 10)

1) Stáhněte si a nainstalujte Flash CS4 z www.adobe.com/cz/downloads/

2) Nachystejte si nějaký Pixel Bender filter (viz. inspirace v minulém díle)

Ideální však bude použít nějaký pokročilejší filtr. Já jsem zvolil twirl.pbk - příklad, který se nainstaluje s Pixel Benderem. 

- Otevřete twirl.pbk v Pixel Bender Toolkit

- File -> Export Kernel Filter For Flash Player … uloĹľte soubor *.pbj - pokud nastane problĂ©m pĹ™i exportu*, odstraňte nÄ›kterĂ© nepodporovanĂ© části nebo pouĹľijte mĹŻj vyexportovanĂ˝ twirl.pbj. 

* Flash Player Pixel Bender Runtime nepodporuje všechny možnosti jazyka Pixel Bender (např. blok needed) - o těchto možnostech si řekneme v dalším dílech. 

3) SpusĹĄte Flash CS4

- Vytvoříme si třídu PixelBenderLoader, která bude načítat filtry za běhu a aplikovat je na jakýkoliv DisplayObject = snad jakákoliv vizuální komponenta, MovieClip, Video, Fotka, Vektor apod.

- PixelBenderLoader je moje třída, kterou můžete používat, nicméně inovaci se meze nekladou a určitě si najdete vlastní cestu pro vaše konkrétní využití.

package
{
	import flash.display.*;
	import flash.events.*;
	import flash.filters.*;
	import flash.net.*;
	import flash.events.EventDispatcher;
 
	public class PixelBenderLoader extends EventDispatcher
	{		
		private var loader:URLLoader;
		private var shader:Shader;
		// ShaderFilter muzeme aplikovat pomoci parametru filters DisplayObjectu
		private var filter:ShaderFilter;
 
		public function PixelBenderLoader():void
		{
 
		}
	        // nacteni filtru
		public function loadFilter(filterURL:String):void{
			loader = new URLLoader();
			loader.dataFormat = URLLoaderDataFormat.BINARY;
 
			// odchytime jen udalost nacteni, doporucuju vsak odchytit pripadne errory
			loader.addEventListener(Event.COMPLETE, onComplete);
			loader.load(new URLRequest(filterURL));
		}
 
		// aplikuje filter pomoci transformacni objektu
		public function applyFilter(displayObject:DisplayObject,transformObject:Object){
			applyShaderWithTransformObject(shader,transformObject);
			filter = new ShaderFilter(shader);
			displayObject.filters = [filter];
		}
 
                // vrati filter pro pripadnou aplikaci volnejsim zpusobem
		public function getFilter(transformObject:Object):ShaderFilter{
			applyShaderWithTransformObject(shader,transformObject);
			filter = new ShaderFilter(shader);
			return filter;
		}
 
                // aplikuje transformacni objekt na shader pomoci cyklu
		protected function applyShaderWithTransformObject(shader:Shader,transformObject:Object):void{
			for(var i:String in transformObject){
				shader.data[i].value = [transformObject[i]];
			}
		}
 
		// po naÄŤtenĂ­ filteru
		protected function onComplete(e:Event):void
		{
			shader = new Shader(loader.data);
			dispatchEvent(e);
		}
	}
}

transformObject:Object - hodnoty parametrů, které filter umožňuje měnit
napĹ™. tranformObject = {radius:150};

- Ve Flashi pak pouĹľijeme filter tĂ­mto zpĹŻsobem

NaÄŤtenĂ­ filtru:

var pbl:PixelBenderLoader = new PixelBenderLoader();
pbl.addEventListener(Event.COMPLETE,onComplete);
pbl.loadFilter("twirl.pbj");

Aplikace filtru - v tomto případě budeme měnit radius:
(deformClip je klasickĂ˝ MovieClip v library, obsahuje fotku a dynamickĂ˝ text)

function applyRadius(radius:Number){
	// transformacni objekt, zmenime jen radius
	var transformObject:Object = new Object();
	transformObject.radius = radius;
 
	// zmen dynamicky text
	deformClip.txt.text = radius.toString();
 
	// aplikuj filtr
	pbl.applyFilter(deformClip,transformObject);
}

Změna parametru při pohybu myši:

// zmen radius pri pohybu mysi
function mouseMoveChange(event:MouseEvent):void{
	applyRadius(Math.abs(event.localX));
}

Odchycení události načtení filtru - v tuto chvíli lze začít filter používat:

function onComplete(e:Event):void{
	trace("filter load complete - aplikace");	
	applyRadius(100);
	stage.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveChange);
}

Demo soubory ke staĹľenĂ­ zde.

Daily Web Conference 2008

November 20th, 2008

I was speaking yesterday at DWC2008, Bratislava - Slovakia, the conference about web technologies in view of managers, marketing people and PR. There has been many top-business people from Slovakia - banks, web leaders.

My session was about the Platform and what it brings to the business they do. I tried to inspire the people - showed AIR demos, 3D possibilities and Pixel Bender filters.

I liked the Gstrinx.sk - nice girls playing electronic violins during networking and reception. Hopefully this wasn’t the last time I saw them :)

 

Gstrinx.sk

Gstrinx.sk

 

Click for more :)