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).
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
Create a Lightbox effect only with CSS – no javascript needed
You may call it Lightbox, or Greybox, or Thickbox, but it’s always the same effect.
When you are on a page, and click on a photo or trig some event, a Lightbox is an effect that fades the pagein the background to show you new content in the foreground.
I mean this effect

In the upper example, when clicking on a photo the site fades to black and shows the photo, in the lower one when clicking on “login” the site fades to white and shows the login form.
There are tons of Lightbox scripts in the web, each one with its unique features and limitations, but all require massive use of Javascript or the installation of javascript frameworks.
In some cases, there are “lightweight” versions with “only” 40KB of Javascript.
This example does not want to compete with those scripts, but if you are looking for a simple, 100% CSS, 0% javascript lightbox, this may help you.
Features of this Lightbox:
100% CSS as said
You can insert any content in it (some scripts out there only allow images) Read more
Managing crossbrowser opacity with CSS
Sometimes you may want to change the opacity of some images with CSS.
There are different ways to do it, according to the browser you are using. In this example, we’ll see both Explorer and Firefox.
Firefox
In Firefox, the style is -moz opacity: xx where xx is a number from 0 to 1, where lesser equates to more transparency (basically, it’s the alpha).
1 | <img style="-moz-opacity:0.5" src="/images/google_logo.gif"> |

The above image should look solid in Explorer and 50% transparent in Firefox.
Explorer
In Explorer, the style is filter: alpha(opacity=xx) where xx is a number between 0 and 100 (again, it’s the alpha)
1 | <img style="filter: alpha(opacity=50)" src="/images/google_logo.gif"> |

The above image should look solid in Firefox and 50% transparent in Explorer.
Firefox and Explorer
To create an image with transparency both in Firefox and Explorer, you need to use both styles
1 | <img style="filter: alpha(opacity=50); -moz-opacity:0.5" src="/images/google_logo.gif"> |

This image should look 50% transparent in Explorer and in Firefox.
Enhanced country selection with Css and Javascript
How many times you had to choose your country in a form, with a old, simple popup?
Time to change the way you choose your country (or anything else) with a bit of Css and Javascript.
I am showing the example in a iframe not to mess with WordPress styles.
As you can see, when you move the mouse over the text input, a list with (almost) every world country and flag appears, and when you click on a country, its ISO code is displayed into the text input.
When you move the mouse out of the country list, it closes.
How can it be made? Read more
Submit button “inspired” to Macromedia Buttons
I like very much Macromedia buttons, and I wanted to have it one like these in my forms.
That’s all… here it is
the style is
1 | <input style="width: 120px; border: 3px double #999999; border-top-color: #CCCCCC; border-left-color: #CCCCCC; padding: 4px; background-color: #EEEEEE; background-repeat: repeat-x; color: #333333; font-size: 11px; font-weight: bold; font-family: Verdana, Helvetica, Arial, sans-serif;" type="submit" value="Push me" /> |
Bye.
- Citrus Engine released for free for learning
- My epic fail with ClickBank
- Get up to $100,000 for your next Flash game with Mochi GAME Developer Fund
- Create a dynamic content animated footer ad for your site in just 9 jQuery lines – 17 lines version
- Sell sitelocked version of your Flash games and even .fla sources to Free Online Games
- Protect your work from ActionScript code theft with SWF Protector
- Create a dynamic content animated footer ad for your site in just 9 jQuery lines
- Understanding Box2D’s one-way platforms, aka CLOUDS
- Triqui MochiAds Arcade plugin for WordPress upgraded to 1.2
- Box2D Flash game creation tutorial – part 2
- Create a Lightbox effect only with CSS - no javascript needed
- Flash game creation tutorial - part 1
- Create a Flash Racing Game Tutorial
- Flash game creation tutorial - part 2
- Make a Flash game like Flash Element Tower Defense - Part 2
- Flash game creation tutorial - part 3
- Triqui MochiAds Arcade plugin for WordPress official page
- Make a Flash game like Flash Element Tower Defense - Part 1
- Create a flash draw game like Line Rider or others - part 1
- Create a flash artillery game - step 1
- Flash game creation tutorial – part 5.2 (4.88/5)
- Create a flash artillery game – step 1 (4.79/5)
- Create a Flash Racing Game Tutorial (4.76/5)
- Create a survival horror game in Flash tutorial – part 1 (4.74/5)
- Create a flash artillery game – step 2 (4.74/5)
- Creation of a Flash arcade site using WordPress – step 2 (4.73/5)
- Flash game creation tutorial – part 1 (4.71/5)
- Flash game creation tutorial – part 2 (4.71/5)
- Create a flash draw game like Line Rider or others – part 1 (4.69/5)
- Creation of a platform game with Flash – step 2 (4.68/5)




