Archive for March, 2008

IMDB AS3 Api (beta)

Posted in api, as3, flash on March 17th, 2008 by admin – 3 Comments

As part of a school project about AS3 api’s i developed a small actionscript api that uses Itzchak Rehberg php classes to parse cache the imdb pages and extract the information from it(with a very cool caching mechanism). i just tweaked it a bit so it parses xml instead of html. there is a working draft copy here if you want to test it just type in a movie title and it will parse an xml wich gives you the all the associated imdb-id’s for it.

the as3 api now only concludes searching and fetching movie information.

its as easy as just to

var imdbSearch:SearchIMDB = new SearchIMDB(”scrubs”,20);
imdbSearch.addEventListener(Event.COMPLETE,serviceLoaded);
imdbSearch.load();

and for fetching a movie you can just do

movie = new Movie(<enter movie id here>);
movie.addEventListener(MovieEvent.LOADED,movieComplete);
movie.load();

Try not to put in a loop of fetching 500 movies at the same time because it will overload your internet connection. I did a couple of tests (try it out here) (srcview) i also did test to fetch movie information 1 at the time but it goes like 50% (avg) faster if you just request all at the same time ( just respect a golden rule .. “don’t overdo it” ;-) )

you can download the source files here

you can download the php source files here

note that if you want to use the code that my server is only there for testing purpose and if you do want to setup you own project just copy the files to you php server and change the link. I can only keep my server online as long as it can handle traffic :)

AS3 Secure zip extension

Posted in api, as3 on March 17th, 2008 by admin – 3 Comments

A couple of days ago i was searching for a AS3 zip API that would support encryption.
When i couldn’t find one i started to extend David Chang’s Zip API with the RC4 encryption method made by Metal Hurlant

What it does is that it encrypts the bytearray provided by the zip API with RC4, and in the test application you can see that it writes the file to the hard disk. It is not compatible to open in windows/mac environment. But that just my intention, only to open it in flash ( if provided the right key off-course ). Maybe a nice way to secure/compress your assets in 1 file.

my latest test on my mac ( 2.2ghz, 2gb ram) concluded that it could parse/decrypt +500kb/s
so be careful with very big files ;)
I’m open for suggestions and if you find any bugs just let me know ;)

(in the zip there is also an SWFParser class from Denis V. Chumakov it comes in handy if you want to parse an swf-bytearray)

download source code

for the test code just look in the ZipSecureXML_test.as file and you will find out how to load/save an encrypted zip file