Just Another Magic Monday Daryl Ducharme Just Another Magic Monday Daryl Ducharme

Magic By Gif

amazing-optical-illusion.gif

Just a quick one for this JAMM post, since I wanted to do something a little different. While some might use video to show off magic, others like to take those videos and convert them to an animated gifs.

Magic, really often uses illusion (which can be easier in a 2D format such as animated gifs

Actually, people will turn any video highlight into an animated gif.

 

If you have any Magical GIF files you have seen, I'd love to check them out here. Thanks.

Read More
Sunday Funnies Daryl Ducharme Sunday Funnies Daryl Ducharme

Its funny 'cause its true

So I have been an avid Adobe user for quites some time now. I've been using their tools for many years and, even though I'm not much of an artist, I've been known to use Photoshop from time to time. So when I saw someone link a video that said "Fotoshop by Adobé" I had to check it out. Even if it was bad, being an Adobe nerd I might get a chuckle or two.

fotoshopbeautyregimen.jpg

So I have been an avid Adobe user for quites some time now. I've been using their tools for many years and, even though I'm not much of an artist, I've been known to use Photoshop from time to time. So when I saw someone link a video that said "Fotoshop by Adobé" I had to check it out. Even if it was bad, being an Adobe nerd I might get a chuckle or two. Turns out the video is quite funny. It seems to parody every personal beauty advertisement I can ever remember seeing. Everything from eyelashes to cheesey animations explaining how it smooths away wrinkles. And yes, Fotoshop by Adobé can seemingly do it all.

[youtube http://www.youtube.com/watch?v=CeZyiOW9-uU?wmode=transparent&w=560&h=315]

In all seriousness what's most funny about this video is that it is true. Photoshop by Adobe does skew our idea of what natural, normal, sexy and beautiful is. Since it takes a computer program, it turns out these images are neither natural nor normal. However, breaking through that psychological barrier of created reality might turn out to be a real tough nut to crack.

And if you would like to see the behind the scenes video, I found that too. [vimeo 34793617 w=400 h=225]

BTS Fotoshop from Jesse Rosten on Vimeo.

As a bit of attribution, more information about this video can be found at Jesse Rosten's website.

Read More
Flash Friday Daryl Ducharme Flash Friday Daryl Ducharme

Setting up Resource Bundles

In last week's Flash Friday post I wrote about using resource bundles to handle embedded fonts. I also left out any instructions about how to set up your project to use resource bundles, instead telling the reader to search the interwebs. I also said I would provide one of my own instructions so here it is.

rollsofcoins.jpg

In last week's Flash Friday post I wrote about using resource bundles to handle embedded fonts. I also left out any instructions about how to set up your project to use resource bundles, instead telling the reader to search the interwebs. I also said I would provide one of my own instructions so here it is.

Project Setup

Your project needs to be able to find your resource bundles so they need to live in your source path. You could place the bundles in the same folder as your source code, but I find that feels a little disorganized. Instead create a folder for your resource bundles and add it to your source path.

In other tutorials they talk about using resource bundles for localization. If that is the case you can add the files as follows. I'll assume you are using the en_US locale, otherwise replace all instances of en_US with the locale you are using.

  1. create folder path in your project of: localeen_US
  2. add the source folder locale{locale}
  3. add the following to your compiler arguments: -locale=en_US

Now you can place your resource bundles in the localeen_US folder.

Property Files

Resource bundles are sometimes referred to as property files because you create them in files with a .properties extenstion. The part before the extension is the bundle name, and you would use that to get the information you wanted. For example, you you had a bundle named fonts you would create a file called fonts.properties. If you were paying attention to my previous article you probably saw me use this same bundle name.

Inside the property file

The property file is fairly simple. It is just a key/value pair separated by an equal sign(=). A simple resource bundle that stores text strings might be called text.properties and look like the following.

# text.properties

hello=Hello World!
goodbye=Good-bye cruel world!

You can look back at my font embedding article to see how I embedded fonts. You can use the same method to embed anything that you can embed using the Embed metatag.

Using the properties in the file

The first thing you need to do is add the Resource Bundle metatag somewhere in your project. You only need to use it once per project for every bundle you are going to use. However, once you do this it gets compiled into the project, even if you don't use the resources. So I would recommend using it in the class(es) that use(s) the bundle.

	[ResourceBundle("fonts")]
	public class MyFontsBundleUsingClass {
		...

Then to use the resources you just need to get an instance of the ResourceManager use one of its functions to get the resource. Here is an example for grabbing a String from my text.properties file I created earlier.

	var resources:IResourceManager = ResourceManager.getInstance();
	var hello:String = resources.getString("text", "hello");
	var goodbye:String = resources.getString("text", "goodbye");
    Of course you can get more than just strings from a property file. Just choose from the following list of functions in the IResourceManager interface.

  • getString
  • getBoolean
  • getInt
  • getUint
  • getNumber
  • getStringArray
  • getClass
  • getObject

And that is my basic primer on using ResourceBundles in actionscript projects. In the grand tradition of this line of posts I am leaving out many important bits of information. Loading resource bundles at runtime is one of them. I'll leave that as a web search exercise for the reader until I write an article on that in the future. If there are other bits of information you would like clarity on let me know in the comments.

Read More
Wednesday Warrior Daryl Ducharme Wednesday Warrior Daryl Ducharme

2012 - The Year of the Warrior?

Daryl holding the Mens Group 101 DVDAt the eginning of each year, people make resolutions of how they are going to change. I am not different. This year I have already written about one of my resolutions in the new year. This year another of my resolutions has to do with my Men's Studies. Recently Men's Group 101, a partnership between Tripp Lanier(The New Man Podcast) and Jayson Gaydiss, had a New Year sale on their program. The sale seemed good and I was in a resolution mode so I purchased it.

mensgroupcdrom.jpg

Daryl holding the Mens Group 101 DVDAt the eginning of each year, people make resolutions of how they are going to change. I am not different. This year I have already written about one of my resolutions in the new year. This year another of my resolutions has to do with my Men's Studies. Recently Men's Group 101, a partnership between Tripp Lanier(The New Man Podcast) and Jayson Gaydiss, had a New Year sale on their program. The sale seemed good and I was in a resolution mode so I purchased it.

What does this mean!

OMG! Does this mean I'm going to start a men's group in 2012? Perhaps, I don't know. However, at the very least, I hope to be a part of one in 2012. You are probably thinking, "That sounds great Daryl, but why would you want to be part of a mens group?"

For me a mens group is yet another way for me to connect with my sacred masculine. Having grown up in an all female household I've felt disconnected for a long time. Only recently have I begun to connect with my personal maleness. Now I feel it is time to connect with other men with a desire to connect with the sacred masculine.

Have you ever wished you had a circle of Men who you met with regularly, who "had your back" and were committed to your greatness as a man?

The quote above is from an email I got from Men's Group 101 that I think sums it up the best. To have a group of guys who have your back when you need it, which includes calling you on your own bullshit, sounds like a way to empower mens towards extra-ordinary lives.

I realize this post doesn't say much about what exactly will happen. What I'm saying is, I'm open to something happening and I'm taking steps towards it - starting with the purchase of the Men's Group 101 program. I'm not sure where it will take me but I'll share with you along the way in future Wednesday Warrior posts.

Have you ever been interested in joining a men's group? Have you ever been a part of men's group? Have you known someone else who has? Please share your stories in the comments below. Also, if you are in the Seattle area and you are reading this, write a comment or hit up my contact page.

Read More
Just Another Magic Monday Daryl Ducharme Just Another Magic Monday Daryl Ducharme

Magic Monday - Phone Cam Magic

One of the people who was parto of EMC in 2010 and again in 2011, probably because he is one of the people behind it, is Marco Tempest. The thing I liked in 2010 and 2011 from Marco is his use of technology. He is updating old tricks with the new technology and new media. He is creating all sorts of magic that may not have ever been seen before.

emc2010-300x300.jpg

Recently, I finally broke out my EMC2011 DVD as I begin my resolution in 2012 to get back into magic. Because I was less involved in magic last year I didn't watch much of the conference live or even semi live. So far I've watched the first two discs and I've seen and heard some very inspiring stuff. From Rudy Coby's talk How To Be The Coolest Magician On Earth to Jonathan Bayme's Magic 2.0, I have been inspired by what is possible if you just keep moving forward with you goal in mind. One of the people who was parto of EMC in 2010 and again in 2011, probably because he is one of the people behind it, is Marco Tempest. The thing I liked in 2010 and 2011 from Marco is his use of technology. He is updating old tricks with the new technology and new media. He is creating all sorts of magic that may not have ever been seen before.

One of the things that he experiemented with was youtube and the perspective of a phone camera. These are great bits that take a little bit of the old and rejuvenate it with the new. Take it away Marco... [youtube http://www.youtube.com/watch?v=nvbQQnvxXDk?wmode=transparent&w=420&h=315] That was a fun little video (pun completely intended) to start off the series. In his eighth video entitled "Proximity", he shows us a little more of the magic behind the perspective of a phone cam. What I like about this video is that it almost feels like he is throwing away some of the magic that he is showing. [youtube http://www.youtube.com/watch?v=qWCJ4CkR_qM?wmode=transparent&w=420&h=315]

As always, I'd love to hear what you think of these bits of magic. Did you like them? Did they wow you? Did they inspire you? Let me know in the comments. With my forthcoming experiment of JAMM Live, I'm wondering how much actual magic performance I should put into it.

Read More
Sunday Funnies Daryl Ducharme Sunday Funnies Daryl Ducharme

Mock GOP Cyber Debate

As we enter the 2012 election year, we can already see things heating up on the political front. What does that mean fothe rest of us? Lots of great humor will be coming out over the next year that will have us LOLing and ROFLing.

As we enter the 2012 election year, we can already see things heating up on the political front. What does that mean fothe rest of us? Lots of great humor will be coming out over the next year that will have us LOLing and ROFLing. In the tradition of election year politcal humor, Funny or Die along with Yahoo have put together a Mock Cyber debate among the Republican contenders. All the candidates are played by some well named comedians or former boxer turned reality star.

I'll be the first to admit that this humor is heavy handed and a bit childish but it is also quite funny. This is a long-ish video but don't start watching then quit once you get the gist. The jokes get better as the "debate" progresses. Plus, if you stop watching you'll miss the cherry on top ending - Obama's response.

I'm somewhat political by nature, in that I take politics fairly seriously. However, it is just as important to laugh every once in a while as it is to take the actual politics seriously. Enjoy, and let me know what you think in the comments.

Read More
Flash Friday Daryl Ducharme Flash Friday Daryl Ducharme

Resource Bundles and Fonts

If you've been working with Flash for a while, especially FlashBuilder, you've probably heard of resource bundles. If you are like me you heard they had something to do with localization. Then you quickly forgot about them. The truth is they aren't only for localization. In fact, they are a really good way to centralize and manage resources in actionscript project. They also happen to work really well for localization. So if they do more than just localization, what are resource bundles.

font_paper.jpg

If you've been working with Flash for a while, especially FlashBuilder, you've probably heard of resource bundles. If you are like me you heard they had something to do with localization. Then you quickly forgot about them. The truth is they aren't only for localization. In fact, they are a really good way to centralize and manage resources in actionscript project. They also happen to work really well for localization. So if they do more than just localization, what are resource bundles.

What are Resource Bundles

I hate to state the obvious, but resource bundles are bundles of...wait for it...resources! So with that the next question is, "What is a resource?"

    A resource could be a...

  • ...String
  • ...Image
  • ...Config Value
  • ...Font

Why would you want to use them?

Okay, now you know what resources are. You've managed these resources in other ways. Why would you want to use resource bundles over the way you already do?

    Here are a few good reasons

  • 2 words, cleaner code
  • easier localization
  • change text, configs, etc. in one spot

How to setup

Before we get into using resource bundles with fonts, it is important to know how to set them up. Also you might want to know how to use them with the other, simpler types of resources. There are many great articles already available online if you want to search. I plan to write a "how to setup resource bundles" post next week so check back then.

I hate fonts (but I understand they make stuff look good)

I have always dreaded working with embedded fonts on a flash project. Even though I've done it many times, and should know how, each project has brought its own wrinkle that has caused grief for me. Embedding fonts via resource bundles gives you more control over the specifics of the font. Also, since it is built into development with the Flex SDK, you can more readily change them for your needs right in the project. Need to embed more characters? Change to/from CFF embedding? Just type in the appropriate text and you are done. Depending on your development environment you may need to clean your project.

One other point, I recently work on a localization project for game that was already live. Even though we had all the text strings externalized this project sucked and was slow going. If I had my strings, and other resources, setup in resource bundles I would have been halfway done with the project before I even started. So enough talk, how can we use resource bundles to help with font embedd?

Embedding fonts with resource bundles

A font gets embedded in a resource bundle much like an image get embedded, using the Embed metatag. In fact it is awfully similar to using the Embed metatag as you would in an actionscript file.

It might look something like this:

#a file called fonts.properties

AFontDesignersLove="ComicSans"
ComicSans=Embed(
	source="./assets/fonts/comic.ttf", 
	fontName="ComicSans", 
	embedAsCFF="false", 
	mimeType="application/x-font", 
	advancedAntiAliasing="true", 
	unicodeRange="U+0020-007E")

The backslash() is useful in property files to make long entries more readable. I'm all about readable, editable code.

To use this font in its current form would work like this:

[ResourceBundle("fonts")]
public class MyFontUsingClass {

// put some other code here

	var resources:IResourceManager = ResourceManager.getInstance();
	var fontName:String = resources.getString("fonts", "AFontDesignersLove");
	var format:TextFormat = new TextFormat(fontName, FONT_SIZE);

	_questionField = new TextField();
	_questionField.defaultTextFormat = format;
	_questionField.embedFonts = true;

// put some more code here

You probably noticed a couple things here:

  • I lied - designers hate Comic Sans
  • I also put the font name (string resource) in the property file and just used it to bring in the font.

Once you use the resource bundle metatag in your code for a bundle that has fonts, those fonts are already embedded in your code. There is no need to do the old Font.registerFont() silliness. At least not when you compile the resource bundle into your swf.

The above code is still a bit heavy and I'd hate to have to write it every time. My advice is to clean it up into something that looks a bit more like this:

_questionField.defaultTextFormat = Fonts.getFormat();
_questionField.embedFonts = true;

Depending on what type of format data is used, you might need to make this a little more robust than this but aiming towards this will make you enjoy the benefits gained from embedding fonts this way. For now, I leave this as an exercise for the reader. I plan to write an article on some resource bundle good practices* in the future.

Read More
Just Another Magic Monday Daryl Ducharme Just Another Magic Monday Daryl Ducharme

Resolutions and Chimp Magic

Sparkly Daryl the magicianAs we end 2011 one of my resolutions is to once again re-acquaint myself with the magical arts. In the past year I haven't really been practicing at all. At the same time, early last year there was a joke where I mentioned the phrase "Magician 24/7" and it turned into a thing that led to the picture you see at the top of this article. On the other hand I learned a lot about how I can be practice that will bring the joy back into magic. I got this insight from my study of improvisational comedy.

magic.jpg

Sparkly Daryl the magicianAs we end 2011 one of my resolutions is to once again re-acquaint myself with the magical arts. In the past year I haven't really been practicing at all. At the same time, early last year there was a joke where I mentioned the phrase "Magician 24/7" and it turned into a thing that led to the picture you see at the top of this article. On the other hand I learned a lot about how I can be practicing that will bring the joy back into magic. I got this insight from my study of improvisational comedy. What does this mean? It means in the coming year I am going to attempt a regular magic vidcast called JAMM Live. Where as the posts on my blog have the meaning of JAMM be Just Another Magic Monday the JAMM in JAMM Live will stand for Just Another Magic Meeting. This is because I don't believe Mondays will be a good day for me to do these on any sort of regular basis. I will figure it out in the next few weeks so keep an eye out for the vidcast. Also, look for more, regular JAMM posts on Mondays for this blog. [ad#Ellusionist]What about the fun? Well, since I am known for my interest in magic I do get interesting videos sent to me from time to time. So this week I leave you with a bit of Chimp Magic. This guy really blows the socks off of a chimp who just loves his act. Given that chimps process things differently than us, and as such don't have the same expectations, that is pretty dang cool. Enjoy... the chimp did. [youtube http://www.youtube.com/watch?v=AOSzxmYEtt4&w=420&h=315] For those who don't see the connection of the video and my point on resolutions, remember that 2011 was the year that Rise of the Planet of the Apes was redone. Just kidding, just bringing the fun back to magic. Do you have any fun magic you'd like to share. Let me know in the comments below.

Read More
Sunday Funnies Daryl Ducharme Sunday Funnies Daryl Ducharme

Billy Quan - Enter the New Year

Mind Your Manners with Billy Quan logoThis episode of Mind Your Manners features Billy (played by Darrell Suto) getting ready for a New Year's Eve party. Suddenly a party crasher (John Keister) comes along and ruins his party before it even starts. Billy then proceeds to teach him some manners, Billy Quan Style.

Mind Your Manners with Billy Quan logoMy Sunday Funnies posts are usually posted, you guessed it, on Sundays. However, with January 1st being on a Sunday I decided to post an early version of the post as a New Year's service announcement. I have posted a few things from Almost Live! in the past. With 2012 being the year of the dragon (or at least it will be on January 23rd) I thought I'd provide the message via a psuedo-Chinese themed skit they often did on the show, Mind Your Manners with Billy Quan.

This episode of Mind Your Manners features Billy (played by Darrell Suto) getting ready for a New Year's Eve party. Suddenly a party crasher (John Keister) comes along and ruins his party before it even starts. Billy then proceeds to teach him some manners, Billy Quan Style.

Unfortunately, embedding has been disabled by request on this video so you'll have to watch it over on youtube. I hate that setting but at least the video is worth the extra click. [youtube http://www.youtube.com/watch?v=_9I4ZNzsF4o&w=614&h=420]

Read More
Sunday Funnies Daryl Ducharme Sunday Funnies Daryl Ducharme

Its getting real...funny

I've been itching to write a blog post for a while. However its been a busy time as I've moved from San Jose to Seattle. Well now I'm getting settled and I'm ready to write about something I've found funny for a few months. If you have shopped at any place similar to Whole Foods the song and video for 'Whole Foods Parking Lot' should at least have you break into a chuckle.

You're the most annoying dude I've ever seen bra Could you please move you're right in front of the Quinoa

So here's a little taste of that humor in video form [youtube http://www.youtube.com/watch?v=2UFc1pr2yUU&w=560&h=315] Not one to miss humorous music I also came across another song by DJ Dave and company. Following his hipster trend we saw in the previous video he follows with 'Yoga Girl'. It has some silly lyrics in it as well that a white boy like me (or anyone who would make fun of a white boy like me) can laugh at.

You wanna meditate with me? I'm like...o/uhmm

[ad#Google Adsense] Also there is some pretty crazy yoga poses in this video. [youtube http://www.youtube.com/watch?v=L-8IPDR4Khc&w=560&h=315] And you haven't had enough of the boys of Fog and Smog there is one last thing I'd like to show you. It seems they did a little spot for Hyundai that is right in line with their same rap humor. Also, 'tis the holiday season and this video is from a holiday promotion. Nice! [vimeo 32584521 w=400 h=225]

Hyundai Holidays feat. Fog and Smog from David Wittman on Vimeo.

I'm a big fan of humorous music. I follow Wierd Al on Twitter, he's funny there too. Do you know some other funny music I should check out. I'm all ears.

Read More