Last Instinct

Author Archive

Jeep: Kom närmare naturen – Portfolio at Basilicon

by Klas Lundberg on Aug.16, 2010, under Portfolio

Jeep: Kom tættere på naturen by Basilicon

For the launch of the new Jeep Cherokee in 2008, I made a frontflash and a spot for the campaign at Basilicon.

The main design and animation was made by me, but I got some help from Anders Ekström, who really wanted the leopard to jump in from the right. Since we only had a leopard laying down, we had to fabricate the jumping leopard.

Jeep: Kom närmare naturen by Basilicon

Leave a Comment :, , , , more...

Thule Video Player – Portfolio at Basilicon

by Klas Lundberg on Aug.13, 2010, under Portfolio

At Basilicon, we were recently proud to release a dedicated video player for Thule globally. I have over some years developed a unique video technique for Basilicon which is rather cutting edge. It measures and estimates your bandwidth capabilities in 0.3 seconds and adapts the video to this.

Well, this can be done with any sophisticated streaming server, but this technique does it without the need of a streaming server, which reduces the cost and maintenance significantly. It’s done using Adobe Flash and it’s currently not possible to do in HTML5. It uses H.264 codec, which works like a charm in the latest Flash Player. Even on my old crappy laptop. It also features automatic quality control to optimize performance during playback.

Everything from video coding to player design and setting up the server was done by me. It was a bit nervous to estimate what performance we needed from the server and find a hosting partner that could deliver this for a reasonable price. I chose a cloud VPS for this, which could be upgraded with better performance when necessary. We have not needed to upgrade it yet and I am really satisfied with the performance and flexibility of our hosting. After some fine tuning it now serves 10000+ videos every day perfectly. That number will probably increase a lot later on, but the server has much more to give.

Leave a Comment :, , , , , more...

Mercedes-Benz: Mintjänste-Bil – Portfolio at Basilicon

by Klas Lundberg on Aug.13, 2010, under Portfolio

This was a campaign site for Mercedes-Benz company cars I made at Basilicon in 2009. It was an flash application with a funny approach to comparing leasing costs for cars. Everything was measured in how many caffe lattes you saved each month.

It was actually based on a similar campaign made by another web agency earlier. I got the assignment to redesign it so it matched Mercedes-Benz new corporate identity. But the project ended up being a lot bigger than that, since the wanted to update most car models and add pages with environmental information on so on. I also had to rewrite most of the code, since it was such bad design and so buggy from the start. So at the end I had rebuilt the whole application.

Leave a Comment :, , , , more...

Jeep & Kolmården – Portfolio at Basilicon

by Klas Lundberg on Aug.13, 2010, under Portfolio

This was my first big campaign when I started working at Basilicon in 2007. Jeep had a collaboration together with the wildlife park Kolmården where Jeep sponsored a terrain driving track. We made the campaign site and also the booking system, which my boss Anders Ekström put lots of energy into.

I directed the art and programmed most of the flash interaction and the implementation in HTML. I worked together with David Andersson in designing all the sub sections. The main design was formed as an old map with a little Jeep as mouse pointer. The little car was actually the hardest part to get to work correctly.

The technical solution for the window was really cool, since most of the campaigns back then used rather annoying popup-windows. This was made as a layer with transparency and shadows in flash instead. This wasn’t really possible before that point, since Safari on Mac had terrible and very buggy support for this. Fortunately, Firefox had just gotten better support for it. The web support have really developed a lot on Mac in the three years since then!

Leave a Comment :, , , , , , more...

Duni Salad Bowl – Portfolio at Basilicon

by Klas Lundberg on Aug.13, 2010, under Portfolio

This was a project I made together with Danny Gomez in 2008 at Basilicon. Duni wanted an interactive product presentation for their customizable transparent plastic salad bowl. I made the design, the text & logo effects and interaction flow, while Danny made the 3D-model and animation. I think we got a realistic and really interesting presentation of the product.

Leave a Comment :, , , , more...

WebDoor powered by Crawford – Portfolio at Basilicon

by Klas Lundberg on Aug.13, 2010, under Portfolio

