Blogs

Feb 13 2010

New Site Design

Posted by amandar

If you've been to my website before you'll notice that I have recently implemented a new design. In a week and a half I will be starting my new job with Gravitek Labs and to coincide with this new venture I decided to redesign my website. I spent more time designing the site in Photoshop than actually building it out, which is one of the reasons I LOVE Drupal!

There were several aspects of this site that would have been a challenge for me a year ago, that now that I know a lot about Drupal were a breeze. One is the logo. I'm not using the typical Drupal logo where you have logo.png in the theme's root or even on the theme settings page where you upload a logo. I am using my preprocess_page function to determine which logo appears. So when you are on the blog, design, or resume you will see the logo with the mouse. If you are on tattoos you see the logo with the tattoo machine, and if you're on drawing and contact you'll see the logo with a pencil. This was all done in the preprocess with a conditional that checks to see what arg(0) is and from there giving my logo a value that is printed in my page.tpl.php.

Dec 18 2009

The Drupal 7 User Experience

Posted by amandar

The Bad

I'm sure my comments will be really late in the game but I just updated my local Drupal 7 installation to start converting my themes to D7 and what at first was excitement quickly turned into disappointment. At first glance the modal admin UI was interesting, refreshing even, but then doing simple tasks like creating content became a source of frustration because I had no idea where to find it!

The block admin page is a mess and extremely difficult to use, I actually prefer the D6 block admin. I feel this page should not be a modal, I like being able to see what region is where as I'm assigning content to it. Also I am not seeing where to create a new block, I dunno if I am brain dead or something but I cant find it...?? This is really upsetting to me because the D7 team has supposedly been working really hard to improve the UI. The block admin just totally falls short.

Dec 17 2009

Drupal 7 theming basics

Posted by amandar

I am no expert on Drupal theming, but I recently attempted to convert one of my Drupal themes to Drupal 7 and it was pretty stressful at times! I'm gonna try and outline some of my changes here. The theme I am attempting to update is http://www.drupal.org/project/orange/

.info files

.info files have changed. The content variable has been removed for Drupal 7, so you need to declare the region in your .info file or you wont even be allowed to enable the theme. Also because of problems with sub-theming style.css is no longer added by default. You will need to also declare this in your .info file.
Like Drupal 6 if you want custom regions and js files you declare them here as usual.

<?php
regions
[content] = Content
stylesheets
[all][] = css/style.css
?>

page.tpl.php

May 5 2009

Combining functions in AS3

Posted by amandar

A friend of mine recently shared this technique with me, and I thought it was so cool I decided to post it up here.

If you have a lot of buttons in a project and they all have roll over, roll out and click states, your action script is going to be cluttered with functions. For example, this is how I was initially taught to have a single button with an on off and click state:

button_mc.buttonMode = true;
button_mc.mouseChildren = false;
button_mc.addEventListener(MouseEvent.ROLL_OVER, btnOver);
button_mc.addEventListener(MouseEvent.ROLL_OUT, btnOut);
button_mc.addEventListener(MouseEvent.CLICK, btnClick);

function btnOver(e:Event){
e.target.gotoAndStop(2);
}
function btnOut(e:Event){
e.target.gotoAndStop(1);
}
function btnOver(e:Event){
navigateToURL(new URLRequest("http://www.google.com"), "_self");
}

Apr 28 2009

Changing an objects color in AS3

Posted by amandar

There are many reasons to change an objects color in flash, and these days doing everything on the timeline is just unacceptable and improbable for most cases. Luckily changing an objects color is extremely easy with the ColorTransform class.

To start out, create your object as a movie clip (for examples sake we'll keep the object on the stage) and give it an instance name. I have given mine the name square_mc. Start a new layer for your actions and label it as such and open the actions panel. In most cases we will probably want the object to be clickable, so we will set a couple of properties that make is as such.

square_mc.buttonMode = true;
square_mc.mouseChildren = false;