Using AS3 and XML to Define a getURL Button

So let’s say you have a Flash site using the very cool and very popular “swfaddress” deep linking technology but you want to define where the links go using an XML file.  This is simpler than it might sound, but beneficial for lots of reasons.

For instance, we are currently working with a client that records the progress of a user’s journey through their web site into an XML file.  This means that as the user chooses to go to “this” page “that” page is no longer available but “this new page” is available.  Almost a “choose your own adventure” type of Flash web site.  So they have their XML file being made as the user clicks through, but the links ON the Flash site need to reflect what the XML file is saying.

So, for example, the user has a choice to click “Page 1,” “Page 2,” or “Page 3.”  They choose “Page 2.”  That needs to remove “Page 3″ from their choices on the next page while keeping the navigation buttons the same.  Enter this code.

Now the XML can say, “button three, you’re going to link to page 3 on this page.”  Then, after the user goes to page 2 it can say, “now you’re going to link to page 5,” or whatever.

Pretty cool idea huh?

Plus… since we’re using the swfaddress deep linking the user will always be able to go “back” and “forward” (along the choices they’ve made) as they’re using the site.  Even more powerful.

Here’s what the XML file looks like.
(based on the Kirupa XML tutorial)

<?xml version=’1.0′ encoding=’UTF-8′ standalone=’yes’?>
<Books>
<Book ISBN=”0553212419″>
<title>Sherlock Holmes: Complete Novels</title>
<author>Sir Arthur Conan Doyle</author>
</Book>
<Book ISBN=”0743273567″>
<title>The Great Gatsby</title>
<author>F. Scott Fitzgerald</author>
</Book>
<Book ISBN=”0684826976″>
<title>Undaunted Courage</title>
<author>Stephen E. Ambrose</author>
</Book>
<Book ISBN=”0743203178″>
<title>Nothing Like It In the World</title>
<author>Stephen E. Ambrose</author>
</Book>

<Navigation>
<PreviousButton></PreviousButton>
<NextButton url=”http://www.yourwebsiteurl/#/frame_10/” name=”name”></NextButton>
</Navigation>
</Books>

Here’s what the actionscript for the button looks like.

// BUTTON
navNext.addEventListener(MouseEvent.CLICK, nextClicked);

function nextClicked(e:MouseEvent):void {

var xmlNextLoader:URLLoader = new URLLoader();
var xmlNextData:XML = new XML();

xmlNextLoader.addEventListener(Event.COMPLETE, LoadNextXML);
xmlNextLoader.load(new URLRequest(”story.xml”));

function LoadNextXML(e:Event):void {
xmlNextData=new XML(e.target.data);
ParseLinks(xmlNextData);
}

function ParseLinks(linkInput:XML):void {
var linkAttributes:XMLList=linkInput.Navigation.NextButton.attribute(”url”);
for each (var urlLink:XML in linkAttributes) {
trace(urlLink);
var request:URLRequest=new URLRequest(urlLink);
try {
navigateToURL(request, ‘_self’);
} catch (e:Error) {
trace(”Error occurred!”);
}
}
}
}

And finally… you can download the source code here.
(it’s done in CS4 / AS3)

It’s Toasted

I like a lot of T.V. Shows.  LOST, The Office, there’s a lot on that’s good.  But as someone in advertising and marketing there is only one show that appeals to my advertising mind… AMC’s Mad Men.

In the pilot episode Madison Avenue advertising man “Don Draper” is working on coming up with an ad campaign for Lucky Strike cigarettes.  It seems, in the show, that the government has suddenly made it so cigarette companies can no longer claim any health benefits.  Not only that, but “new” research is indicating that tobacco is linked to lung cancer.  Well, obviously the cigarette honchos are up in arms about this.  But, our hero, Don Draper pulls one out of thin air when he tells Lucky Strike not to say anything but, “It’s Toasted.”

“Advertising is based on one thing,” Don says. “Happiness… Everyone else’s tobacco is poisonous, but Lucky Strike’s is ‘toasted.’”

This is based on a real campaign ran by Lucky Strike cigarettes.  The campaign, however, was originally ran in 1917, not the early 60’s.  But the moral remains true.  Why even admit, or mention, something bad about your company / product / service when you can simply point out something that makes you different… even if it’s not different at all.  This is what I truly wish the Corn Refiners Association would have done with their recent campaign.

