Poll : If you could only use one of your social networks which would it be?

July 2nd, 2008 . by polygeek

What would you do without Facebook? Or, twitter, LinkedIn, etc.? Well, suppose you could use only one of them. Which would it be? ( vote over in the right sidebar )

There’s a good argument to be made for FriendFeed since it aggregates many of the most popular social sites. But it pretty much just gives you a snapshot of each so maybe it wouldn’t be the best option.

My choice would be twitter because I work from home and it’s pretty much all I have to replace water-cooler talk.

But my RSS reader - Google Reader - would be a close second. It’s not just a way for me to keep up with the latest news in the Adobe Flex/Actionscript world. It’s also a great way to keep tabs of my friends who blog.

Why don’t you vote and then comment your thoughts below?

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Digg
  • Facebook

Taking Flex SEO for a test drive

July 1st, 2008 . by polygeek

Unless you’ve been hiding under a MSN search box you’ve heard the news that Adobe has worked with Google and Yahoo to make SWF files truly indexable by search engine spiders.

I’ve put together a quick Flex application this morning to take this new feature for a test drive. It’s just a TabNavigator displaying a few tabs of content about Greek gods. My goal isn’t to become the number one result for zeus. I just want to see the content get indexed and see what the search results look like.

a few greek gods

If you would like to help out with this little experiment then try linking to the application so that it might get crawled sooner. Wouldn’t it be cool if this little experiment ended up being on Google’s first page for “greek gods zeus”? I’ll do a site-search every few days to see when it gets indexed and report back in another post when it does.

I pulled the content off of the Wikipedia.org site and dropped it into a database here at polyGeek.com. Then I used AMFPHP to grab the data and create as many tabs in the TabNavigator as there are results. And I added toolTips to the images if you mouse over them.

The nice thing about the TabNavigator is that the BrowserManager is automatically engaged. And I wrote 3 lines of code to enable the deepLinking in the app so you can land directly on a specific tab depending on the URL. And as always, mi coda, su coda.

In the code I’ve added the SQL, images, and my GoRemote.mxml to help you recreate this if you want. You’ll just need to get AMFPHP going yourself and add my AMFdata.php file to the ../services/amfphp/ folder. I might cover all the more in depth in a later post, someday.

Addendum: I just read the blog post at Google and it mentions that

Googlebot does not execute some types of JavaScript. So if your web page loads a Flash file via JavaScript, Google may not be aware of that Flash file…

I’m using the default Javascript/HTML code that FlexBuilder creates. So I’ll see if it gets indexed. And if you’re wondering why I use the default FB code it’s because I’m too lazy to take the additional step of using SWFobject, most of the time. :-)

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Digg
  • Facebook

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.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Digg
  • Facebook

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?

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Digg
  • Facebook

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.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Digg
  • Facebook

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. :-)

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Digg
  • Facebook

How to - maybe - get FlashPlayer 10 beta running on XP

May 27th, 2008 . by polygeek

Ryan Stewart has an excelent post about installing FlashPlayer 10 beta on your Mac and use the Firefox Flash Switcher extension to be able to switch back and forth between versions.

I tried on XP and ended up in two hours of browser/plugin hell. And just when I was about to give up everything started working. Here’s what I found:

  • The ESPN and CNN sites don’t like the FlashPlayer 10 beta. You get a message in place of the content to install the missing plugin. At least that’s what happened for their video players.
  • I couldn’t get Flash Switcher to work properly with Firefox 2.x. so I upgraded to FF 3beta.
  • Here’s the real pisser: When I tried to install Flash Switcher in FF 2.x it was disabled by default because it was incompatible. So when I upgraded FF to 3beta and installed Flash Switcher it was disabled by default as a holdover from the preferences from FF 2.x. I mistook the disabled for incompatible. (Note: disabled extensions are grayed out. Incompatible extensions grayed out and get a little red-exclamation mark. I failed to notice the difference the first time.)
  • It’s hard as hell to find the Flash Player plugin file on WinXP. Not that you actually need it because Flash Switcher will take care of that for you if everything is set up correctly. So I waisted a good 20 minutes finding it: C:\WINDOWS\system32\Macromed\Flash\NPSWF32.dll. Note: that’s the Macromed folder, not the Macromedia folder which is right next to it.
  • Buzzword doesn’t support Firefox 3beta but there’s a link at the bottom of the page that opens Buzzword in an unsupported browser and it seems to work fine for me.
  • The Google Toolbar doesn’t work in FF3beta. Nor does All-in-one Gestures. But never fear: The Googlebar Lite and FireGestures work just as well in their place.

