soledad penadés
repeat 4[fd 100 rt 90]

Archive for the ‘flash’ Category

20070713 Thumbs up for FlashDevelop

Some weeks ago I said bye bye to php, html, css and all those pain inducing drugs for a while, and switched to work mainly with Flash. At the beginning I was using only the Flash IDE and external editors, as I had done since ActionScript2 appeared on stage (pun!!). But I still had a pending task in my to-do list: to have a look at FlashDevelop, specially since Zarate talks so much about it ;-)

I started using FlashDevelop a couple of days ago and I must say that it absolutely makes a difference, and what difference! Once configured, it detects my classes, methods and properties (showing an Outline panel) and helps me writing code with some autocompletion love each time I press the magical dot key, unfolding a list with available methods and properties for the active object.

I suddenly got back that I'm programming for a compiled language feeling. It was so cool! It felt like programming in Java again, but without Java annoyances.

There are some small details that I still haven't had time to tweak, like the sorting method in the outline (currently it seems to be listing everything in the same order than it was defined), or configure it to use Flex2 compiler and all that. But even if I'm just scratching the surface of what can be done with this program, I strongly recommend it. The autocomplete feature is worth a try by itself!

On a side note, I still don't get how Flash's IDE is so 1998 in what regards to the Code editor (the Actions panel). It looks as if it hasn't been given much attention, presumably because they dedicated more resources to Flex and its editor instead.

20070703 VerifyError: Error #1025: An invalid register 1 was accessed

If you need to parse some XML with namespaces in ActionScript 3 you may find this error quite soon: VerifyError: Error #1025: An invalid register 1 was accessed

It all comes because of this line:

default xml namespace = myXML.namespace();

It is needed in order to access the values in the namespaced value so removing it is not an option. The problem appears when you call any other function in your object… and you get that weird error.

I haven't managed to find out why. It kind of seems that changing the namespace (as the very example from Flash's reference on how to read an RSS feed suggests) also alters the namespace of later function calls, and so the interpreter can't find the functions.

I found the simplest solution was to reset the namespace back to nothing when I was done with accessing the XML:

default xml namespace = new Namespace(");

There should be an explanation for this but I haven't yet found it. Meanwhile this can save your life :-)

20070311 The next captcha generation for myspace forms

myspace captcha

I have had to register in this website and holy crap, I hardly could finish the process! I'm amazed there's so many people registered even with captchas like this one. Is it an V or a X? or an N?

But I presume they might be having lots of spammers overcoming their captchas so that's why they need to push it further and make it more and more complicated, even if that means that us the mere mortals can't use the site. Not that I care (except when I need to register, obviously) but I have been working on something which I think it's what they'll need in the future. Without further ado, here it is: the next captcha generation for myspace forms!

Featuring absolutely unreadable text, horrible colours, distorted and unexpected music which clashes violently with whatever you're listening to (I've added several songs playing at the same time so you can feel the pain even if you're not listening to anything right now).

The colour scheme is carefully designed to fit perfectly with every single page in myspace and therefore it requires Flash 9, so it can push the adoption of Flash 9 amongst the internet community thanks to thousands of teenagers willing to show their intimate side to the world, while also making the linux 64-bit system and other exotic systems guys get angry because they don't have a player for watching this monumental piece of crap.

Isn't it nice?

20061029 Load avg: 0.95

It's been a very busy week and it doesn't seem to go down, but surprisingly for most people, I quite like the feeling of being busy, since it doesn't allow you to spend the time procrastinating and thinking about the divine wonders of the Things That I Would Do If…

Among other things, past week mr.doob and me went to the London Flash Platform Users Group Meeting, or shortly lfpug meeting. It was very interesting and I went back home willing to get there soon to be able to download and install adobe flex builder 2 in my mac, as it had just been released that very day and was fresh and risky, as any beta version in this world :)

