Archive for October, 2007

AS3 Regexp

One think that I am really thankful is the addition of Regular Expression in AS3.
That’s really helping me around.

Here’s some cheatsheets that I always check:
http://krijnhoetmer.nl/stuff/regex/cheat-sheet/
http://regexlib.com/CheatSheet.aspx
http://www.ilovejackdaniels.com/cheat-sheets/regular-expressions-cheat-sheet/

Also, I uploaded my svn my StringUtils class
http://code.hellokeita.in/public/trunk/as3/br/hellokeita/utils/StringUtils.as

Actually, there’s just the trim method, but you see that’s it’s really easier than AS2.
\s|\n|\r|\t|\v <- I put all those characters to make sure every initial end final whitespace are trimmed.

Also, I uploaded my ColorUtils.as too.
You see that it's really easy to manage ARGB colors with it.
Also, there's a RGB -> Grayscale color converter.

Oh, don’t try converting a bitmapData pixel by pixel to generate a Grayscale image.
There’s an easier way to make it with the BitmapData.paletteMap() method.
but… I’ll keep it to the next post …. if anyone shows any interest.

Vote in HexoSearch Vote

Comments (2)

Launching my public subversion

http://code.hellokeita.in/public/

People, I’m launching my codes on public subversion repository.
It’s almost nothing there… but, how people claimed for the source (here), there is it.

Hope you enjoy it…

PS: If there’s any bug or anything I forgot, apologize me… I still don’t get much time to review my codes…

Vote in HexoSearch Vote

Comments (5)

Sony Recyou OneSeg Walkman

Finally, a release.

http://www.recyou.jp

It’s not my first work here in Japan, but I assume it’s my debut project.
It’s a website for the new Sony walkman. People here in Japan uses the word Oneseg(One segment) for devices that have multi-uses.
Actually, I don’t know what this walkman is capable, but it looks like a walkman that you can watch tv broadcasts and record it.

The flash stills a little heavy processing, actually I didn’t have much time to improve it.
I’m using Papervision3D on the ‘G’ Grid Mode. Actually I made plenty of examples… maybe we will update with new Papervision3D views.
Clicking on ‘S’, you can upload you picture and than the magic does the rest, and your picture will show up singing. And also, if approved, your singing picture will be broadcasted on Japanese TV.

Anyway, enjoy it.

Vote in HexoSearch Vote

Comments (7)

SWFObject ExternalInterface bug on IE

I experienced a problem calling ExternalInterface.call when using SWFObject on IE.
Actually, I figured out that it wasn’t any bug. Just a little miss.

On IE, the Flash looks for the Flash Object by the Object’s ID.
So, what you need to do is just set the right name and id of the flash object you are embedding

[code lang="actionscript"]
swfobject.embedSWF("myflash.swf", "flash_content", "100%", "100%", "9.0.0", "expressInstall.swf", undefined, undefined, {id:"flashMovie", name: "flashMovie"});
[/code]

Just that!
I hope it helps someone that experienced the same problem.

Vote in HexoSearch Vote

Comments (15)

AS3 AVM1 Loader

I’ve been working on a project that needs to load FFmpeg generated SWF.
FFmpeg generates Flash 6 SWF. And there I got the problem, because AS3 can’t control AVM1 movies.

I googled and I found this AVM2Loader Class from Fladdict.
Simply talking, it loads the SWF and rewrites the necessary bytes to convert it to AVM2.
But, the problem was that this class just converts Flash 8 compiled AVM1.

So, I restarted my research.
Tried with Localconnection, but I got some delay on it’s response.

So I used ExternalInterface, and so far, it was working fine, until some guy tested on Safari 3 and got some slow script error.
Huh of course… I was loading douzens of avm1, everyone calling ExternalInterface on EnterFrame.

Thanks to google, I found the ultimate solution.
I found this other class ForcibeLoader that really converts any SWF versions to AVM2.

I rewrote this class for an easier syntax, but… I’ll be posting it when I get my svn and some kind of trac system ready.

So… thanks for all those byte eaters.

Vote in HexoSearch Vote

Comments (5)

Performance increase with BitmapData

I’m working on a project that everything eats performance, using FLV videos, animated smooth Bitmaps, Papervision3D and everything else…
So I started desperately find a way to increase the flash performance.

So, I realized that using BitmapDatas instead using many sprites and FLV videos helped really much.
I mean, instead adding a full screen FLV streaming video on your background, add a Bitmap child on your background that draws the FLV child.

I didn’t make any benchmarks, but, at least on this project it’s helping me speeding up my heavy processing flash.

Vote in HexoSearch Vote

Comments (2)