Sunday, May 27, 2007

Game: Breakout

It's been a while... I haven't had time to post anything recently, even though I've had many interesting things to talk about, for instance I went to Mike Downey's presentation on Apollo at the London Flash Platform Users Group where I asked him if there would be any support from Apollo to Actionscript 2 and seems like they will stick with the Actionscript 3 support that it has already.
Well, anyway, as my fiancée went to Poland for the weekend, I had time to play a bit with the Tweener class and to finish up this game: Breakout.

I know it doesn't have levels or anything special but I like it :)

salut!

Sunday, April 08, 2007

Testing yourminis widgets

I'm just testing how the youminis widgets engine works.
I must say it was easy to put a widget on the blog, I just selected the widget and chose "copy to web", a blogger icon appeared and I was asked my gmail address and password, pressed copy it! and there you go:

For more widgets please visit www.yourminis.com

That was really simple.
Of course there where many more options, like Hi5, mySpace, Typepad and many more.
yourminis has lots of potential, specially because they are cross platform in any sense, not only due to the nature of their platform, Flash, that we know can be seen in any browser in any operative system that has the plug-in, but because they can be downloaded to the desktop thanks to Adobe Apollo alpha.
Yeah, any widget in yourminis can be downloaded to the desktop. I think is fantastic!

Salut!

Sunday, March 25, 2007

My first alpha Apollo alpha app

eh?

well,
as Adobe Apollo is still alpha, it lacks many things including support for html-flash based applications in some specific areas.
Seems like this first release targets mainly Flex developers as it has much more support for Flex applications, for instance dragging, closing, maximising applications, etc.
Therefore, as is coming from a Flash movie, my first application is in alpha stage but as I still find it pretty cool, I'm releasing it.
It doesn't have a close button so you would need to press Alt+F4 to close it or right click on the taskbar and select "close"






You would need the Apollo Runtime to be able to run this application.
Description: Ants running on your desktop that interact with your mouse. You can still use all other applications while this one is running.

Any feedback is very welcomed!

Saturday, March 10, 2007

Easy Skype Status in Flash

After my post Flash Skype Status Part III I've received emails from some of my readers asking me for help as they couldn't understand 100% the whole process.
When I did the experiment in September last year, I didn't take into account many things and just continued playing with Flash, php and the XML from SkypeWeb.
To avoid confusion, let's see how to show in Flash my Skype Status in a simple way:

First of all, be sure you have the the latest SKYPE installed

Then follow one of the two options below:

TEXT ONLY
- Open a new Flash document
- Select the Text tool and put a dynamic text field on the stage with instance name "myStatus" as shown in the picture



- on a new layer, write the following actionscript:

function loadXML(loaded:Boolean):Void {
if (loaded) {
my_status = this.firstChild.firstChild.childNodes[2].childNodes;
attachStatus();
} else {
trace("XML not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("http://mystatus.skype.com/myID.xml");
function attachStatus():Void {
myStatus.text = my_status
}


You would need to change myID for your actual Skype ID, ie echo123
- Test your movie pressing ctrl+enter, your Skype status should be shown in the text field.
*There is still a problem: "cross-domain" policy. I will explain how to avoid it later on.

If you want to know more about XML and Flash, please follow this link.

ADDING INTERACTIVITY
If you want to show different images depending on your status and let users interact with you, then follow this steps:
- Open a new Flash document
- As there are 6 different status, you should have already 6 different images. Import them all into your document and create a movieclip for each of them



- The most important thing here is to put an identifier name to each of them; to do that, right click on the MovieClips in the Library and select "linkage" and write as Identifier the exact name of each status, for instance "Do Not Disturb"



- You might have noticed already that in the library there is a seventh movieclip called "loader_mc". So we need to put an instance of this empty movieclip on the stage and the stage will have nothing else but our "loader_mc" that in fact is empty!



- on a new Layer write the following code:
function loadXML(loaded:Boolean):Void {
if (loaded) {
my_status = this.firstChild.firstChild.childNodes[2].childNodes;
attachStatus();
} else {
trace("XML not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("http://mystatus.skype.com/myID.xml");
function attachStatus():Void {
loader_mc.attachMovie(my_status, "status", 1);
}

You would need to change myID for your actual Skype ID, ie echo123
- Test your movie pressing ctrl+enter, your Skype status should be shown on your movie.
- We can as well add a script to allow any visitor to contact us when pressing the movieclip. To do that just add the following actionscript:

loader_mc.onPress = function() {
getURL("skype:myID?chat");
};


People can have a chat with you through Skype if you're online or leave a message if you're not.
There are more options and all of them are explained on the Advanced Skype Links.

CROSS-DOMAIN POLICY
Cross domain in flash is when data from X website is loaded into a movie on another website with different domains; for security reasons, Flash Player is only allowed to do that under certain circumstances. To read more about Flash Player Security Sandbox, click here.
As the data we are trying to load is served by skype.com, we would need to by-pass the cross-domain policy; we can do that using a php script:


<?php
header("Content-type: text/xml; charset=utf-8");
echo file_get_contents($_GET["proxy_url"]);
?>
Save this script as proxy.php and upload it to your server.

- Now we need to change one line on our actionscript, so instead of

xmlData.load("http://mystatus.skype.com/myID.xml");


we will write
xmlData.load("http://domain.com/proxy.php?proxy_url=http://mystatus.skype.com/myID.xml");

- Remember to change myID for your actual Skype ID and domain.com for your own domain address.

The good thing about this php file is that we can use it on different projects, for example you can load the RSS feed from my blog just writing:
http://domain.com/proxy.php?proxy_url=http://overloadstudios.blogspot.com/feeds/posts/default

and it will appear as if the data is served from a different domain.

That's it!
This post is similar to Flash Skype Status Part III, however is more detailed and both the actionscript and php files are optimized.

salut!

Sunday, February 25, 2007

Flash-PHP file downloads counter

If you want to keep a record and show how many times has a file been downloaded, you can use Flash, php and a simple txt file to hold the number of downloads.

When I finished my Firefox Screensaver, I showed it first at the spreadfirefox community, of course, without any way to count the downloads.
When I finally had the time to show it here on my blog, I was looking for a way to count the number of downloads but had the limitation that on this blog, as far as I know, is only possible to write "front-end" scripts and, as you know, without a server is not possible to have any downloads counter as there is no way to store any data.

However, using flash as front-end I can pull any data from anywhere behind the scenes and show it back on the same flash.

Then, if in case you want to create a file downloads counter, just follow these steps:

First of all, we will need 4 files,
- the file we want to be downloaded, usually a compressed .zip file
- theCounter.txt file which will store the downloads number
- the flash file to show the number of downloads and to allow people to download the file
- a php file which behind the scenes will manage the downloads counter and point to the right link to the file to be downloaded.

Let's start with the flash file:

- Open a new flash document
- Put on the stage all the graphics you need and also a dinamic text field which will show the number of downloads with an instance name of "downloads" as shown in the picture:



- Select the background image and press F8 to make it a movieclip, and put it as instance name "downloads_btn"



- On a different layer called "actions", write the following actionscript:
// --- Function to load the stored number ---
function loadingVars():Void {
var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function(success:Boolean) {
if (success) {
downloads.text = "( "+my_lv.downloads+" downloads )";
} else {
trace("Error loading/parsing LoadVars.");
}
};
my_lv.load("theCounter.txt?num="+random(999));
}
// --- Calling the function ---
loadingVars();
// --- Button actions ---
downloads_btn.onPress = function() {
getURL("downloads.php");
};
downloads_btn.onRelease = function() {
loadingVars();
};
What is happening here is, first we are loading the variable stored in theCounter.txt file and to avoid the cache memory and load a fresh value everytime, we add a ?num=random(999) that gives us a unique value when calling the same file, that way the browser thinks you are loading a different file...
When pressing the button, we are calling a php which is the one in charge of the download and counter system.
On releasing the button, we load the variable again and as the file we are offering for download has been requested another time, the value of the variable loaded is bigger by one.
Save the file and publish it to have a swf file.

Now let's see the php:

- Open dreamweaver or any other php editor; even notepad can do the job.
- Write the following code:
I'm sorry this is an image but as I said before, blogger doesn't like back-end scripts and stripped it out when I wrote it here...

We are first opening theCounter.txt file, checking what it has inside and from it, the value of "donwloads" is stored in a variable called "count", then add one to this value, write the variable and the new value of it back to the txt file and closes it. Next we give the real location of the zip file and redirect the browser to it.

The .txt file has only one line inside:
downloads=X
where X is the current number of downloads, so the first time it should be 0 (zero).
That's it!
just upload everything to a server with php support and embed your swf where convenient.
For example, I embeded my swf on this post:



Try it, click on the button, download and install the screensaver, if you don't like you can always uninstall it :)

salut!

Saturday, February 24, 2007

Submit to StumbleUpon flash button

I've just uploaded a new WebWidget to Widgipedia: "Submit to StumbleUpon flash button"
Integrate your site with Stumbleupon; Adding this widget allows people to submit a story from your blog or any other personal website to Stumbleupon for others to discover.
StumbleUpon is a great way to find websites that are really interesting for you as they have been submitted to the database into different categories, you subscribe only to the categories you like. It's so addictive that my del.icio.us account is growing thanks to the cool stuff I discover when I "Stumble".

If you already have an account with them and have a blog, why not adding this widget:



Tested already by submitting this page to StumbleUpon!
Get it from Widgipedia.

Salut!

Friday, February 23, 2007

LFPUG February 07 meeting


lfpug0207-01, originally uploaded by Ernesto Quezada.

Alias Cummins presenting at the London Flash Platform Users Group meeting last night.

We had two great presentations yesterday night; the first one, Alias showed us some cool stuff he has done experimenting with filters, bitmaps, and some other classes. He explained us how all this special filters and stuff comes from the same root: Perlin noise. In the end he showed us some code that looks simple but complex at the same time, using Maths and other crazy stuff.

The second presentation was in hands of Dan Thomas on Apollo. After explaining us some things about the legendary Apollo soon to be released (hopefuly), there was a debate about how good is Apollo and why should anyone choose it instead of for example JAVA? I think Emmanuel raised a good point when saying we are following too much Adobes press that even we are doing much more marketing than them. Very true!
Anyway, for desktop applications, I preffer to continue using MDM Zinc, a much more mature tool to develop desktop RIAs.

And the best part of the meeting, for me of course, I was AGAIN the lucky winner of a book!
This time is Richard Leggett's FLASH APPLICATIONS FOR MOBILE DEVICES that of course I started reading already.

Thanks Richard for the personalized autograph!

Salut!

Sunday, February 18, 2007

Game: Blitzkrieg - Lightening War



I was following a tutorial on Creating a Vertical Shooter that I wrote a while back (more than a year ago)
- creating-vertical-shooter-part-I
- creating-vertical-shooter-part-II
- creating-vertical-shooter-part-III
When I wrote it, I made Pawel and the Flying Dragons; this time I made a new game:
Blitzkrieg - Lightening War

The actionscript I used is basically the same, just changed the graphics and added a couple of things like a shotgun and an enemys bomb. This is a probe that any script can be re-used and it has to be made thinking about it, some basic rules in Object Oriented Programming (Polymorphism and Inheritance).

The scoretable is almost empty so, go for it ;)

PD: Don't ask me what's that of a tank shooting anti-aircraft, hey! at least this time there are no flying dragons...

Sunday, February 11, 2007

Take back the web & the desktop!

Firefox ScreenSaver





To help to spread the SFx community and Mozilla Firefox at the same time, I've done a ScreenSaver that shows the Firefox downloads in a different way.

The idea behind is to reach 1 Billion downloads (now is a bit more of a quarter of billion) and show it as a full Firefox logo.
So far if you leave the screensaver running, it shows just 1/3 of the logo as only 1/3 of a billion has been downloaded as per today (11/Feb/2007) and this third of billion is slowly uncovered by squares (the data collected is transformed into squares, each square represents 200,000 downloads)...

well, better if you check it by yourself :)




salut!

Saturday, February 10, 2007

Flash Counter Widget goes coloured



The Flash Web Counter
widget has found a wide acceptance in the Widgetbox users community.
Shown in the top rated list as the highest rated is a big honour for me and from the 10 widgets I have uploaded to Widgetbox, is by far the one with more subscriptions.
One of its goodness is the small control panel where you can reset the counter to any convenient number and from today its possible as well change the counters background colour!

There is a number of files involved in the process for this widget to work:
- The flash counter itself
- An individual text file for each counter to store number of visits and selected colour (one text file per user)
- A php file that gets the current value of the counter and adds one more visit when required
- The Flash Control Panel
- A php file to get and set the values of both colour and number of visits.

All these 5 files have been updated today in order to have the option of changing the counters background colour. I know it would have been better to have a MySQL database instead of the hundreds of single text files I have currently but my hosting plan is very basic...

Anyway, don't be shy and leave your comments-feedback here ;)

Thursday, February 01, 2007

Widget: Thunderbird Contact Form

I just uploaded a new web widget on Widgetbox.
from its page:
A simple contact form that promotes Mozilla Thunderbird. Let your visitors contact you giving them the option of sending you messages or get your contact details, ie mobile phone number and email address.
If you want to contact me, test it from here but as well I invite you to go and test it from Widgetbox


Available from:
http://www.widgetbox.com/widget/thunderbird-contact-form
Yes, I use Mozilla Thunderbird and this is my tribute to it.

Salut

Wednesday, January 24, 2007

web widgets on the widgipedia



Some days ago, widgipedia announced the opening of their new section: web widgets.
We have promised that we'd create the ultimate widgets resource, so today we've taken one step closer to this goal by merging the two worlds: desktop widgets AND web widgets are all together at Widgipedia.
as some of my web widgets were not compatible with widgetbox, I gave them a try on widgipedia and luckily for me they all work like a charm!
So far I have uploaded three of them:

- Add to bloglines flash button
- Add to delicious flash button
- Add to netvibes flash button

So, if you are looking for some cool web widgets, you can also visit the widgipedia and if you have any request, comment, suggestion, idea, etc. I'm happy to read it.

salut!

Tuesday, January 16, 2007

Desktop widget: CPU usage


I need feedback on one of my latest desktop widgets.
This standalone desktop widget for windows doesn't require installation. The following description is taking from the widgipedia where the widget is hosted:
Bars and numbers showing the percentage of your CPU Usage. No installation needed. Stays on top of all other windows allowing you to see the resources request from different applications. Press Esc key to close it.
One person has left his feedback saying it doesn't work; so please if you can try it and leave comments about it either here or on its webpage telling me whether it works or not, would be really appreciated.

Thanks!

Sunday, January 14, 2007

widgets: yeah, I changed my mind...

more than a month ago, I wrote "My widgets on widgetbox" where I said I wouldn't write about my widgets on this blog anymore.

Well, actually I changed my mind as I have decided to continue writing about them and is because of many reasons:
- Feedback: I can get feedback, comments, suggestions and requests
- QA: To test them and to see how they look like when published on a blog
- Incompatibility: Some of the widgets I've done or updated are not compatible with widgetbox
- Promotion: I want my widgets to be used by other people so I need to let people know about them
- Personal: To use my blog :P (writing is a good habit and specially for me as English is not my mother tongue...)

so, to catch up I will write a short list of the web widgets I've done and I haven't mentioned here:
- Mini del.icio.us hotlist: shows hotlist from the del.icio.us homepage
- Flash Date Calendar: simple flash calendar with digital clock
- Firefox Digital Clock: firefox download counter and digital clock
- Digital Time and Date: simple digital clock and date (74 subscriptions so far)
- Flash web counter: website visits counter (123 subscriptions so far)

So far, I have submited 9 web widgets to widgetbox and all of them are doing well; I have many more ideas but haven't got the time but from now on, I will continue writing about them here on my blog.

Salut!

Monday, January 08, 2007

Hi5?



The other day I had a bit of spare time and while working on my Firefox-Calendar desktop widget, I managed to update my hi5 account.
At last! after many times trying to open the buggy website I could use the old "features" and check the new ones.
One of the things that I liked is that you can use flash now and as a test I put my Flash Skype Status button on it.
I don't know why in Latin America hi5 is so popular, many people preffers it rather than mySpace for instance and my sister is one of them, who is always sending me messages from it; but one of the things I don't like is that kind of force you to start a blog as many other websites do nowadays and I find useless to start blogs that I won't be able to update and will be there left dusty and rusty...

Anyway, for me having emigrated so far, hi5 is a good way to see how my relatives are doing as I haven't seen some of them for almost 5 years...

ok, time to go home :)

salut!

Monday, January 01, 2007

Happy 2007

2006 has gone. Was actually a very good year for me. It was exactly a year ago that I started blogging again.
Apart from the changes on my personal life, last year on this blog I wrote 66 posts that makes an average of 5.5 posts per month and 62 comments from my visitors, I started the year posting about my games and finished talking about my widgets.
Yeah, definitely a good year.
Now let's see what 2007 brings.

hey!
Happy New Year to all of you!

salut!

Saturday, December 30, 2006

My first desktop widget!



Some time ago I asked the guys at the Widgipedia to open a section for web widgets but as the Widgipedia is still in beta, they told me:
Flash widgets are coming soon, as part of our goal to host "the best widgets and gadgets across any platform"
so I continue with my web widgets and put them in Widgetbox.
On the last day at Flash on The Beach I was the lucky winner of a MDM Zinc copy which allows you to create desktop applications from flash including screensavers and WIDGETS!
So I did my very first desktop widget today, after few days trying to understand the tool that for any strange reason doesn't like vector images... and uploaded it to the Widgipedia!

It is a very simple Skype Analogue Clock but I think is cool, specially because is my first desktop widget :)

Salut!

Thursday, December 28, 2006

in the top 5!

Alex Iskold from AdaptiveBlue, has posted on his blog the top 5 widgets every blogger must have and to my supprise, one of my widgets is in the list!
The post R/WW Christmas - Widgets, not Cheese is mainly a tutorial on how to install and use widgets from widgetbox but has as well many interesting points about the importance and use of web widgets.
I know I promissed not to write about my widgets on this blog, but hey! I'm really exited to know that my Flash mini Digg viewer is a must have!
I'm already working on a 2007 version of it, so if you have any suggestion, I'm all ears (well, eyes...)





salut!

Monday, December 25, 2006

Barcelona


PICT0046, originally uploaded by ernesto.quezada.

Last week, Ewa (my partner) and me went to Barcelona for a week. It was just great!
Eventhough it was a bit cold but the beauty of the city let us walk through all the streets we could.
It was so cool that I even want to move over there!
we will see...

Salut!

Saturday, December 09, 2006

my widgets on widgetbox



I've decided to stop posting about my little experiments -widgets, eventhough I think is important for me too keep a record of what I was experimenting with and when... as for instance playing with php to get rid of the XML crossDomain policies was a good fun and for sure something new will come accross when continuing experimenting with flash and other technologies; I might post something about the solutions if any.
So, if anyone is looking for my widgets, they are available at Widgetbox, although the ones I've released here will continue working as usual.
You can see my widgets from this link.
I hope you like them and if you have any comments or suggestions, I will be very happy to read them ;)

Salut!