This was our first project for Crawford at Basilicon in 2008. Something that turned out to be a long and extensive partnership still going strong. They wanted a temporary site and an updated logotype for their WebDoor brand before they put up their own web shop.

I didn’t have much more than a low resolution PDF to work with (a rather common problem in web development), but it turned out great anyway. I made the full design and HTML and I had to do a full remake of the logo, since it only existed in an old low resolution version in the PDF. This, in no time at all, but that was naturally no problem.

The website was replaced by their own web shop later on, which you can visit at webdoor.com


Leave a Comment :, , , , more...

linnn clothing updated

by Klas Lundberg on Aug.03, 2010, under CMS, Portfolio

I’ve updated the website of my friend Linn Nydrén. New features include online shopping through PayPal and VIP mailinglist. She has just released her new Holiday collection and you can even order Customized Clothing. So visit the l i n n n clothing web shop and make an order!

Now to the tech talk: I added form support, so that she could add forms from PayPal on her own. I also updated the js-libraries to include SWFAdress for deep linking with Flash and UFO for unobtrusive Flash embedding. SWFAdress is really tricky to get working. I think video tutorials take too much time, so someone should really make a great non-video tutorial on how to use it with Flash properly. But once it works, it does an excellent job.

I chose UFO instead to the newer SWFObject 2.0, since the syntax is cleaner and more consistent. Also, I had more trouble with SWFObject than UFO, especially with the static publishing method. I was also looking for an old thing called SWFSize, but I couldn’t find it. Then I realized that I didn’t need it, since the size constraint I wanted to achieve can be accomplished using min-width in CSS3.

1 Comment :, , , , , , , more...

Animated sparkling sunset in Skanör

by Klas Lundberg on Jul.27, 2010, under Graphics and effects, Portfolio

I got a bit inspired by my previous Sparkling sunset made with Photoshop and wanted to make a proof of concept for Adobe Flash. So I animated the sunset. This is what you can do with Flash without using much code. I have just used a few lines to randomize starting points. All other graphic effects are built into Flash and needs no coding.

Wouldn’t it be cool if sunsets like these existed?


Leave a Comment :, , , more...

Sparkling Sunset in Skanör

by Klas Lundberg on Jun.14, 2010, under Portfolio

I found some amazing colorful wallpapers in a theme pack for Windows 7 called Surreal Territory by Chuck Anderson of NoPattern. He has really done a lot of great colorful designs! I got a bit inspired to make something similar. So I took one of my photos from Skanör last weekend and made a truly colorful sparkling sunset! Feel free to download it as a wallpaper or something. =)

3 Comments :, , , , more...

Mailing function for PHP with UTF-8, HTML and attachments

by Klas Lundberg on Jun.13, 2010, under Check this out

I found a function a couple a years ago which I’ve been using for mailing in my projects. The function was rather basic from the start and then I’ve added functionality as needed. Nowadays it is changed into only having UTF8 support (since I almost always use UTF8 encoding) and also support for HTML. the HTML encoding is detected automatically if the <html> tag is present in the text. You can attach images and files by adding them into an array. Feel free to use it however you like.

To get UTF-8 to work correctly in your PHP pages, see my post about Setting up PHP for UTF8 and XHTML compatibility.

The nice mailman image is from The Invisible Agent.

////////////////////////////////////////////
// Function: send_mail()
// UTF-8 Mail sending with html and attachments
////////////////////////////////////////////
 
/** Sends a mail.
 * 
 * @code {
	# To Email Address
	$to_address = "to@address.com";
 
	# From Email Address
	$from_address = "from@address.com";
 
	# From Name
	$from_name = "Send Mail";
 
	# Message Subject
	$email_subject = "This is a test mail with some attachments";
 
	# Use relative paths to the attachments
	$attachments = Array(
	  Array("file"=>"../../test.doc", "content_type"=>"application/msword"), 
	  Array("file"=>"../../123.pdf", "content_type"=>"application/pdf")
	);
 
	# Message Body
	$email_body = "<html><head></head><body>This is a message with <b>".count($attachments)."</b> attachments and maybe some <i>HTML</i>!</body></html>";
 
	send_mail($to_address, $from_address, $from_name, $email_subject, $email_body, $attachments);
 } 
 */
