Friday, October 19, 2007

RSS Stronger than Superman, Batman, Spiderman, and The Hulk Combined

Black RSS

There's a small piece of problem but i've successfully added an RSS Feed to my portfolio site designbylaw. And now i'm going to explain what I did in detail for future reference.

Step One: Creating the RSS file

THIS helped me a lot in doing this. Just follow it and you're done.

The RSS file can be in .rss or .xml; I used XML so I can talk to it in flash. The .rss might work in flash too but just in case.

You'll learn that the minimum amount of tags you need for each RSS item is three: title, description, and link. Link tag is supposed to be the permalink address for your RSS entry. Now it would've been fine if that link just directed people to the index page every time; just like what gotoandlearn's RSS Feed did (which i dissected and butchered to make my own Feed.) But I wanted to directly open the specific work that I might be addressing. So...

Step Two: Direct HTTP Linking

The hard part was finding some way to pass variables from the browser via http address to the flash.

I immediately thought of using the '#' with the address [ www.designbylaw.net#print1 ]. And from there I would find some javascript to read that part of the http after the '#'. But then I remembered a certain feature of SWFObject, which was what I was using to embed the flash to the browser. This way would be easier because it would use the javascript that I already have for the flash.

The feature uses FlashVars which let's you pass a variable from the browser to flash. The variable will then be present at the _root timeline where it can be used for anything.

Adding the variable directly from the browser works but I had some trouble reading the variable off the address bar. I was using SWFObject function called getQueryParamValue(). It probably didn't work because I was using AS3.

With a little searching through the internet I found this , which the made the AS call getQueryParamValue() instead of the browser.

Now I can open any of my works through the address bar by adding [ ?skipTo=print1 ] next to my index address. The question mark (?) has something to do with javascript; the [ skipTo ] is the name of my variable; and [ print1 ] is the name of one of my works.

I got that [ print1 ] fortunately through my already implemented actionscript. That is the formatting that I used to search my several thumbnail objects, an internal instance name, if you will.

It's a good thing that I broke down my Actionscript into different sections. I broke it down enough that it would be easy to reuse some functions more than once. I was hoping to use just the function that loads the work for this but it didn't fit, but a little copy & paste and a little augmentation and I got the function that I needed.

Here is the little code that I added:

var theExternal:String = ExternalInterface.call("getQueryParamValue","skipTo");
target2(theExternal);

target2() is a modification of target() a function that I used in my news section to directly open a specific work.

Step Three: THE END GAME

Now I just had to put everything together and put those direct addresses in the RSS Feed.

I also added an RSS button in my flash

And this my the browser: <link rel="alternate" type="application/rss+xml" title="My RSS feed" href="http://www.designbylaw.net/test/law/news.xml"/>

This will put that RSS button direction on the address bar for some browsers.

That's it! Easy! Just remember to have a well modulated actionscript structure...and eat your greens.


More...

1 Comments:

Blogger kaz said...

that's the biggest RSS image i've ever seen... wonderful wonderful.

10/19/2007 4:03 PM  

Post a Comment

<< home ||Close

Saturday, October 13, 2007

International Photography Awards 2007

It was a typical Saturday.

Just looking at the great images at FFFOUND when I came upon the image above. I clicked on it's source and ffffound out that it was an entry for the International Photography Awards. It's part of the series called "Intersection" by Greg White, 3rd place.

The source is actually from a blog that showed all the winners of the contest. I'm not going to do the same (otherwise, I would've just posted the link to blog somewhere). I just wanted to show some of the images that I liked and thought were interesting. It's not all of them, because there's a lot of them and it would take too long to set-up. Which brings me to my other purpose for the post, lightbox. I wanted to implement the lightbox script in this blog, and thought this would be a good enough time to do it.

It would also be great to find out what you people (meaning the special few who read this blog, special special people) think. Maybe put a link to your favorites in the comments section.

Advertising - Food / "Fruits" / Chris Turner / 1st

Advertising - Music / "My Chemical Romance - The Black Parade" / Chris Anthony / 1st

The album is alright, I just like the art direction more.

Advertising - Music / "Musicians" / Markus Klinko & Indrani Pal-Chaudhuri / 2nd

There's actually more to this series, but it's this image of Bowie that I like the most. I think it's his eyes, they're crazy lookin'.

Architecture - Buildings / "Gdnask Shipyard" / Michal Szlaga / 1st

Architecture - Buildings / "The Repertory" / Jeffrey Kroeze / 2nd

It's like from another planet.

Architecture - Buildings / "New Orleans Nightscapes" / Frank Relle / 3rd

It's something about long exposures that makes the image really crispy. It makes night-time images look surreal.

Architecture - Cityscapes / UNTITLED / Alex Hill / 2nd

Are they miniatures? or are they real? Tilt-shift Photography.

Books - Nature / "Africa" / Michael Poliza / 2nd

HUGE.

More...

1 Comments:

Blogger Ding said...

nice photo. i like your mp3 player. that thing is a playa! and yo, u forgot to link me...

10/16/2007 10:16 PM  

Post a Comment

<< home ||Close

Sunday, October 07, 2007

Blue Bath Products

Blue Bathroom Objects

Woke up this morning all blurry-eyed and I noticed this collection of bathroom products. I did not arrange these objects together in any way.

Ah, good ol' product design.


More...

2 Comments:

Blogger kaz said...

There's one outcast/rebel in the group.

10/07/2007 8:14 PM  
Blogger Law said...

daaaamn youuuu Aveeeenooo!!!

10/07/2007 10:41 PM  

Post a Comment

<< home ||Close