In case you haven’t seen it, the CRA has launched a campaign combating the negative hype that High Fructose Corn Syrup (HFCS) has gotten.  Their approach is to take everything bad everyone has said about HFCS and argue with it.  Their ads show people being confronted by friends about eating products with HFCS in them and then rebutting with statements like, “What’s wrong with it?  It’s made from corn…”  The announcer then says to “get the facts.”

I’m not saying anything bad, or good, about HFCS here.  I certainly wish the CRA and their families and friends a wonderful sticky future.  I will comment on this approach however, as I believe it’s exactly what they should have never done.

There are 2 types of people in the world of HFCS… those who eat it and don’t care, and those who will never eat it (again).  Both camps have one thing in common — there’s nothing you’re going to do to change their minds.

So, what is this advertising campaign going to do if not persuade people that HFCS is okay?  I believe it’s going to simply point out that some people think it’s NOT okay.  Suddenly there are people eating pop-sicles and drinking “red-drink” all over the country who will see these ads and think, “Yeah… I should get the facts.”  The problem is they’re not going to only go to the CRA’s “SweetSurprise.com“… at least most of them won’t.  They will, instead, go to the internet as a whole.  They’ll go to friends, family, books, and every other resource they can find.  And, when you go to all those resources you find the arguments from the other side.  Something the CRA, or any product / service / company, really doesn’t want to happen.

My suggestion?  Simple.  A “Target” style ad that simply shows happy people enjoying things that have HFCS in them.  Name brand things.  Things people can’t live without.  Not “red-drink.”  Then, at the end of it all… one word appears on screen… “Yummy!”  as the announcer says, “Brought to you by High Fructose Corn Syrup.”

Why point out anything bad that’s said about you?  Why not, instead, simply be “toasted?”

Choosing Your First Impressions

I wrote last year about “Current Energy” (a company in the Dallas, TX area) using the iPhone’s release to promote their business.  I pointed out their choice to use the launch as something positive to their company.  Rather than looking at the possible downsides they made the event work for them.  Unfortunately most companies take the “low-road” and focus only on the negative (or possible negatives) of a situation.

When Pei Wei and other popular stores opened near Merrill Lynch on Louisiana Blvd in Albuquerque, NM the staff at Merrill Lynch had a choice.  Allow customers of these new stores to share their parking spaces in an already small lot, or put up signs and employ someone to make sure no one parks in their lot, thus leaving the spaces for the other stores in even shorter supply.  They chose the second option.

I understand that parking spaces are a premium, and the fear that your lot is going to be full of people who aren’t your customers is a valid one for certain, but why not try and endear people to you rather than run them off?  Is Merrill Lynch really that busy with people coming in that they need twice the space as other restaurants?

So, since I’m not one to point out a bad idea without offering at least one good idea, here are a two ideas they could do to remedy their situation besides allowing people to park there.

  1. Offer people a free consultation if they bring in a Pei Wei receipt (or other store in the center).
  2. Instead of using him to run people off, use the employ to hand out free consultation coupons to people who park in the lot.

Web 2.0 - Make Sure it Works

Web 2.0 is more than a look. It’s more than clean icons with a glass glow and bevel on them. It’s more than muted colors and easy to read text. It’s more than design. Web 2.0 is the way the web works… not just how it looks.

Web 1.0 means I get 100+ emails a day telling me about pills and sites that I have no interest in. It means you go on a website and see banners ads for things you will never click on. Web 2.0 — on the other hand — means that you’re going to see things you are interested in. Get email alerts about TV shows you follow. Or see banner ads on sites that you will click on.

Much like the Netflix and Amazon systems of rating things you’ve watched and bought the more you use Web 2.0 the better it will know you. And the better it gets the funner it will be to use. Maybe you don’t click on banners… soon you won’t see them. The marketing should change to fit your personal tastes. Your internet will become different than my internet.

That’s good for more than just us though. Businesses that use the internet are only going to benefit. Think of the power of your advertising dollar when you know that your advertisements and emails are only going to be seen by people who are most likely going to use your service or buy your product anyway. It will be the difference between a farmer who casts out thousands of seeds in hopes that one will take root and grow to
a Japanese bonsai tree farmer who cultivates the trees he has for 100s of years… making them only stronger and more valuable.

