Subscribe to RSS
get email updates
home | about | pixDif AIR app | video tutorials
polyGeek.com

place your ad here

Web Premium



Get Qwest High Speed Internet



Dr. Horrible, coming at you in 3D

June 29th, 2008 . by polygeek

Yes, I have other interests other than just Flex/Actionscript. That’s why the blog is named polyGeek – because I have multiple geek interests. And one of those is the Joss Whedon universe: Firefly, Buffy, Angel and now Dr. Horrible.

Dr. Horrible is an Internet based musical comedy. You can read more about it here.

view source

And of course part of being a geek is combining those geek interests so I modified an earlier 3D cube project so that I could load images via XML. Now I can modify it quickly and easily to display other photos. And so can you because as my blog moto goes: mi coda, su coda.

As always, thanks to the PaperVision3D folks for making Flash 3D easy to do and Luke at paperVision2.com for his great tutorials.

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

Using the AIR 1.1 Updater Framework

June 26th, 2008 . by polygeek

I’m about to start an AIR project for a client and I knew that the first thing I’d want to enable was auto updating. The thought of sending out a new .air file ever other day just wasn’t an option. And of course even after the project is complete there will be updates to make. The client will be happy to see how easy it is to update their installed application through the development process.

Mihai Corlan wrote a very concise and helpful tutorial on adding this functionality to a new or existing AIR app. I went from start to finish on his tutorial in about 15 minutes – and it was 15 minutes well spent.

If you want to know more about what’s new in the AIR 1.1 update then read Ryan Stewarts post.

I was thinking maybe a better title for this post would have been: Using the AIR 1.1 Updater Framework, so easy even a Silverlight developer could do it. What do you think?

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

Converting seconds to English readable time duration

June 12th, 2008 . by polygeek

In a project I’m working on I get the number of seconds since the device was turned on and I need to display a message to the user similar to this: System uptime is 2 years, 1 month, 13 days, 1 hour and 15 seconds.

I figured that since showing System uptime is common to many websites it would be easy to find someone who had already written some code to do the conversion. After about 15 minutes of searching I hadn’t found anything and figured I could have written the code myself in that time. ( It actually took closer to 30 minutes to write the code because John Wilker stole my mojo and I was feeling pretty stupid. )

view source

Trouble with time

So I lied. It ended up taking hours to get the code to work just right, at least mostly right.

There were losts of little things that I had to accomodate. Like if the time output ends with hours then it needs to say, “blah, blah, blah and some hours.” Originally I only took into account the “and” going before the seconds. But if there are no seconds then … you get my meaning.

Oh, and adding a space in some places to the output string turned out to be harder than I thought it would be. But after messing with output for a while I think I got it.

Time is an illusion, lunch-time doubly so

But then the issue came up: how many seconds are there in a year, or whatever. There are lots of different ways to measure time durations. Turns out we’re pretty well set for things like minutes, hours, and days. Beyond that it starts getting messy.

The way my code works is to take the number of seconds you input and create a date starting that many seconds after January 1, 1970. It’s then doing conversions to see how many years, month, days, etc. after that date. Which is probably going to be an approximation of what you really want. But the problem is that I don’t know what you really want. It could be that you want to measure time before or after right now. That would be a different algorythm. If that’s what you need then you have my source to start from. This solution works for my current need and I’ll bet it would work for Douglas Adams, if he needed such a thing.

If you know of some standards that are used in time calculations, such as this I’d love to hear about it in the comments. Or anything else you might have to share on the matter.

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

Getting user typed input from and editable ComboBox

June 2nd, 2008 . by polygeek

Note: Something wonky was going on the first time I tried this and it turns out that this is very easy to do without extending the ComboBox. Lesson learned: if you really, REALLY think something should work and it doesn’t then reboot and try again.

You would think that if you make a Flex ComboBox editable then it would be easy to get the value that the user typed in, right? I mean, why else give a ComboBox a property of editable. It’s one of those things that seems so obvious that I spent an hour running through the debuger looking for the value I had typed in that I thought I must be missing something.

If I’m missing something I’d appreciate it if someone would point out to me just how you can get the value*. As it turned out it was very easy to do by extending the ComboBox and overriding the textInput_changeHandler method. As I was trying to find an obvious way to get at the data I kept thinking, “Just override the frakking ComboBox to get at the data.” I should have listened to that inner voice sooner and saved an hour of frustration.

view source

After lots of searching about the only useful post I found was this one by strikefish at UniversalMind. They’re ComboBox-lookAhead is really cool. This is where I figured out to override the textInput_changeHandler to get at the data I needed.

I’d appreciate your comments if you can think of ways to improve this approach.

*Note: guessing that if it can be done Tink will be the first to comment the solution. Don’t let me down Tink. :-)

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

   



polyGeek.com

© Copyright 2008 polyGeek.com / Dan Florio, All Rights Reserved Except Where Explicitly Stated
Web Developement Blogs - Blog Catalog Blog Directory
M2 Websites
Local Directory for Los Angeles, CA

Better Tag Cloud