Archive for the ‘web’ Category

Glass magazine article

Thursday, October 15th, 2009

glass-logo-200

The people from glass magazine invited me to write about space and distance in relation to my project80Days (oehm) project. Read it here

SWFBridge – AS2, AS3 communication, made easy

Sunday, October 11th, 2009

One week before the launch of project80Days, google-maps killed the open-soruce AS2 support for the map and I was without a map, project80Days being an older project that I never had bothered to update to 3.

The map being the heart of the app was more than a bummer. So I was eager somehow get this sorted. Absolutely to my surprise(or maybe not, oh holy internet), I remembered that I can have and AS2 movie running in a AS3 container, no problem, but I needed communication between those. No normally AVM1 containers are like black boxes to AS3, so what to do.

SWFBridge is a free and seemingly easy to implement solution, and it saved my behind. It uses the LocalConnection class of flash and is fairly easy to implement, yet a nightmare to debug as flash was consistently crashing when I was running the app, maybe due to the heavy activity of the AVM1 movie.

So far after using it for nearly two weeks, I would still recommend it as a quick fix, or good solution, as long as you don’t have too much communication going on between AS2 and AS3. The slight time delay restricts it’s use a bit and coding for a time delay, when you have dependencies, made me split up many of my processes.

On the top of that, I discovered, that after using it for a while (speak reloading the movie in Firefox on mac, it stopped communicating and I had to restart the browser. Same goes for the crashes, when it takes down Flash(and Flash is my top-list crasher, if not only anyways) a LocalConnection seems to keep lingering, making it unable to establish a new connection on the same movie. I had to restart the laptop everytime that happened.

So if you are in dire need, take it and it will do it’s job, for a clean job, update to AS3.

I put a copy of the class on my server: download here

or get it from where I found it at gskinner.com

project80Days.com – launched

Sunday, October 11th, 2009

banner480text

Having launched our first product last week with great success, it is time to look at some updates and the next steps. Being our first attempt on an unusual social media website, it sure turns out to be a beautifully complex platform. We are now looking at optional google-maps or microsoft’s bing map or even our own tile set.

We still have a long list of features to add and improve, but the first travellers are on their way and we are all very curious and excited about what will happen during the first 80 days of the project.

project80Days.com – website

project80Days – project blog

first480

Microsoft ‘Project Natal’

Tuesday, June 2nd, 2009

The name makes me think of pregnancy gymnastics and I am kind of half-way right on this. Could it really be that Microsoft manages to deliver some cool new invention? Full body input interface for gaming and the rest of your life-style. The promotional video obviously looks very very slick, so can they deliver? The tech specs of the sensor unit uses a clever combination of cameras and distance sensors, etc. plus some impressive looking software. Who would have thought that so much future technology will be based on one movie (Minority Report that is…). if this really hits off the shelf, evryone will need a huge living room from now on(and Xbox live I bet…) not always a given here in London(and I havent heard much better from Tokyo.

mProjector – relative and absolute Paths

Wednesday, April 22nd, 2009

I keep finding myself with some trouble whenever I work on a standalone application and finally test it as a mProjector render. There still seem to be some quirks with it’s difference to how your app will run on or as a Flash Player app. As I am using many external files (images,xml, flv, etc.) this makes large parts of my app become ‘buggy’.

Latest example: I need swfs to be loaded from a folder and some flvs, too. I am using mFile.listFiles().
After developing the app and testing it inside flash, everything is working fine. My video recorder records, and plays the video files afterwards and the swf interstitials play.

I render the swf out to mProjector and BAM, no swf is loaded. Now generally there seems to be a difference between Flash Player and mProjector, which is that mProjector likes absolute file paths.
Knowing this from a previous app, I developed a MProjectorPath class, which checks the path and makes it an absolute one. I also have to consider both Mac and PC as I develop for both systems. On top of that, I like to sometimes use backwards relative paths (../). Combining these with everything else is a bit of a heckle, so I spend some time today to write a class taking care of this.

- it checks if the path is a web path or not (http:, etc.)

- it adjusts non-web paths to the OS it’s running on (changin / to \, to cover windows and osx)

- it turns relative into absolute paths

- it takes into account ../../, etc. paths when creating absolute paths

- it doesn’t turn absolute into application relative paths (to come when I really need it)

- I thought I share it

You can download the class (pretty static, AS2, zipped) here.

To use:

 
 
import mProjClasses.MProjectorPath;
 
var tPath:String = MProjectorPath.relativeToMPath(myRelativeFolder);

Have fun and let me know in case I missed something. I tested this one on mac laptop and tower and a windows xp machine and they all worked fine.

actionscript/code formatting for wordpress blogs

Tuesday, April 21st, 2009

Finally found one: wp-syntax, seems to do the job. Love it!

More open: OpenSecrets.org is opening their database

Thursday, April 16th, 2009

opensecrets_opendata

There is something with potential. Watchdog group OpenSecrets has relased API, etc. to access their large amount of data. Here a few samples of what’s to play with:

- Campaign Finance: 195 million records dating to the 1989-1990 election cycle, tracking campaign fundraising and spending by candidates for federal office, as well as political parties and political action committees.

- Lobbying: 3.5 million records on federal lobbyists, their clients, their fees and the issues they reported working on, dating to 1998.

- Personal Finances: Reports from members of Congress and the executive branch that detail their personal assets, liabilities and transactions in 2004 through 2007.

- 527 Organizations: Electronically filed financial records beginning in the 2004 election cycle for the shadowy issue-advocacy groups known as 527s, which can raise unlimited sums of money from corporations, labor unions and individuals.

Given our times, this is just like cake.

via infosthetics

DropBox

Tuesday, April 14th, 2009

main_logo

Free folder synch (sorry, apple). 2GB free. Multi-platform. It’s a bit small for the free account, but one can boost it up to 5GB through recommendations.

It’s very handy, seems to work fairly fast, including a messaging system telling you when files and folders are updated.

It has a few limitations, but people are already working around this and the DropBox guys are constantly working on updates.

E.g if you want to sync folders outside your default DropBox folder there is a solution posted on lifehacker.

Or in short either use console (osx):

Use the ln command, for example:

ln -s /path/to/desired-folder ~/Dropbox/desired-folder

This works with files too:

ln -s /path/to/desired-file ~/Dropbox/desired-file

or this SymbolicLinker (osx) to create a symbolice link, which is what the above command does. The app does it way smoother though by extending your (CTRL+MouseClick) window.

Njoy,

Uncle Unvoid

Red5 – open source media server

Sunday, April 12th, 2009

I finally have to master an application that includes media recording and storing, etc., so I had to look into a flash media server for my flash application to work with. Even though, I sometimes like the Adobe guys, I am still reluctant(by experience), to buy into a whole application set of tools from one company. Reason for this is not only that the branded version of the tools tend to come at a higher price(they get you hooked up with the basics for free and charge double for the extras), using alternative software keeps the big ones at their toes and it’s never wrong to support Open Source.

Which makes it obvious for me to not even dare buying flash media server, but look at a product like Red5.

fetch

Download and install:

I am a mac user, which gave me a hard time pre OSX to get my hands on anything easy and available, whenever I wanted to use new technology in innovative ways. Not anymore, now there is MAMP, if you want to get into PHP/MYSQL(and OSX has Apache pre-installed), which is very plug-and-play. To get the same package for Red5 go here, download an installer of one of the latest ‘final’ versions, so you won’t have to fiddle with command lines but rather just simply follow the install guidelines.

Once you have it installed, the next thing you want to check is starting up Red5 and then checking it’s test page (http://localhost:5080) in your browser. If the install went all fine, the page you tell you so.

You can find some working samples there and it will tell you where to find the source code fro those as well. They are very helpful to reverse engineer or build your own classes for your project.

I hope that quick and easy guide helped you get started with Red5.

For more info and how to get it running within eclipse, check out the following links for more info.

Red5World

Marc Hughes’ Blog

photoshop: creating transparent PNGs using alpha channel transparency

Sunday, April 12th, 2009

How can I turn a black and white(and grey in the middle) opaque picture into a transparent PNG (or produce a transparent mask), where the different shades of grey represent different levels of alpha transparency. Black meaning fully opaque and white fully transparent.

I found myself having to look this one up everytime I use it(seemingly not that often), so as a reminder and to add an entry to the search results if anyone else wants to know how to do this one(I never found a easy detailed tutorial for this), so here it is:

Given the below one is the image that you want to turn into transparent.

picture-2

Open the layers window, if it isn’t open yet. Highlight the layer. Mark it and copy it into the memory (apple+A, apple+C).

transparency_0008_background

Create a new layer.

transparency_0007_layer-1

Create a mask for this layer by clicking the mask tool(rectangle with circle in it) at the bottom of the layer window.

transparency_0006_layer-2

Now switch to or open the channels window. If you made sure, the layer you created the mask for is highlighted, then the channel window should show a mask channel called ‘channelName’ mask.

transparency_0005_layer-3

Paste the image that you copied earlier into the mask layer.

transparency_0004_layer-41

Then invert the mask(apple+I).

transparency_0003_layer-5

Switch back to the layers window. You can now switch off the original layer’s visibility.

transparency_0002_layer-8

Anything you now copy into the masked layer will be masked. In order to have a monochromatic version of the black and white image, just fill the layer with a single color, like blue.

transparency_0001_layer-6

Or black. The reason to do this, is if you mask the original image, edges might appear at the end.

transparency_0000_layer-7

You can now export the above as PNG-24. I found that the mask is not always as dark as the original, so sometimes, I just duplicate the masked layer as 40% alpha, which adds opacity throughout.

That’s it, have fun PNGing the world.