And this isn’t that far away. In fact, you’ve probably already experienced it to some degree. Web 2.0 is here now, and its just getting better. Of course, its still got some bugs. For instance… I got an email from Amazon.com the other day alerting me that I might like a new book based on another book I had bought. Well, they were right, I might. So I clicked on the link only to find they were sold out. I found that quite funny actually. But, bugs included, Web 2.0 is here and already heading quickly to Web 3.0… which will also be much more than simply a design style.

Coffee by Roaster

I was brewing some of my favorite coffee this morning that had came from my favorite coffeehouse, the Mudhouse in Springfield, MO, when I had the thought… “This coffee was actually IN Springfield… on Patton Alley to be exact… and most likely roasted by Kyle Jeffries.” It gave me a warm sort of feeling to know that… but I didn’t stop there.

I then wondered what the day was like when it was roasted, what the weather was like, what Kyle (if it was in fact he who had roasted it) was looking forward to that day, what he was wearing even.

How great would it be to have that information on the coffee package?

“Roasted May 15th, 2008 by Kyle Jeffries in Springfield, MO Rainy and cool outside. Kyle was about to go see a movie.”

It may seem irrelevant to some, but the fact is it would add an emotional element to the coffee that others don’t have. People might stop buying just a certain kind of “roast” (such as espresso or Sumatra) and start buying coffee based on WHO roasted it… or what the weather was like that day… or any number of other factors. It would give people more of a sense of “connectedness” to the coffee that they didn’t have before. You could even have your sells based around such categories.

“I love coffee roasted during cold weather.”

“Mmm… me too!”

Thoughts on the New Starbucks Logo

What do you think of the new Starbucks logo? If you drink coffee at all you probably have an opinion about it. It’s gone so far as to have some groups (such as the Christian group called “The Resistance”) to boycott Starbucks because of their new, “more revealing” logo. And if you don’t know what I’m talking about, well, that’s okay. I know everyone didn’t even know what Starbucks’ current logo looks liked until they loaded this post. But the fact is Starbucks‘ logo is one of the most recognized logos in popular culture right now. It’s iconic mermaid, green color, and round shape carry a lot of meaning to a whole lot of people. So why, you might wonder, would they change from what they currently have, to this…

Well, first off, as Buzzwatch reports, it’s not a permanent change. It’s all part of a marketing plan. But that doesn’t answer the question… why would they change it at all? Isn’t it dangerous to change your brand identity? Especially on the “whim” of a marketing campaign? I doubt McDonald’s would ever change their golden arch “M” to a brown serif-font M with grainy edges. While it’s true that it’s not a good idea for 99.9% of companies in 99.9% of situations, I believe this was, and is, a great move by Starbucks corporate.

You may or may not know about Starbucks having to close down 100 under performing stores in the US. You may or may not also know of the “buzz” and “rumors” that Starbucks is slipping in quality and sales on a whole. While I won’t voice my own opinion on the quality of Starbucks‘ coffee (suffice it to say I go there a few times a week on average) I will say that McDonald’s and even Dunkin Donuts are giving Starbucks a run for their money. It’s because of all this, rumors and truth, that I think the move to change their logo, even for a short time, is a good one.

Even back in 1999 Starbucks had the pop-culture reputation of being a corporate giant. Something that their clean, crisp, sanitized logo only helped promote. Whether you like it or not you have to agree that this “new logo” changes your sensory perception of the company. They have essentially (and successfully I believe) taken their “monster corporation” status back down to a neighborhood coffee shop. They’ve put the focus not only back on the coffee and the roasting of the coffee, but on you as a customer. Embracing you again with warmth and comfort.

We’ll see how long the change lasts, and what all becomes of it. I doubt any group’s boycotts will make much of a dent in their sales. And I don’t think even those who just don’t like it because of “change” will stop buying their coffee. But I do think that they will gather those back who were beginning to be on the “fringe”. Those who were starting to slowly seep away are going to have a reinforcement of the Starbucks brand in their minds… all from a new brand image that isn’t new.

Blocking Channels

The TV Boss Campaign from the Ad CouncilI’m sure, if you watch cable or satellite TV at all, you’ve seen one of the public service announcements informing parents that it’s possible for them to block certain channels. The commercials are really well done and quite funny, but they’re also missing a huge segment of the population.

Obviously parents who don’t want their children to be able to watch Tony “whack” Guido, or sultry Sandra do whatever she does in Seattle, are the biggest part of the people that would use this service… and these ads focus perfectly in on them. But why only focus on people who want to block “bad” shows? What about people who may not have children and yet could use this feature to block out annoying shopping channels, PPV channels, or other things that you simply hate having to “scroll through” as you’re looking for what’s on?