But I finally installed it yesterday and got almost aslept when trying to compile my simple "hello world" test. Or maybe I was already getting aslept and I thought it was because of flex builder, I don't know. I'll have a look at it later when I sort out more urgent things, I suppose…

We also got escena.org v2 in a usable status (or that I think), when I finally fixed the issues with the Spotlight section (thanks to a trace's suggestion, must recognise). I haven't talked here about the site yet because it doesn't have all the features we've planned for it, but will do when it's in a more advanced status. In any case it seems promising :-)

And in a different topic, just registered on Thursday for my first cakeforge project: cakephpbb, which aims to provide a way of integrating a cakephp application with a phpbb forum. It's something terribly simple, and in fact it has not entirely been developed by me, since it's a result of the collaboration of several people (more of a mash up than anything else). But I've been testing it and already fixed a couple of bugs, and I'm going to provide the documentation for it.

The project was approved yesterday but I won't add any file until monday or tuesday, when I finish the docs (otherwise nobody will be able to use it and it will be a useless project) and get to understand how the cakeforge backend works.

There's more interesting stuff coming in but can't be disclosed yet so you'll have to remain intrigued for a bit more… hope you can stand it :-P

20060401 What is Flex?

I have been a bit disconnected from the Flash scene for a while and it's changed quite a lot! So I thought I may share with you my discoverings while I'm getting updated on the latest news.

There's this new thing called Flex. From what I understand, it will allow you to build entire interactive applications which run both on server and client side, using Flash for the interface.

Roughly, the interesting part here is that not all the processing is ran in the server, but also the client's computer is used to run the application. So, things such as updating graphs are made in the client side, with the data that the server sends you, allowing the server to save processing power and bandwidth.

The interface is specified with an XML based language and the application logic is written with ActionScript2; you can do it with the official Flex editor (even in WYSIWYG mode) or with your favourite IDE with custom XML language schemas support (one example: Eclipse). Then, you drop your code in the Flex server, and it will serve the appropiate interface data to the client depending on their actions.

This concept reminds me a lot to the first .net demonstrations I saw: you write code once and it will be served to the user through the .net server, which will determine the appropiate html and javascript stuff to be sent to the clients depending on their browser capabilities. The problem were the browsers' implementations and their support of javascript. Each time I asked the speakers about this, they never knew what to reply. Such an embarrassing question…

In that, Flex has already won the battle. As it uses the flash player to run in the client, they can guarantee a more or less known scenario and then the developers can build an application knowing for sure that it will always work, and there won't be weird implementations of one javascript method on certain browsers, etc.

It also reminds me to the AJAX approach: do not reload the whole page, send only the useful data, and redraw whatever is needed on the client side. The weak points of AJAX are still the different browsers' implementations, and rich media inabilities: graphics would be great, if all browsers implemented SVG properly. And unfortunately, browsers are unable to play sounds just by using html/javascript: as far as I know, when someone needs to play a sound nowadays, they end using a Flash object to play it (and yes, I'm ignoring the MIDI at all).

The advantage of AJAX versus Flex is that you don't need all the human and technical infrastructure that a Flex server requires. It is way cheaper to start building things with the Ajax philosophy (see ruby on rails), and honestly, most of the applications don't really need to have fancy 3d realtime graphics with motion blur and stereo surround sound.

Conclussion? Flex looks promising but it has its own application field, which can fulfill very appropiately. For relatively low-demanding requirements applications, there are other solutions which can work (and are working, indeed) pretty well.

Of course I might have misunderstood something. If there's something you feel is wrong please do not hesitate to leave a comment and I'll correct it.

Extra final bonus

Finally, if you are really curious and want to know some hidden and technical details about how the flash player is implemented -which is what at the end is going to affect everybody: you and your users- take a look at kaourantin.net. That's the blog of one of the engineers at Macromedia/Adobe developing the Flash player. He will get you informed about the changes they make and, from time to time, those little secrets that might explain certain flash oddities.