Archive for August, 2007

Using the AnimateProperty Effect

Friday, August 31st, 2007

I’ve been using the AnimateProperty effect a lot lately for creating single or compound effects in Flex, so I thought I’d share a few simple examples. The AnimateProperty effect not only allows you to animate a property like width, height, etc., but it also allows you to animate a style property as well, so you can really get into the details of how you want a component to animate. Here’s some quick examples:

You can recreate the Resize, Fade, and Move effects by using the AnimateProperty effect and animating size, position and alpha:

Click here to view source

With the AnimateProperty effect you can also animate certain styles by setting isStyle=”true” in the effect properties. This allows you to do things like animate the cornerRadius and fontSize of a Button:

Click here to view source

Like I said, these are simple examples, but with a little experimentation you can add another level of detail to any effect you might be trying to create and it some cases have a bit more control.

iPhone : The Next Universal Remote?

Friday, August 31st, 2007

iPhone TV

When rumors began to circulate about the iPhone there were a few killer features I was hoping to see down the line. One was the idea of the iPhone as a powerful remote to control various Apple devices. You know, controlling iTunes on my computer, beam video to a friend’s Apple TV and controlling the device. Maybe even monitor the oil level in my iCar. As Apple integrates their products into our daily lives I can see where something like this could make sense.

I came across this application, called Signal, that allows you to control iTunes from your iPhone. I’ve tried it, it works, and it’s great cause other iPhoners can access and control the host iTunes for a kind of collaborative DJing session. Now if only people could add songs from their iPhone to a queue along with others.

Check out Signal here

FillColors Brings More Flex Skins

Thursday, August 30th, 2007

FillColors

Nahuel Foronda and Laura Arguello of ASFusion have put together a great Flex skins resource site inspired by CSS Zen Garden. It’s called FillColors and it provides more examples of what’s possible with skinning a Flex application. Not only that, but they’re having a contest to celebrate the launch, so show ‘em what you can do before September 28th and win yourself a FlexBuilder 2 license.

If I can find the time I’m going to try to support them and put together a theme. Maybe based on the application sample that Andy McIntosh and I presented at 360Flex. Or, maybe I’ll just expand upon my Flex Bar App that never got finished.

FillColors makes it easy to find, preview or download any of the Flex styles on the site, and if you see something you like, you can let the author of the theme know with comments or a rating. When I was there I couldn’t figure out how to download a style to try. The download buttons were greyed out, but I’m sure those will become active very soon

I’ve heard several people mention new Flex skinning resource sites on the horizon and it’s great to see them starting to bubble to the surface.

Check out FillColors

Filter Explorer AIR App : We Need More

Tuesday, August 28th, 2007

Filter Explorer AIR App

Joe Johnston just released an AIR version of the Flex Filter Explorer he created a while back. This is one tool that I’ve referred others to when explaining filters in Flex and was a part of the Explorers Round-Up post I did. This is definitely a step in the right direction and I agree with Joe that an AIR app that combines all the Flex explorers together would make for a killer resource tool. Better yet, if there was a way to standardize the way an “explorer” was built or if there was a template out there to follow it would make it really easy to combine them together or have the AIR app update with new explorers.

Check out the AIR Filter Explorer

Skinning & Styling : Tips & Tricks

Saturday, August 18th, 2007

Part of our 360Flex Presentation was supposed to include some tips & tricks, but we ran out of time. Here’s a couple simple things I might do when creating a set of skins or a theme for a Flex project.

Tip #1

When using SWFs for skinning, add the symbol name as a selectable text object to allow for quick copy and paste reference. I find this really helpful when handing a SWF over to developers, because it saves them time from having to open the FLA or manually type in the names of symbols.

It’s really easy to do. If you’re using Flash, just add text next to a symbol and fill in the name. When the text is added it will default to Static Text, which is fine. To make it selectable, just click on the selectable text toggle button.

Selectable Text in Flash CS3

When you publish your SWF all the text you made selectable can now be easily copied and pasted from the opened SWF. Here’s a screenshot of an example I did for Shilliber :

SHiLLiBER Theme SWF

Screenshot of missing slide

Tip #2

Another thing I’ll do is create a set of skins just for use as backgrounds. I usually create a background as a 30 x 30 pixel square and then set 9-slice grids to allow it to stretch correctly.

Screenshot of Background Skins

Then in my CSS file I create the background classes like this:

/*
//——————————
// Backgrounds
//——————————
*/
.lightGreyBg
{
backgroundImage: Embed(source=”darkroom.swf”, symbol=”lightGrey_Bg”);
backgroundSize: “100%”;
borderStyle:none;
}
.darkGreyBg
{
backgroundImage: Embed(source=”darkroom.swf”, symbol=”darkGreyShadow_Bg”);
backgroundSize: “100%”;
borderStyle:none;
}
.linesBg
{
backgroundImage: Embed(source=”darkroom.swf”, symbol=”lines_Bg”);
backgroundSize: “100%”;
borderStyle:none;
}
.centerLightGreyBg
{
backgroundImage: Embed(source=”darkroom.swf”, symbol=”centerLightGrey_Bg”);
backgroundSize: “100%”;
borderStyle:none;
}

Depending on the use of the background skin I’ll use either the backgroundImage or borderSkin style properties. This works great for backgrounds of VBox, HBox, Canvas, etc.

Screenshot of missing slide

Tip #3

When working on a project I try to keep my CSS file as clean as possible. The less scrolling and edits I have to make, the better. One trick I use is something I got from working with CSS for HTML, grouping items with common properties using comma delimitation.