The Ad Council has come up with a fun way to show what is possible for parents… but they’re missing out on using the same tool to target a wider market. Would it damage the message for parents? I don’t think it would. Would it increase the importance of the message for non-parents? Possibly.

Sometimes we get so focused in on our target market we miss out on all the potential that lay just outside it.

Switch and Save

geico_gecko.jpgSeems like every insurance company out there is advertising that if you switch to them they’ll save you money. It was a good enough idea when insurance company #1 did it… but now companies 2, 3, 4 and on are in on the game. All of them use the same “formula” for their ads too. Show examples of people who switched to them from the “other guy” and how much money they saved by doing so. But I was wondering, if I were an insurance company, why would I want to say exactly what the all the others are saying?

Why not take the chance to say something different? Why not advertise that while you may not save people money, you will always give them more for their money?

I don’t doubt that many of these companies can save many people money by switching to them. But often people will choose the company who, while they may cost more, gives you more. Apple and the iPhone are a great example of this. They didn’t try to sell people on the iPhone because it would save them money… they just offered a superior product and charged accordingly. What would the iPhone’s marketing have been like had they tried to jump on the same advertising campaigns that had worked for other phone companies?

Routed Through the System

We recently moved many of our websites to Network Solutions. The move went great, but suddenly we couldn’t FTP anymore, which, being a web design company, is a problem. I had some friends in New Jersey and Texas try uploading via FTP to our new servers, and neither of them had any problems doing so. We contacted customer support at Network Solutions and they were very helpful indeed. They had us try a number of things both on our computers and with our router and modem. We determined that it wasn’t Network Solutions fault, and I was satisfied with that fact, however, we still couldn’t upload to our FTP servers.

Frustrated we went to our local coffee house to relax. While we were there, and just out of curiosity, I tried uploading on their free WiFi network. It worked! I could upload! So that meant it had something to do with our network at the office.

When I got back I tried hooking up directly to the modem, bypassing the router. That worked. I could upload then as well. So I now knew it was our router.

We were using a Netgear WPN824 router, so I decided I’d contact Netgear. That was easier said than done. After a few hours of searching I found a help ticket system on their website. So I opened a ticket with a technician telling them everything I’d tried and what the problem was. I waited a day, and finally got a response that began with a long paragraph telling me how “my problem was important to them,” which was followed by copied and pasted troubleshooting steps from the user manual… all of which were things I had just listed I’d tried. After replying 3 times, and talking to 3 different techs I gave up… sort of…

It seems their “help ticket” system included a handy feature that caused the ticket to expire on its own after 3 days if you didn’t respond again. Handy for the Netgear people, but not for me… their customer. This was obviously an instance of the “Thanks for calling, now go away” syndrome that Seth Godin has talked about.

Luckily during this time I also happened to visit another wireless site that I knew had the exact same router, a Netgear WPN824, and again I couldn’t upload. So now, knowing it was the router, we went out and bought a Linksys brand router and everything has worked great since.

The point of this story? It’s just as important to keep a customer as it is to get a customer. Had any one of the Netgear people even suggested that their router itself might be at fault I would probably have simply purchased another Netgear router. But because of their verbal instance “my problem was important” followed by their demonstration that it was indeed not at all important, their loss was Linksys’ gain.

How is that you can keep the customers you’ve worked so hard to get in the first place? Sometimes it may be as easy as admitting possible fault, or it may be showing you care instead of only saying you care.

Gift Cards are Good?

itunes_giftcard.jpgSeth Godin has this post about gift cards being worse than giving cash for a number of reasons and, overall, I agree with him, but what about when a gift card really is the best gift for someone?

For me, an iTunes, Barnes and Noble or Starbucks gift card is going to be anything but wasted. But the only people (until now) that might have known that are people that really know me. So sure, giving me a gift card to Wal-Mart (no link on purpose) is as good as throwing money away because I won’t use it. But giving me a card to something I frequent shows me that you’re not only thinking of me, but that you know me too.

It’s the reason we get to know our clients and their business before we start a design. Often this doesn’t have to be more than a phone call. Hearing their voice, what they’re excited about, getting to know what they expect (in more ways than colors and fonts) is very important in being able to give people what they want… and need. Otherwise no matter our intentions their website might not be usable and become as wasted as so many unused gift cards.