Daily Archives: June 1, 2010

Find Out What Flash is Like On the iPhone, Without Jailbreaking

Flash, for me, is not something that I miss or want on the iPhone platform. Sure, there are some sites, for movies and maybe the occasional awesome reinvention of a classic game that I wouldn’t mind being able to see on my mobile platform of choice, but overall it’s not something I’m losing sleep over.

If you are losing sleep over it, or if you’re just curious about what Flash on an iDevice would even look and feel like, there’s a couple ways to try it out, one of which is available right now as an app that doesn’t require jailbreaking. The other, which is actually much cooler, is only in preview release right now, but  runs in your Safari browser natively without any extra steps required on a user’s part.

Cloud Browse is your first option. It’s an app that connects you to a remote computer running on servers maintained by the Cloud Browse developers, AlwaysOn. The app lets you then control the browsing on the remote computer from your iDevice, and see any type of web content, including Flash. The sites you visit are streamed to your phone, but there is some trade off as you might expect.

Video framerate is quite slow, and if you’re not a paying subscriber, you only have a limited number of spots to connect. Free users can also get bumped by paying customers, as in unceremoniously disconnected mid-session. You can get a paid account for $9.99 a month that would give you 30 FPS video and 1GB of storage for saving offline data. Plus you can only use it in the U.S. and Canada, and it only works over Wi-Fi. Finally, playing Flash games with the iPhone’s on-screen keyboard is absolutely no fun.

The other alternative is Smokescreen, which is a web-end tech that developers and designers could use to make their Flash content visible on the iPhone, iPod touch and iPad. That means that it’s currently far more limited (you can only see it in action in some demos released by the original developer), but that it has much more potential in terms of long-term usability.

Smokescreen operates by a workaround process that isn’t actually a plugin, so it there’s really nothing Apple can do to stop it. Here’s how the process works, as described by its creator Simon Willison:

It runs entirely in the browser, reads in SWF binaries, unzips them (in native JS), extracts images and embedded audio and turns them in to base64 encoded data:uris, then stitches the vector graphics back together as animated SVG.

The experience so far is somewhat hit or miss, with simple animations like those found in Flash banners working very well, but with more advanced things (like a Strongbad email animation) it runs rather slow. Also there was no sound when I tested it on my iPhone 3GS, which I assume is a limitation of the method used.

Smokescreen is definitely off to an impressive start, though, and things will probably improve since it will soon be open sourced. It’s compiled in JavaScript, and works perfectly in non-mobile browsers as well, which means you could be viewing Flash-based content on your computer without ever having to install the actual Flash plugin. I have a feeling that this tech will catch on far faster with advertisers looking to cut corners rather than redesign their ads from the ground up for iPhone OS consumption. You can view all the demos currently available here.

Both these workarounds are a prime example of how if people really want their device to do something, they’ll figure out a way.

Edit an Object Property Value Dynamically at Run Time

no need to write a huge switch statement to make a run time decision

Imagine you have an Object with 50 properties, and at runtime, you only need to change the value of one of them. You could write a switch statement to run through all of them, but there is a better way. This is how it would be done with a switch:

switch(propertyName) {     case "Name": obj.Name = newVal; break;     case "Phone": obj.Phone = newVal; break;     ///and so on...

That sounds like a terrible idea. With Reflection, it was easy to build an extension to update any object with a new value at runtime (provided it can be written to) with the following code:

public static void SetPropertyValue(this object o,      string propertyName, object newValue) {     PropertyInfo pi;     pi = o.GetType().GetProperty(propertyName);     if (pi == null)         throw new Exception("No Property [" +              propertyName + "] in Object [" +              o.GetType().ToString() + "]");     if (!pi.CanWrite)         throw new Exception("Property [" +              propertyName + "] in Object [" +              o.GetType().ToString() +              "] does not allow writes");     pi.SetValue(o, newValue, null); }

Now, instead of that 50+ line mess above, all you need to do to change the “Phone” property to ‘newVal’ is:

 obj.SetPropertyValue("Phone", newVal); 

I added this to my Naspinski.Utilities Set on CodePlex as well.

TechUniversity: iMovie 101

Apple’s iMovie video editing software, part of the iLife software suite, allows users to quickly and easily create professional looking movies.

In this TechUniversity iMovie 101 screencast (subscription required) we’ll walk you through, from start to finish, how to create an edit a movie in iMovie.

Topics covered:

  • The projects and events window
  • Adding and editing video
  • Titles, transitions, sound and maps
  • Sharing your video

Below is a sample of the video. The full screencast clocks in at just over 20 minutes.

Ironing Velvet and Velveteen

Velvet and velveteen are luxurious-feeling fabric that can easily be wrinkled and difficult to straighten out.

Before you let anything touch your velvet clothes, make sure that you read the labels.

Velvet and velveteen should be steamed and not ironed. You can do this by hangine velvet in a steamy bathroom. This would work for mildly wrinkled clothes. If you have a hand-held steamer or a presser, this would work perfectly. Hang the clothes up to let them dry.

A steam iron can also be used. Just lay a clean cloth, preferably a terry towel, and place it on your ironing board. Place the velvet material on it. Place another thin cloth, or a sheet of typing paper over the velvet and iron away, making sure that you do not press heavily.

WP Like Button Plugin by Free WordPress Templates