For example, let’s say you have a group of 4 Buttons. All have the same fillColors, fillAlphas, fontFamily, borderColor, cornerRadius, etc. The only difference between them is they each have a different icon.

You could do it like this:

/*
//——————————
// Blue Buttons
//——————————
*/
.arrowBttn, .starBttn, .checkBttn, .xBttn {
cornerRadius: 12;
fillColors: #4A617E, #FFFFFF, #0066ff, #0066cc;
fillAlphas: 1,1,1,1;
color: #000000;
borderColor: #006699;
}
.arrowBttn {
upIcon: Embed(source=’images/arrowUp.png’);
cornerRadius: 12;
fillColors: #4A617E, #FFFFFF, #0066ff, #0066cc;
fillAlphas: 1,1,1,1;
color: #000000;
borderColor: #006699;
}
.starBttn {
upIcon: Embed(source=’images/star.png’);
cornerRadius: 12;
fillColors: #4A617E, #FFFFFF, #0066ff, #0066cc;
fillAlphas: 1,1,1,1;
color: #000000;
borderColor: #006699;
}
.checkBttn {
upIcon: Embed(source=’images/check.png’);
cornerRadius: 12;
fillColors: #4A617E, #FFFFFF, #0066ff, #0066cc;
fillAlphas: 1,1,1,1;
color: #000000;
borderColor: #006699;
}
.xBttn {
upIcon: Embed(source=’images/x.png’);
cornerRadius: 12;
fillColors: #4A617E, #FFFFFF, #0066ff, #0066cc;
fillAlphas: 1,1,1,1;
color: #000000;
borderColor: #006699;
}

That can create a pretty bloated CSS file over time. Rather than specify the same common properties for each Button 4 times, you can group the common properties together under the applicable style classes and then re-specify each class separately for properties that are not common. Like this:

/*
//——————————
// Blue Buttons
//——————————
*/
.arrowBttn, .starBttn, .checkBttn, .xBttn {
cornerRadius: 12;
fillColors: #4A617E, #FFFFFF, #0066ff, #0066cc;
fillAlphas: 1,1,1,1;
color: #000000;
borderColor: #006699;
}
.arrowBttn {
upIcon: Embed(source=’images/arrowUp.png’);
}
.starBttn {
upIcon: Embed(source=’images/star.png’);
}
.checkBttn {
upIcon: Embed(source=’images/check.png’);
}
.xBttn {
upIcon: Embed(source=’images/x.png’);
}

Not only have you eliminated 20 lines of code, but if you ever want to change a property of your Buttons, you only have to do it in one place. This is something that could have been easily used with Tip #2.

Screenshot of missing slide

If anyone else has any tips to share, let me know.

360Flex : Day 2

Tuesday, August 14th, 2007

Day 2 of the 360Flex Conference started out with the “Creating a Visual Experience in Flex” back-to-back sessions presented by Andy McIntosh and I. We were up ’til 3am putting the finishing touches on our slide deck and hands-on materials to get it to where we were happy with it. The informational session ran a bit short to allow more time for the hands-on, which worked out great. Just for grins I thought I’d show the app we were going to build, which was a Mix Drinks Recipe type application. Here’s the mock up I did:

360FlexBar

We ended up making a much simpler example for the hands-on session to insure people were able to grasp the core methods we were discussing, rather than getting caught up in the code. If anyone’s interested in making this an app let me know. All the artwork for this app is vector and those drinks are prepped and ready to go in Flash. You can check out the slide deck for the informational presentation and the grab the source files for the hands-on session here. There’s also a nice list of resource links on that page.

After the presentation I was able to get out of the hotel and explore Seattle a bit to grab some lunch. Later on I caught David Colletta’s presentation on Buzzword, which was great. I’m definitely looking forward to day 3 and a trip to the Space Needle restaurant.

I’m Officially at 360Flex

Sunday, August 12th, 2007

I say officially because my flight was delayed 2 hours. However, I did get a $6 food voucher and the first beer on the flight was “on the house”. Those two items helped me forget I was even late. Once I got to the Red Lion I totally forgot any late flights.

The night was great! I got to meet Doug McCune (he tore up the dance floor), Ryan Stewart, Tom Ortega, Ted Patrick, John Wilker, Jeff Houser and so many others I’ve conversed with via email. This is going to be a great conference! If you’re here, don’t forget to say hi.

Countdown to 360Flex

Saturday, August 11th, 2007

The countdown is on ’til I leave for the 360Flex Conference in Seattle. I’m putting some of the finishing touches on portions of the presentation I’ll be giving with Andy McIntosh and grabbing handfulls of ScaleNine, Degrafa and AtomicCurve business cards. I’m really looking forward to meeting lots of people, learning a lot, checking out others’ projects and sharing a bit of my own. If you’re going, be sure to say “hi” and if you’re not sure who to look for, here’s my Flexcursion profile.

SHiLLiBER : Speak Your Mind

Friday, August 10th, 2007

Shilliber

Shilliber is a site that uses Flex to let users speak their minds, literally. It’s a player that allows you to record your voice as you speak your opinion on any topic. Sell, put down, celebrate or deface, it’s all fair game. If you can record it, it can be on Shilliber. You can also embed the player on a webpage to get additional exposure.

There is a bit of a self-promotion spin to this post though. I did the design, MXML layout and transitions for the project. I think it turned out pretty nice. If you were at the presentation I gave in LA, you might remember this as one of the examples I presented.

Check out Shilliber.com