Java fullscreen! evil?

March 21st 2008

http://evil.hackademix.net/fullscreen/applet.html

Eeewww! I wonder how long will it take to the phishing / spammer professionals to use this "trick". Thanks for the tip Andre!

no comments

FLV to BitmapData Sequence

March 17th 2008

So, here I am, still finishing off a project I've been doing at Hi-ReS! for almost 4 months already. Doesn't matter how many time I look at it, I can't see where I spent all that time. I guess it has been all on research, file optimisations, fighting with Papervision3D 2.0... By the way... Andy and Tim, thanks a lot for the constant help! <3!

I could explain some tricks I've learn on this project, but I'll leave it for some other post... I'm already out of focus... The snippet of the day:

FLV to BitmapData Sequence

On the project there were some textures that were FLV animations. At first I had it as a bitmap sequence on the library and it was running quite well, but obviosly, that would be intraframe compression, which means BIG. So, .FLV needed to be used instead. And as it was interframe compression the filesize was much more smaller. But the problem then was that it was making the whole app almost 10fps slower. The decoding of the FLV plus (bad) looping was being very CPU expensive.

So, somehow I had to find a way to mix both best features, small filesize and low CPU usage, the easy answer was just, somehow, creating a bitmap array with each frame in the video (the video doesn't have sound btw). Tried it using the Video methods (seek() and stuff) but there was no way I could jump frame by frame. I guess using these methods you can only jump to the next keyframe. As having a keyframe per frame was going back again to the intraframe compression it was time to google a bit.

Unfortunately (and also fortunately) the only bit I found was this Seb's post, which thanks to Tink managed to find a decent approach for the issue.

Just as Tink suggested, create a .SWF with the .FLV embeded (which, somehow, stays at the same filesize). Having that you get the MovieClip's magic methods: gotoAndStop(), nextframe()...

So, the only thing you need is the small class I put together today:

BitmapDataSequence.as

It's the first version, so don't expect more than the basic stuff. Oh, and yes, it runs MUCH faster than the .FLV and it loops nicely oh, and you could easily change the FPS too.

1 comment

Adobe, MAKE SOME NOISE

March 16th 2008

Adobe, MAKE SOME NOISE

I wisth they just used Bass and we had even .xm support, but... somehow, I don't think that will ever happen.

Actually, it would make sense if MOD files went back to life thanks to websites. MOD files are very small in size compared to a MP3, and produced by the right people they can sound really well.

no comments

SilverLOL 2.0

March 4th 2008

From here...

".xap" files (pronounced "zap") use the standard .zip compression algorithm to minimize client download size. A "hello world" .NET Silverlight application (built using VB or C#) is about 4KB in size.

If a "hello world" takes 4KB already, what a real application would take? A "hello world" in AS3 seems to be 400bytes btw, a 10%.

Lots to do M$, lots to do...

no comments

FlashDevelop3 Beta6 - Ctrl+Shift+1

February 25th 2008

It was already released 10 days ago, but I wasn't able until today to really use this:

Contextual generators (Ctrl+Shift+1) for getter/setter, event listeners, override methods, interface implementation, unknown var/method

I don't know how could I done anything in this world without that!! ;D

Thanks!

no comments

graphics.beginBitmapFill, opacity? blending? pretty please...

February 19th 2008

The classic question on interviews lately is "What would you ask Adobe to improve on the Flash player?". Well, I finally have a real thing to ask the guys and is to give some love to graphics.beginBitmapFill.

Since the beginning there were 2 ways of rendering your 3d scene in flash.

1. Render everything in a single Sprite / MovieClip.
2. Create a Sprite / MovieClip for each triangle or Mesh.

The second option was the most useful because you had easily properties such as opacity and even blending as Sprite/MovieClip have already those properties, but, performance-wise, option 1 was the winner hands down. So, as people wants speed, some engines have gone through the option 1 and then spent time trying to find ways to hack the properties that you get for free with option 2.

If you take a look on the drawTriangle loop inside Papervision3d in instance you'll find this:

graphics.beginBitmapFill( altBitmap ? altBitmap : bitmap, _localMatrix, tiled, smooth);

I even had to do a hack for a project where in order to be able to change the opacity of one material dynamicaly I had to generate an array of bitmapDatas with the original texture with different levels of transparency... nasty!

Wouldn't it be great if you could tell the amount of opacity and which blending to use to the beginBitmapFill?

1 comment

My code.google

February 18th 2008

I'm finding this code.google thingie quite handy for handling all my open source stuff. Recently I've updated the videoplayer quite a bit and I was now updating the pv3d previewer...

So, keep an eye on the link cos it will be heavily updated (specially the svn repository) from now on:

http://code.google.com/p/mrdoob/

no comments

TypeError: Error #1010: A term is undefined and has no properties.

February 13th 2008

If there is something I hate from the daily work with AS3 is the annoying #1010. It makes the compiler sound arrogant, what?

To me it looks like:
"There is something wrong there, but I won't tell you what it is... cold cold cold warm warm super warm!"

It's like if it was in a constant puzzle game.

Well, to be fair, it kind of says WHERE, but it would be much helpful if it said WHAT was the term.

4 comments

pong1k, a game in 1,022bytes

January 29th 2008

There was a guy on escena.org yesterday talking about this pong in 1kbytes done in openGL. So, once again, I felt challenged and tried to do the same with Actionscript 3.

And well, after a bit of tweaking here and there, seems like managed to make it in 1,022bytes :D

pong1k

You know where the sources are, don't you? But if you just want to see the snippet, here it's too.

EDIT: Kristof Neirynck has ported the code to AS2, and after a few tweaks turns out that AS2 creates tinier files than AS3. At least in this case. pong0.5k Maybe when going a couple of kbytes up AS3 would win AS2.

EDIT 2: And now, for something completely different, the same game in 393bytes. Nice one Matthew! :D

no comments

xplsv.tv videoplayer + sources

January 27th 2008

For years I was highly ashamed with the FLV player I coded for xplsv.tv :/ Somehow I was able to finally recode the player this Saturday. Very simple and minimal, with simple behaviours (VLC style) like DOUBLE_CLICK for going fullscreen and cursor keys to go forward and backwards.

And this is how it looks using the, also brand new, xplsv.tv embed code:

And... guess what, I'm sharing the sources of it too. But I'm doing it in a new way this time... (I'm afraid you'll need svn-handling knowledge from now on).

SOURCES

no comments
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Some of the projects that I worked on.



Some of the HTML5 and Actionscript experiments I've done.