What a shame… Back to blog!

Wow today I saw my blog and I felt a pain on my heart. Can you guys imagine, it’s almost one year that I didn’t blog.

Last year was so busy, building a looot of games, conciliating work and college and my User Group. I just feel said about have being had no more time to blog. So, let’s change this scene.

To those that don’t know what I do. I’m an Game Developer, mainly developing in AS3, at W3Haus. I have an Adobe User Group in Rio Grande do Sul, Brazil; the user group is called AUGRS. I’m finishing my college (Digital Games at UNISINOS) this year and my thesis project will target game engines and AS3 (soon I’ll have more news about it).

And here we go starts new year with an picture of me in an meeting at LFPUG (London Flash Platform User Group) last year when I traveled to London to attend Flash On The Beach 2008. I’m the 4º from right to left. And by request of my friend (lol), I’ll introduce Pedro Taranto, another Brazilian that traveled with me and he was there to – the 1º from left to right.

Meeting at LFPUG

1 Comment »

Flash Player loses focus with button + removeChild

Well, this week, I was doing a little game that to the player start to play needs click in one “start game” button and after uses the keyboard to control the character moves. So until this point all OK, but what i didn’t told you is that when click’s in the “start game”, it disappears with one removeChild() (because it appears above all the stage).

After this, my character was no more moving… I fought “wow could be my InputManager class not working so fine…”, but I tried find some bug or something wrong and nothing. After some tries, accidentally I removed the buttonMode = true – propertie that i was defining to that my “start game” Movie Clip behaviors like Button – and tcharam… All working…..

At first we need remind that Keyboard events will just works when Flash Player get focus. And accidentally I found a way of Flash Player loses focus with on removeChild().

So what is happening here?!

First, open the swf file (focus it); after, click at the button (button with focus); later on, the button is removed from the stage (the focus is removed together with the button – so here are the problem). Now if I click on the stage, or other local in the swf file (Flash Player will get focus again) and it will works…
Here is a source code as example :

var spBtn = new Sprite();
spBtn.buttonMode = true; spBtn.graphics.beginFill( 0xff0000, .4 );
spBtn.graphics.drawRect( 0, 0, this.stage.stageWidth, this.stage.stageHeight );
spBtn.graphics.endFill();

addChild( spBtn );

addEventListener ( KeyboardEvent.KEY_DOWN, managekeyDown );
spBtn.addEventListener( MouseEvent.MOUSE_DOWN, mouseClick );

function mouseClick ( e : Event ) : void
{
    spBtn.removeEventListener( MouseEvent.MOUSE_DOWN, mouseClick );
    removeChild( spBtn );
}

function managekeyDown ( e : KeyboardEvent ) : void
{
    if ( e.keyCode == Keyboard.LEFT )
    {
        trace ( "JUST TRACE IF FLASH PLAYER HAVE FOCUS ON IT" );
    }
}

======= Updated at August 1º (expect update more the blog…) ======

To fix this issue you must reset the focus to the stage. So the code will change just in this part:

function mouseClick ( e : Event ) : void
{
    spBtn.removeEventListener( MouseEvent.MOUSE_DOWN, mouseClick );
    removeChild( spBtn );
    //After the remove child we’ll reset the focus to stage
    this.stage.focus = this;
}

:D

9 Comments »

From now on just English…

Well guys, unhappily – to whom just want to know in Portuguese – and happily to the rest of the World, I’ll be writing just in English on my blog. I’m taking this action looking forward an better transparency to change informations on line, once the majority of the ActionScript Gurus communicate each others in English and too because I’ve a lot of abroad ActionScript friends.

So, to those that want continues seeing ActionScript related subjects in Portuguese, I strongly advice join to the AUGRS ( Adobe User Group Rio Grande do Sul) discussion list.

To the others, we’ll be in touch.

== Versão em Português / Portuguese Version ==

Bom pessoal, infelizmente – para aqueles que só saber Português – e felizmente para o resto do mundo, estarei blogando de agora em diante somente em Inglês. Estou tomando esta medida visando uma melhor transparência para troca de informações online, uma vez que a maioria dos gurus da área se comunicam em inglês e também levando em conta de que tenho muitos amigos da área no exterior.

Então, para quem quiser continuar vendo assuntos relacionados a ActionScript em Português, aconselho estes a participarem da lista de discussão do AUGRS ( Adobe User Group Rio Grande do Sul).

Aos demais, estaremos em contato, porém agora Inglês.

1 Comment »

O que é Singularity?

Bom pessoal, voltando a blogar depois de um tempo (espero não perder o pique novamente por conta de muito trabalho, conforme aconteceu).

Afinal de contas, agora até eu andei ficando curioso com esse tal de Singularity do Aral Balkan.

Afinal de contas, o que é o Singularity? Uma nova Tecnologia em Flash? RIA? Um site em Web 2.0?

Como a curiosidade é tanta, estou colocando essa imagem no meu blog para ser um dos primeiros a saber o que que é isso! Logo que sair a descrição ou mesmo for lançada alguma coisa estarei aqui falando.

Singularity?

2 Comments »

Papervision3D 2.0 Alpha

 

Foi lançada hoje de madrugada a tão esperada versão 2.o da Biblioteca Papervision 3D.

 

Na nova versão possuímos recursos tais como: ShadeMaterials, Shaders, ASCollada (agora com suporte a animação), Frustrum Culling, Multiple Viewports, Render to Scene e muito mais…

 

Para quem quiser ter uma idéia do que podemos fazer no a nova versão dê uma olhada no link abaixo que exemplifica aplicação de iluminação de phong e bumpMapping.

swf:
http://www.rockonflash.com/papervision3d/downloads/shaderDemos/EarthPhongDemo.swf

FLA:
http://www.rockonflash.com/papervision3d/downloads/shaderDemos/EarthPhongDemo.fla

 

Então aproveite agora mesmo para fazer o download da nova versão a partir do SVN no endereço: http://papervision3d.googlecode.com/svn/trunk/

 

Abraços.

 

2 Comments »

Filipe Silvestrim is a Brazilian Game Developer. Have in his background expertize in many technologies, but has his focus on the Flash Platform. Is the founder and currently act as Manager of the AUGRS - Adobe User Group Rio Grande do Sul.