Sunday, September 26, 2010

Fixing the Photoshop clipboard bug (copy and paste)

"For many Photoshop users, there is a horrible bug in Adobe Photoshop that causes the program to stop importing from the clipboard. You’ll be using the software for hours or even days without a problem, and all of a sudden you won’t be able to copy and paste anything into it at all, with your only option to close and re-open Photoshop."

http://microsoft.blognewschannel.com/archives/2007/09/05/how-to-fix-the-photoshop-clipboard/

Wednesday, September 22, 2010

swffit - Smart Flash Resize Script

http://swffit.millermedeiros.com/

"swffit was made to improve accessibility of your flash website.

It was made because each user uses a different screen resolution and resizes the browser window at custom sizes.. when you set the flash size to 100% width and/or height (full bleed) the browser won't generate scrollbars and maybe an important content will be hidden from the user.

In short: It controls how big and how small your Flash movie can be scaled to within a browser window (assuming you're at 100%). Adds necessary scrollbars if someone resizes the window to a size smaller than the minimum.

Tuesday, July 20, 2010

Flash Liquid Layout - Top Left Corner

This code is for top left aligning an object inside a centered fullscreen Flash movie. Took me a while to figure this out, but here's the code:

Stage.align = "T";
Stage.scaleMode = "noScale";

originalStage = Stage.width;

sizeListener = new Object();
sizeListener.onResize = function() {
myObject._x = myObject._x-((Stage.width-originalStage)/2);
originalStage = Stage.width;
};
Stage.addListener(sizeListener);

Friday, July 9, 2010

Cavs owner's letter mocked for Comic Sans font

Dear computer users: If you're ever going to write a fuming letter, think twice before setting the font to the oh-so-mockable Comic Sans.

http://www.cnn.com/2010/TECH/web/07/09/comic.sans.cavs.james/index.html?hpt=C2

Thursday, June 24, 2010

iPad GUI Kit: Teehan+Lax

Teehan+lax are back with a GUI kit for iPad. Yeah, I know I'm 5 months late, but I've only just begun iPad work. As always with their kits, make sure to look closely at detail and use this more as a starting point, as their iPhone kits were nice, but not perfect.

Enjoy!

http://www.teehanlax.com/blog/2010/02/01/ipad-gui-psd/

Monday, June 21, 2010

Type 1 Fonts, Windows 7 and Photoshop

Today my computer was upgraded to Windows 7, and well, now my Type 1 (postscript) fonts don't want to work inside of Photoshop CS3. I know the format is ancient and is slowly going the way of the dodo, and even though I have OpenType and TrueType versions of Helvetica, none organize as nicely as my Type 1 fonts do. In Photoshop, all versions of my Type 1 Helvetica show up in the secondary dropdown, not as separate entries in the full font list, as happens with OpenType and TrueType (for me at least). Plus, some of us have had these fonts for years and don't feel like buying another set.

After much Googling, I discovered that Adobe products will recognize them if you place them in this directory:

c:\Program Files (x86)\Common Files\Adobe\Fonts

If this directory doesn't exist, try creating it. The workaround kinda sucks, but for me it's worth it.

Tuesday, May 18, 2010

Praat: Exporting soundwaves as EPS

http://www.fon.hum.uva.nl/praat/

Okay, so I don't know exactly what this program is for. All I know is that you can import an audio file, and export it's soundwave as EPS. How badass is that?

Tuesday, May 4, 2010

Ascii to Flash ActionScript Key Codes

http://people.uncw.edu/tompkinsj/112/flashactionscript/keycodes.htm
This is more of a bookmark for myself, but if anyone needs to know the complete set of keycodes for keypresses in Flash, check out the above link.

Usage:
keyListener = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(49)) {
trace("CTRL is pressed");
}
Key.addListener(keyListener);

Wednesday, April 14, 2010

Javascript Scroll to Top

I was building a website for a client, all self contained into one Flash file. A good friend pointed out to me that with every link in the footer, while it changed the site as expected, the site stayed in one place. Meaning the content changed, but there was no jump to the top of the page like you'd expect from a normal HTML page. A lot of these sites I build are landing pages for AMOE, meaning I'm basically doing in Flash what is normally done in HTML/Javascript. The main difference is that I don't do Javascript, so building these in Flash and giving an HTML experience (sounds funny, I know) is my goal. Doing this in Flash cuts down on my development time greatly. Annnnnnnnnnd tangent.

The point of this post is, you can scroll to the top of the browser window directly through a Flash call. And that ActionScript is?

import flash.external.ExternalInterface;
ExternalInterface.call("self.scrollTo(0,0)");

That's it. No need to reference a Javascript script in your HTML page. You can also use getURL with the same value, but I found that if you need to run any other scripts at the same time, they may clash. Javascript can only run one at a time if running through the address bar. I found this out while trying to use SWFAddress with getURL. One had to give.

Tuesday, April 13, 2010

Global clearInterval

i = setInterval(function(){},100) + 1
while(i--){
clearInterval(i)
}

See that above? Run that at any time during your Flash to completely clear out any intervals you have running. If you're like me, sometimes you have 2-3 running at a time, and switching between frames and inadvertantly resetting your intervals renders some crazy results. When you call this, don't forget about your intervals that are running onMotionComplete. Make sure you stop your tweens at the same time, or they'll keep running and reset your interval. Damnit if that last piece of advice didn't waste an hour of my time!

I'll let Ted explain how it works:
http://ted.onflash.org/2004/11/fun-with-intervals.php

Tuesday, March 30, 2010

Auto-Formatting your XML for legibility

Generally all of my XML work involves Flash, and trying to figure out how to point to my nodes to grab data. I use AS2, so I still use "myXML.firstChild.childNodes[4].firstChild" notation. I know there are other ways I can call this out by testing for nodeName or by using attributes, but I still prefer this method when I'm not the one writing the XML.

Anyway, tracing your XML in Flash, you'll notice Flash cares less about giving this information back to you in a digestable format. They give it to you like this:

<?xml version='1.0' encoding='utf-8' ?><somenode>someinfo</somenode><somenode><somenode><somenode><somenode></somenode></somenode></somenode></somenode></code></code></em>

Chewing through that can be a pain. I ran across a website that you can plug this into, and it will spit out beautifully formatted XML for your reading enjoyment:
http://www.shell-tools.net/index.php?op=xml%5Fformat

Thursday, January 21, 2010

Opening PWI files in Vista

This isn't a design related post, but it's something that's bothered me for long enough, so I figured I'd post this. If you're one of the unfortunate few that are stuck using Windows Mobile (okay, okay, it has its strengths, but it frustrates the hell out of me), you've undoubtedly created files using the Notes program. The Notes program saves its files as PWI (InkWriter/Note Taker/Pocket Word Document). For the life of me, I couldn't find a program to convert or view these files on my PC. I just copy everything over when I'm upgrading my OS, doing a hard reset, or upgrading my phone. So I've been sitting here with years old PWI files on this computer. One of them had the list of video games I lent my nephew, and I'm determined to get them back.

After a few days of searching, I came across the answer here:

http://social.microsoft.com/Forums/en-US/windowsmobile/thread/6de0c870-da9f-47d0-8425-fde62ff98223/

I've had the right program already installed the entire time. If you open the Notes panel in Outlook, chances are all of your PWI files on your computer are already sitting in there, waiting to be read. I can confirm that I was able to see all of my notes, along with my hand drawn notes as well.