function send_mail($to_address, $from_address, $from_name, $email_subject, $email_body, $attachments=false)
{
  $eol="\r\n";
  $mime_boundary = md5(time());
  $headers = '';
  $msg = '';
  $html = (mb_strpos($email_body, "<html>") !== false);
 
  $mail_site = "send_mail@" .$_SERVER['SERVER_NAME'];
 
  # Common Headers
  $headers .= 'Sender: ' . $mail_site . $eol;
  $headers .= 'From: ' . mb_encode_mimeheader($from_name) . " <" . $mail_site . ">" . $eol;
  $headers .= 'Reply-To: ' . mb_encode_mimeheader($from_name) . " <$from_address>" . $eol;
  $headers .= 'Return-Path: ' . mb_encode_mimeheader($from_name) . " <$from_address>" . $eol;    // these two to set reply address
  $headers .= "Message-ID: <".time().$mime_boundary."@".$_SERVER['SERVER_NAME'].">".$eol;
  $headers .= "X-Mailer: PHP v" . phpversion() . $eol;          // These two to help avoid spam-filters
 
  # Boundry for marking the split & Multitype Headers
  $headers .= 'MIME-Version: 1.0' . $eol;
 
  if ($attachments !== false) {
	$headers .= "Content-Type: multipart/mixed; boundary=\"1$mime_boundary\"" . $eol;
	$msg .= "--1".$mime_boundary.$eol;
	if($html) {
		$msg .= "Content-Type: multipart/alternative; boundary=\"2$mime_boundary\"" . $eol.$eol;
	}
  }	else {
	if($html) {
		$headers .= "Content-Type: multipart/alternative; boundary=\"2$mime_boundary\"" . $eol;
	}
  }
 
  # Setup for text OR html
  
  # Text Version
  if($html) {
	$msg .= "--2".$mime_boundary.$eol;
	$msg .= "Content-Type: text/plain; charset=UTF-8".$eol;
	$msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
  } else {
	$headers .= "Content-Type: text/plain; charset=UTF-8".$eol;
	$headers .= "Content-Transfer-Encoding: 8bit";
  }
  $msg .= strip_tags(str_replace("<br>", $eol, str_replace("<br />", $eol, $email_body))).$eol.$eol;
 
  if($html) {
	  # HTML Version
	  $msg .= "--2".$mime_boundary.$eol;
	  $msg .= "Content-Type: text/html; charset=UTF-8".$eol;
	  $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
	  $msg .= $email_body.$eol.$eol;
 
	  # Finished
	  $msg .= "--2".$mime_boundary."--".$eol.$eol;  // finish with two eol's for better security. see Injection.
  }
 
  if ($attachments !== false) {
 
   for($i=0; $i < count($attachments); $i++) {
	 if (is_file($attachments[$i]["file"])) {  
	   # File for Attachment
	   $file_name = substr($attachments[$i]["file"], (strrpos($attachments[$i]["file"], "/")+1));
 
	   $handle=fopen($attachments[$i]["file"], 'rb');
	   $f_contents=fread($handle, filesize($attachments[$i]["file"]));
	   $f_contents=chunk_split(base64_encode($f_contents));    //Encode The Data For Transition using base64_encode();
	   fclose($handle);
 
	   # Attachment
	   $msg .= "--1".$mime_boundary.$eol;
	   $msg .= "Content-Type: ".$attachments[$i]["content_type"]."; name=\"".$file_name."\"".$eol;
	   $msg .= "Content-Transfer-Encoding: base64".$eol;
	   $msg .= "Content-Disposition: attachment; filename=\"".$file_name."\"".$eol.$eol; // !! This line needs TWO end of lines !! IMPORTANT !!
	   $msg .= $f_contents.$eol.$eol;
 
	 }
   }
   $msg .= "--1".$mime_boundary."--".$eol.$eol;  // finish with two eol's for better security. see Injection.
  }
 
  # SEND THE EMAIL
  ini_set('sendmail_from',$from_address);  // the INI lines are to force the From Address to be used !
  mail($to_address, mb_encode_mimeheader($email_subject), $msg, $headers);
  ini_restore('sendmail_from');
}
Leave a Comment :, more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...