arno.org has a great article on how to reduce the CPU usage in your air apps. The meat of it is essentially not using ENTER_FRAME (duh), and more interestingly dropping the framerate to once every 10 seconds (0.1) once the air application goes in the background (minimized/hidden).
The ROTCAPTCHA system requires users to adjust randomly rotated images to their upright position. This is a task most people will be familiar with given the state of early digital cameras, etc.
This system has many advantages, such as being language independent and support many input sources.
Today it’s time to read it and bring back the object in Flex.
The class
package com.idletogether
{
import flash.events.Event;
import flash.filesystem.*;
public class Opener
{
public static var file:File;
public static function openFile() :void
{
file = new File();
file.addEventListener(Event.SELECT, dirSelected);
file.browseForOpen('');
}
public static function dirSelected(e:Event) :void
{
// this will be our object back
var dat:Object = new Object();
var fileStream:FileStream = new FileStream();
fileStream.open(file, FileMode.READ);
dat = fileStream.readObject();
fileStream.close();
some.object = dat.data;
some.other.object = dat.structure;
}
}
}
This example is very basic, but it is kept simple for the sake of being easy to understand. From there you can build up a much more tailored system. This should get you started.
Use the Expressions panel of Flex and add a ‘watch’ to the variable ‘dat’ to see what came back in and if it is in good form.
Feel free to use it for free or commercial projects.
package com.idletogether
{
import flash.events.Event;
import flash.filesystem.*;
public class Saver
{
public static var file:File;
public static function saveToFile() :void
{
// pick an unused extension
file = new File("/filename.ext");
file.addEventListener(Event.SELECT, dirSelected);
file.browseForSave('');
}
public static function dirSelected(e:Event) :void
{
// this object will get saved to the file
var dat:Object = new Object();
dat.data = some.object;
dat.structure = some.other.object;
var fileStream:FileStream = new FileStream();
fileStream.open(file, FileMode.WRITE);
fileStream.writeObject(dat);
fileStream.close();
}
}
}
Techcrunch has a very good article about Twitter and its new position on the market of search engines.
Essentially when a news breaks out or a product is being launched, Google will take several days to aggregate the information said about it, while Twitter Search can reveal nearly instant opinions.
The barriers is also lower as a Twitter account takes a lot less maintenance than a blog account. Writing a post on Twitter can be done while on the phone and virtually takes no time.
However, because it is instant feedback, it also implies that the ‘review’ of the news, product or subject in the tweet is obviously right off the bat, and might not be polished / thought about. People could change their opinion and post again in 10 mins.
Twitter, which I used to hate, is starting to take a very important place on the net and I’m mature enough to admit it and embrace it. That said, it is still a gezillion of idiots fantasizing about their life, writing about their pets or the latest battlestar.
Mozilla Labs is working on a new project called Bespin. It’s a web-based code editor and it looks promising. It will eventually allow participants to collaborate on the same files straight from their browser.
The project is at a very early stage but it already looks solid.
It doesn’t do much at the moment but they’re confident that Bespin will eventually be highly extensible and easily accessible to users.
The Digg Mob experiment is a flash application that follows the comment as they are posted lived on Digg, regardless of the post.
It’s freaky to see that there are comments posted every 2-3 seconds, sometimes faster.
The app is beta but it’s browsable. Each comment is shown on one line and is clickable. From there you can read the blurb about the Digg post and/or visit the site straight from Digg Mob.
If you need or know someone who needs a senior Flash/Flex/AIR developer with experience, please don’t hesitate to forward my details.
I’m open for freelance and contract work, remotely or on location anywhere in Australia.
I’ve been developing and designing websites and web applications since the late 90ies and I’ve been full-time Flash-ist for 6 years. I started as a Web Designer. With experience on both sides, I manage my time efficiently and take care of a project from specifications to deployment.
Today Adobe announced the launch of the Adobe Air Market Place. It’s a new website supposed to help the promotion of Adobe Air applications and to highlight them for sale.
It’s not an Apple app store, for sure, but it should help promote your Air applications out there.