Saturday, March 6, 2010

Facebook Photo Browser: SlickPhoto

Ok, so the Facebook folks have cleared up the problems I was having publishing an app I wrote, and I thought I'd do a quick writeup to announce it.  It's a relatively simple app for viewing your friends' albums.  I had one main goal:

View all your friends' photos without having to load multiple webpages 

Facebook is particularly frustrating for me in that every photo is on its own web page.  It's good because they can load new ads for you, but awful for a person who want to take a quick look through an album.  So I put together an app I named SlickPhoto:


I wrote this app in Flex, which means it's a Flash app.  Now, it started with a single goal, but I ended up with some features that are worth noting:
  1. Download any Facebook album as a zip file - Good for Facebook stalkers ;)
  2. Slideshows - View any album as a slideshow
  3. Full Screen Mode - Both browsing and slideshows can be viewed in full screen mode.
  4. Link to albums - You can create a link that will load directly into an album you want to view in SlickPhoto.  You can email this link to your friends so they can go directly into SlickPhoto to look at your album.
It's a relatively simple interface, so you can jump right in by going directly to SlickPhoto, or you can view the application profile before you start using it (although there isn't much there at the moment).  Note that SlickPhoto, like all my other Flash-based apps, has a form for submitting bugs so if you run into any problems feel free to contact me that way.

Now, if I could just figure out how to add search tags so people can find it easier through the Facebook search interface....

Sunday, February 7, 2010

Facebook App Directory, Possible Frustrations

So I recently wrote a Facebook app for browsing photos.  You can try it here if you'd like.  It was mostly an experiment to learn about what it's like to go through the whole process of getting an app into the Facebook app directory.  Well, my app has been "approved", but I haven't made a post about it on my blog yet because it still hasn't actually shown up in the Facebook app directory.  It's been approved for oh, I dunno, two months now?

I browsed the Facebook dev forums and came across a couple threads about this problem.  This has been going on for a while.  There are posts from the Facebook admins about it being fixed, and replies saying "no, it isn't".  This has been going on for quite a while (over a year based on one of the threads).

I find it very interesting that such a popular thing has been broken for so long.  I'm lucky since I don't have any monetary interest in getting my app on the directory, but I can imagine this being a serious problem for people who make a living on Facebook apps.  Perhaps the higher profile apps get better service and haven't run into this problem.  I dunno.

At any rate, I thought I'd make a post about this to pass the time while I wait for my app to show up in the directory.  Once it's up there, I'll go over the features and make it official.

Tuesday, January 26, 2010

MM Ticker Browser 0.2

A while back, I posted a tool for researching stock tickers. Well, after that post I went back into the code and added some functionality for saving preferences. Also around that time, my daily stock watching drifted into just checking the indexes, and that code was forgotten... until today!

I got a request for the source code to MM Ticker Browser, and since my subversion repository no longer has the old code, I figured I'd make an official post about it. I never got around to testing or using the preferences code much, so it may have a couple bugs. That's why there's a bug reporting interface in it :D.

So here's what I've posted:

Remember, this in an Adobe Air app, so you'll need to get Adobe Air.

... and just in case you have problems with this version, you can always use MM Ticker Browser 0.1.

Monday, November 23, 2009

Photo Gallery Maker 1.1

I was working with Photo Gallery Maker recently and decided it needed a bit of an update.  Key changes are as follows:



  1. You can now have Photo Gallery Maker include a .zip file of all the photos in your gallery.  If you do this, there will be a "download all photos" link in the title bar allowing viewers of your gallery to download the photos.  You can include the original photos or the resized versions in the .zip file.
  2. You can now save and load your gallery as xml.
  3. I've adjusted the look and feel of the full size image (shown when you click a thumbnail).
  4. You can now view the images in a slideshow.  A slideshow control panel is shown if you mouse over a full size image.
I've also fixed a few bugs:
  • There was a nasty memory leak in the image processing code.  If you were working with large images, it would most likely run out of memory.
  • Drag and drop should drop to the correct position now.  It was off by one in certain cases.
  • If one of your images was sufficiently tall, it would overflow onto the caption.  I've fixed this by causing the thumbnail to get squashed if it's too tall.  The full size version remains unchanged.
This build includes a library called SharpZipLib, which is available under the GPL.  As such, source code is not included in the installer (you won't notice it unless you're trying to).  A file called source.zip contains all source code, and it is copied into the Photo Gallery Maker folder in Program Files.

Nab this new build here (1.1 MB).
For more info on Photo Gallery Maker, see my post about version 1.0.

Monday, September 28, 2009

Facebook API: Going Full Screen with Adobe Flex

I've recently been checking out the Facebook API and doing some experiments with the Facebook ActionScript API. It's relatively straightforward to use, but as I've found with other Adobe products, is a little lacking in documentation. Using full screen mode is one of those things. If you do a Google search for it, a lot of results talk about how it isn't possible, but I've sorted it out, and here's what I did to get it working.

First off, you'll notice on the Adobe documentation that full screen mode is supported only if you're using Iframe content and not FBML. This is the only place I found where it is indicated that it IS in fact supported. I couldn't find any example code on the subject.

