JQuery powered lights off effect

A couple of days ago a fan of my Facebook page asked me for a script to make the effect you see on this page.

Obviously simply reverse-engineering the script wouldn’t be enough for me, so I decided to create a lights off effect that make any content in a given div remain highlighted while the rest of the page fades to black (or to any color).

I used JQuery to manage the fade effect because it’s the best Javascript library available at the moment.

As a developer, I also tried MooTools and scriptaculous but believe me JQuery is some steps ahead.

Now let’s see this script: Read more

MagOrMin – an old php based game

This is an ooooooold (let’s call it) game I explained for a web programming class in 2003 or 2004.

It was made to explain some basics about Php, sessions, MySql and styles. All in one.

That’s how students learn… all in one and with a real world example.

It’s just a “guess if next number will be higher or slower than the current one” concept, the same that I applied to GuessNext last year.

It’s called MagOrMin and the name comes from the italian translation of “higher” (maggiore) and “lower” (minore).

MagOrMin

Simply click to say if next number will be higher or lower, gain extra lives and compete for the high scores.

I plan to port the game in Ajax, adding a so-called “Web 2.0″ style and convert it into a Facebook application with all features… you know… I must monetize everything…

Meanwhile here it is the source code: Read more

Embedding a wmv file in your web page

Just in case you have to embed a wmv file in your webpage, and there is no need to do it since it’s possibile to play better videos with flash but… just in case you really have to do it… like I have to do it today… here it is the html code

1
2
3
4
5
6
7
8
<OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="190" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="videofilename.wmv">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<PARAM name="autostart" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="videofilename.wmv" NAME="MediaPlayer" WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
</OBJECT>

Adjust height, width, ect to match your video settings.

flash games company