Archive for January, 2008

Microsoft SilverLight: Light ‘em up!

bilde-5_blog.jpg

I just browsed through Microsoft’s download pages to find a .NET Framework install needed for FlashDevelop when I came across this page asking me if I would like to try their shiny new Silverlight-boosted download area. Of course I was curious, so I happily OK’ed the installation link for the Silverlight and waited for my first encounter with MS’ answer to Flash.

Now, why in the world MS would like to be a latecomer in this game in the first place is beyond me, but why even bother to turn up at the table with anything less than at least a decent hand. First, *MS* Internet Explorer crashed upon completion of the installer. When I fired it up again and went back to their much proclaimed download site, the first thing I got was this pucker:

bilde-2.jpg

Then, after dismissing that dialog I proceeded to click the link that said “Downloads and Trials”, to which the Silverlight application responded with this blank screen:

silverlightblank1.jpg

After a few clicks here and there I managed to land at the correct place to browse for the .NET Framework 2.0 download, but browsing was sluggish and sometimes irresponsive.Come on MS - this is supposed to be a showcase of your great Flash competitor, nothing here is new, nothing here is better and there’s a long way between this and to improve the Download Center experience and make it easier to discover and download Microsoft software a you put it. This is kind of like going up to Ronnie James Dio on stage and saying “Look, I’ve made this song called Holy Diver, and now I want your fame”.

Needless to say Silverlight ain’t scaring me yet.

Flash JavaScript Resizer - fill the browser window without cropping

Creating Flash content that fills the entire browser window right up to the chrome is nothing new. Normally it is accomplished by setting the swf’s width and height to 100% in the object and embed tags and controlling how different elements respond to resizing with ActionScript within the Flash Movie. But in a recent project I needed to ensure that the swf did not scale below a certain size so that the browser is forced to display it’s scrollbars. This is because while the stage of the movie scales the main content is not scaled, only centered. That makes the browser crop your swf, effectively rendering the use of small(er) screen resolutions impossible.

See for yourself: Resize Example

Because of this I had to write a small JavaScript to gain back some control over how the move resized. Here you go, you can either download only the JS-file or the entire zipped example above.

flashresizer.js flashresizer.js

ResizeExample.zip Entire zipped example

Enjoy!

Call Of Duty 4 (PS3) port opening (forwarding) for AirPort

If you play Call Of Duty 4 on PlayStation 3 (like me), chances are you’ve spent some time waiting to be connected to an online game. Infinity Ward who created the game blame your internet router for not having the correct ports opened. While this post says that you will need to open ports 3074 and 3075 on you router, maybe you don’t even know what a port is, not to mention how to open them?

To be honest I don’t know too much about this stuff either, but this I do know: the term “opening a port” is somewhat misleading. It took me some time to discover that it’s actually the same as “forwarding a port” or “port forwarding” as it is called in the AirPort Admin Utility for Mac. You cannot just open a port, you have to tell the router which computer on your network should receive network traffic directed to that port. That computer is identified by an IP-address, but that means entering that IP address manually, and most home networks are configured handle this automatically (by means of DHCP) and that’s likely to be the most practical solution anyway.

How do we solve this? Enter DHCP Client ID… ok, an introduction should probably end with a far sexier name than “DCHP Client ID”, but here it goes, watch:

These screenshots are in Norwegian, but the layout is the same, and I will attempt to translate.

Step 1: Open AirPort Amin Utility and select “Internet” and “DHCP”

NOTE: This requires that your AriPort is set to share a public IP address. That setting is located in the first tab under “Internet”.

bilde-1.jpg

At the bottom you will se something called DHCP reservations, and the list is likely to be empty, unlike mine. Below the list a +-button. Click that and this sheet appears:

Step 2: Enter a name and method for the new reserved IP address.

bilde-2.png

I chose to name it PS3, bu that’s not important. What is is that you specify DHCP Client ID as the method and click continue.

Step 3: Enter a client ID and the IP address you wish

bilde-3.jpg

The Client ID is important because you have to enter the same on your PlayStation. May I suggest “PS3″ for that. Next you enter an IP address. The three first numbers have been entered for you, and you have to select a number between 2 and 256. I chose 94, and if that’s not manually assigned to any other computer on your network it will work for you as well. Click “Done”.

Step 4: opening/forwarding the ports

bilde-4.jpg

Select “Advanced” and “Port Forwarding” and you will see something like this. Again, click the +-button below the list and this sheet appears:

bilde-5.jpg

Fill out the fields exactly like the screenshot, or if you chose a different IP address to be reserved for your PS3 in step 3, enter that address instead. Click “Continue”.

bilde-6.jpg

Here you select a name for the configuration. Again, this has no technical meaning, it’s just a description so I entered “COD4″ as an abbreviation for “Call Of Duty 4″. Pretend like the rest of the sheet isn’t there and click “Done”.

Step 5: Restart the AirPort

Restart your AirPort by clicking the “Apply”/”Update”/”Restart” (don’t know it’s actual name in English) in AirPort Admin Utility.

Step 6: Configure your PlayStation network settings

You can configure the network settings for your PS3 almost like you already have. You need to choose manual setup, but you can still use automatic detection for all settings except you DHCP Client ID, which, obviously, has to be whatever you chose in step 3. Remember my suggestion was “PS3″. After that Bob’s your father’s brother!