I started out thinking I’d take good notes on how I did all this but when things got fraked I lost track. So lets call this a suggested process. Like Ryan said, “your milage may vary.”

  1. Download the Flash Player uninstaller
  2. Download the Flash Player 10 beta
  3. Download the Flash Switcher for Firefox
  4. If necessary install Firefox 3 beta.
  5. Uninstall Flash Player
  6. Install Flash Player 10
  7. Now when you click on Flash Switcher - probably in the bottom-right of your browser - it should show at the top of the menu something like “Save Flash 10…” You want to do that.
  8. Done, now you can switch back and forth between Player versions - which restarts Firefox.

That’s great but what about the debugger? There is no debug version of the Flash Player 10 beta. If you’re using Firefox as your primary browser then I highly recommend using IE for debugging. Because you can crash IE all you want - and it happens a few times a day just because it’s made by Microsoft. But who cares? It doesn’t take all your open tabs with it.

So jump over here and get the Flash Player debug version for IE - it’s the first download below Adobe Flash Player 9 — Debugger Versions (aka debug players or content debuggers) for Flex and Flash Developers. You can install it without even closing Firefox so you don’t have to worry about plugin conflicts.

Now that I spent my morning getting this crap to work I don’t have time to actually make any Flash 10 content. Maybe tomorrow.

The first time I installed Firefox 3beta I couldn’t get Flash Switcher to work because I didn’t pay close attention to the disabled plugin state. Because many of my favorite extensions don’t work in FF3beta I decided to go back to FF2.x. I reinstalled it and started up. It crashed right off the bat. Okay, start again - crash. Start in safemode with everything set back to defaults and all plugins disabled - crash. Reboot PC and start FF - crash. Are we noticing a pattern here? So I had to reinstall FF3beta because FF2.x won’t start for me anymore. I guess it’s true: you can never go home again and you can never revert to an earlier version of software. :-)

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Digg
  • Facebook

AMF-PHP based poll in Flex

May 26th, 2008 . by polygeek

I have a new poll in my sidebar to the right that uses AMFPHP to read/write data to a MySQL database. The poll itself is based on an XML file. The Flex app reads the XML file and looks for the database/table that the XML file indicates. The nice thing is that if either the database or table don’t exist then the Flex app creates them.

So to make another poll all I have to do is create a new XML file and point at it. No messing around with MySQL admin and creating tables and such. Not that it’s hard but changing a few lines of XML is way easier. And in true geek manner I spent hours making the Flex app create everything from scratch rather than spend a few minutes here and there doing it manually.

The poll also stores your vote in a SharedObject so that you can only vote once. In the chart your vote choice is exploded out a bit. And as you roll over the labels in the poll results it dynamically explodes out that wedge of the chart.

If anyone has any suggestions for improvement let me know. I intend to tweak it a bit and release the code for others to use. Ultimately I think even people who have zero Flex/Actionscript experience should be able to implement this on their blog.

Oh, and don’t forget to vote.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Digg
  • Facebook

You tell me, what happens next?

May 19th, 2008 . by polygeek

I set up a Twitter account - aTwitrTale - and wrote the first 140 characters of a story.

U tel me,what hapns nxt?

Just @aTwitrTale to add your 140 characters worth.

Post publish note:

I misunderstood how Twitter works with what you can see. I thought that any user would be able to go and see what everyone has posted to date - read the story up till now - and then add to it. But no.

When I have some time I’ll create a site that will act as the reader/editor for this story. And then maybe we can see where it goes.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Digg
  • Facebook

Improving performance of Eclipse/FlexBuilder

May 13th, 2008 . by polygeek

I’m working on a Flex project that is just kicking Eclipse in the ass. It takes forever to build and I keep getting out of memory errors. Finally, I complained about the issue on Twitter and @tomcornilliac was nice enough to twit back that I needed to give Eclipse a bigger heap by editing the eclipse.ini file.

Simple enough. My eclipse.ini file is in the root folder of the Eclipse installation and looks like this:

-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
256M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx256m

-Djava.net.preferIPv4Stack=true
-Djava.net.preferIPv4Stack=true

I changed the two bolded lines to:

-Xms256m
-Xmx512m

And everything runs much faster and I haven’t gotten any of those pesky errors since.

You can also go Window > Preferences > General > Show heap status to get a display of how much RAM Eclipse has to work with and how much it’s actually using. Very handy to turn that on to see if you need to increase your RAM allowance.

Here’s a link to a few other suggested performance improvements you can do to Eclipse/FlexBuilder.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Digg
  • Facebook

« Previous Entries    




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