Making Evernote business secure

Evernote is a fantastic tool. It allows you to simply store thoughts, plans, notes or stuff you find in one simple place, and using tags makes it easy to find it all again. It also allows you to sync data to their cloud service.
However, sometimes you want to store data that cannot or should not be accessible by anyone else, not even Evernote. Business related data is such an example. There is a way to save all your data using Evernote and sync it across all your computers in a safe way where you can be absolutely sure that no one else can access the data.
Read more

Starling Framework

Adobe has released a great little framework called the Starling Framework. This framework is based on the iOS game engine Sparrow Framework.
The Sparrow framework replicated the flash environment pretty close in naming conventions and structure. Basically the Sparrow framework is a port of flash to iOS. Now the iOS flash port has been ported to flash, funnily enough…
The Starling framework uses the molehill API to give a 2D engine that is powered by the GPU by placing the assets on planes in 3D and simulating a 2D screen, thus gaining from the GPU rendering of molehill.

Both Sparrow and Starling uses sprite sheets and bitmaps, and these are mapped using a texture XML. This data format is specific to Sparrow, and used again in Starling.
Lee Brimelow has a great video course on how to use Texture Packer to create a png and texure XML here:
http://gotoandlearn.com/play.php?id=147

To decrease the file size of the packages I wipped up a little library that can convert an XML and PNG file to a binary file and then back again. By deflating the XML and the PNG together to binary form you significally decrease the file size as well as you get one less file to load (one file holds both data).
Read more

Really cool example of Molehill

We’ve seen some pretty nice examples of Molehill in the last months, but this one (blogged by Terry Paton) for me takes the price!
http://pixelpaton.com/?p=3823

Bädda in fonter för Flash player 10, embedAsCFF

Att bädda in(Tackar Patric :) ) fonter i sin SWF är något man kunnat göra väldigt länge, men det har ändrats sig lite i och med Flash player 10.
För att bädda in en font skriver man bara:

[Embed(source = '../lib/GOTHIC.TTF',
	fontFamily = "minFont",
	mimeType = "application/x-font-truetype")]
private static const GothicFont:Class;

Och för att senare använda det i ett textfält så använder man sig bara av fontFamily namnet:

var format:TextFormat = new TextFormat();
// Här väljer jag vilken font jag ska använda
// Använder mig av fontFamily värdet
format.font = "minFont";
format.size = 50;
format.color = 0x000000;

var tf:TextField = new TextField();
tf.embedFonts = true;
tf.defaultTextFormat = format;
tf.text = "The quick brown fox jumped over the lazy dog. 0123456798";

Alternativt hämtar man värdet från en instans av teckensnittet:

// Skapar en ny instans av fonten
var myGothic:Object = new GothicFont();

var format:TextFormat = new TextFormat();
// Hämtar ut värdet av fontFamily
// från instansen
format = myGothic["fontName"];
format.size = 50;
format.color = 0x000000;

var tf:TextField = new TextField();
tf.embedFonts = true;
tf.defaultTextFormat = format;
tf.text = "The quick brown fox jumped over the lazy dog. 0123456798";

Fram till och med Flash player 10 funkar detta jättebra, men om du väljer att kompilera mot FP10 istället så får du problem.
Helt plötsligt syns inga bokstäver i textfältet.

Anledningen till detta är det nya text ramverket (som bygger på deras nya text motor) som Adobe släppte med Flash player 10.
http://labs.adobe.com/technologies/textlayout/

TLF = Text Layout Framework. Har bytt namn massvis med gånger, bl.a. text component library och ännu tidigare Vellum.
FTE = Flash Text Engine, den nya text motorn

Innan vi går vidare bör vi gå igenom CFF!
Read more

Flash tips – Prestanda Tips (1?)

Denna veckans tips tänkte jag skulle få handla om lite prestanda tips. Innan jag börjar vill jag bara påpeka att det är väldigt viktigt att titta nyktert på sin applikation när det kommer till prestanda. Prestanda är bra, och något som ska strävas efter, men med måtta.
Prestanda får (enligt mig) oftast inte vara i vägen för underhållning eller tydlighet av en klass. Det är också väldig viktigt att man inte grottar ner sig för mycket, prestanda optimera med måtta.
Vissa saker kanske får ta lite tid, allt behöver inte alltid ta 0 millisekunder. Ramverksdelar är oftast delar som behöver lite extra tweaking prestanda mässigt, grafiska delar kan ta längre tid. Dvs. när en knapp trycks på av en användare så är det lugnt om det tar upp till en sekund innan något händer, men en matematisk uträkning måste gå undan!

Jag vill också påpeka att det jag tar upp här inte är något nytt, och mycket kan du kanske redan. Men jag kanske kan hitta något nytt eller något man inte tänker på ofta, och det är ju alltid nåt! :)
Read more