Secondly, I went through the Adobe tutorials for Creating a Facebook app and then Deploying your Facebook app. Jeanette's coding style makes me crazy, but the examples are easy to work through.
After the tutorials, you're 95% of the way there. We have to make two changes, the first is to add support to your Flex app to switch to full screen mode, and the second is to change your canvas page to enable full screen mode.

Changes to your Flex App
You'll need to add the ability to switch into full screen mode. This is very simple, and is documented pretty well here. What I did was add a button with a handler that set the stage display state:

ActionScript code
private function toggleFullScreen():void
{
try
{
switch (this.stage.displayState)
{
case StageDisplayState.FULL_SCREEN:
this.stage.displayState = StageDisplayState.NORMAL;
break;
default:
this.stage.displayState = StageDisplayState.FULL_SCREEN;
break;
}
}
catch (err:SecurityError)
{
// ignore
}
}

mxml code
<mx:LinkButton x="534" y="4" label="FullScreen" click="toggleFullScreen()"/>

Changes to index.htm
This was the part I found a little tricky. My HTML/JavaScript skills are a little lacking, so I had to do a bit of reading to sort this out.

The index.htm you end up with at the end of the Adobe tutorial allows you to debug your app AND deploy it to Facebook using the same html. This is useful compared to the default html Flex Builder generates, which always opens a second web page to allow the user to log in. This is all good, except the index.htm you end up with uses swfobject.embedSWF instead of the Adobe generated <object> and <embed> and tags people are probably used to. Enabling full screen mode in the Adobe default html template is documented here.

To enable it using swfobject.embedSWF, you have to pass it as an argument to the javascript function. It seems obvious at first, the you'd just set flashVars.enableFullScreen to "true" and be done, but that doesn't work. The enableFullScreen flag is set in the params argument, not the flashvars argument. So what you started with:

swfobject.embedSWF("helloUser.swf", "flashContent", "100%", "100%", "9.0.0", "expressInstall.swf", flashVars);

Ends up being:
var params = {};
params.allowfullscreen = "true";
swfobject.embedSWF("helloUser.swf", "flashContent", "100%", "100%", "9.0.0", "expressInstall.swf", flashVars, params, false);

That's the key really. I fought with the parameters a bit before figuring out that I was setting enableFullScreen in the wrong place. I makes sense after looking through the swfobject documentation and comparing it to the index.template.html, but it's not obvious to folk like me who sometimes struggle a bit with HTML and JavaScript.

Now when you run your app in debug mode or on Facebook, it should switch into full screen mode when you toggle it, rather than doing nothing (as I was having it to for quite a while).

Sunday, September 27, 2009

Character Builder 1.3 known issues

I've gotten a few emails through my issue submission from in the Character Builder, and I thought I'd jot down the current list to keep track of things. I'm not sure when I'll get to fixing things, but I'll be sure to post when I do (and the builder will be updated as well). What I've got so far are the following problems:
  • Druids begin with three at-will attack powers, but this is not reflected in the builder. For now, you'll have to put them on your Character Sheet manually.
  • Armor Proficiency (Plate) is missing.
  • Potent Challenge is missing.
  • When manually entering ability scores, you are not given the ability to add stat points if you level up. I may leave this as is, since manual entry was originally intended to be 100% manual.
  • Stats on the final character sheet (PDF) may be incorrect. Make sure you double-check them.
  • On the PDF, it appears that only the 1/2 lvl value is factored into ATT BONUS in the Attack Workspace.
Feel free to post additional issues in the comments section here.

Friday, August 14, 2009

D&D Character Builder Update (1.3)

Work has been busy these last couple month, but I managed to get my D&D Character Builder updated with the Player's Handbook 2 races and classes. It might be a little rougher around the edges than previous versions, so I've also added a button titled "Got and Issue?" where you can drop me an anonymous email detailing any problems you encounter. Other changes include:

Major Changes
- PHB2 classes and races.
- Submit an issue button. If you find something that ain't quite right, let me know about it!
- I reworked the skills, feats, and powers page. Make choices on the left, see what you've chosen on the right.
- A "to-do" list is available (click the "To-do list" button) that tracks choices you still have to make. If you select on of the listed choices, it will give you more information. If a choice can be made immediately (like for languages), it will give you a little selection box. If not, then you can double-click the choice to have the UI highlight the section you need to make a choice in.

Other Changes
- The code behind the scenes is much more aware of the bonuses you've chosen. I spent some time adding code to fill out the character sheet a bit more based on these bonuses. You'll see modifiers properly applied to your skills based on feats you choose, for example.
- Languages you choose are filled in on the character sheet.
- Changed the name to "builder" instead of "Generator".
- Powers, feats, and classes are sorted alphabetically now.
- Half-elfs can now choose human feats.
- Added a "license" agreement. This thing is free, but I may as well put it in writing.
- There's a donate button in the About box now. If you like what you see, your support is appreciated.
- I've also added lots more new bugs. Pats on the back to those who find them first.
- If you'd like to use older versions, a link is provided in the Change Log for the version of interest (you can get to the change log from the About box). Previous versions have a "Use this version" link to allow you to go to an older version.

That's about it. I'd like to sort out a better way to create a character sheet in PDF form, so if anyone has suggestions, drop me a line. XFDF doesn't seem to be well-supported by Adobe.

Access the new Character Builder (1.3) here.