Arrivals revisited

It’s been over two years since we (myself and Leif) created Arrivals.

At my last lecture, in which I talked about webservices, I took it out of the drawer to show my students. I was amazed that it still worked – offline that is. For some reason the images of the first destination (Paris) would not show.  So today I set out to fix that. The problem only beeing present on the first destination, I thought it had something to do whit load time, but still found that rather puzzling as I new the code would handle that. I looked at the XML returned from Flickr  and noticed that the farms that images from the first destination was located on, all had a rather hight id number, so I started to suspect the problem was related to the crossdomain policy issue. (This was made in as3) I was correctly loading a crossdomain.xml file from the Flickr site as such:

 for (var j:uint = 1; j<5; j++) {

Security.loadPolicyFile('http://farm'+j+'.static.flickr.com/crossdomain.xml');

}

Notice that the code is handling the fact that there is a crossdomain.xml for each farm on flickr, then to be on the safe side loads all 5 of them. Problem is this number increases over time – as Flickr adds more farms to host people’s images. Why oh why did I decide to hardcode the limit value (5)? Could it be that when I wrote the code I didn’t completely grasp why I had to load these policy files in the first place? I guess so. Anyway, looking at it today it took me NO TIME to se that I did not need to load ‘all’ (read 5) policy files for each farm – for each image. I only need to load the policy file for the farm on which the current image is located. And which farm I need to load with a given image, is in the data returned from Flickr: photo.@farm. So the loop was replaced with this single line:

 Security.loadPolicyFile('http://farm'+photo.@farm+'.static.flickr.com/crossdomain.xml');

And now the Arrivals app works again. Hurray!

En hjælpende hånd til UVM’s IT rådgivningsgruppe

Undervisningsministeriet har nedsat en IT rådgivningssgruppe, der indenfor de næste par år skal dele af deres viden når de ved et årligt møde behandler en række centrale spørgsmål der har at gøre med IT, pædagogik og uddannelse. For min egen øvelses skyld vil jeg her gå bag om spørgsmålene. Hvad ligger der i dem? Og dernæst besvare spørgsmålene  så klart og kort jeg kan… read more »

Custom fonts on smartfones (Corona)

I found a font that’s perfect for my educational content. Heinemann:

The Heinemann fonts were initially developed by the in-house design team at Heinemann educational publishing out of the necessity to find the perfect font for use in early primary reading books and literacy products.
Basic Heinemann is defined by longer ascenders and descenders which help children to distinguish between letters; rounded edges on all letterforms help focus the reader on the individual letter shape; and modified characters (eg. a, g,) ensure instant recognition of letterforms.
(image and citation from the font font description page at myFonts.com)

To get my font to work on the device tough, I had to embed it in the app bundle, which means editing the build.settings file. It’s important to find the real name of the font though and not use the .ttf extension. After messing about for a while, I found the right way to do it her:

http://blog.evilgenius.com.au/getting-custom-fonts-to-work-in-corona-sdk/

Thanks evilgenius

Working with databases in Corona project

Took me a while to get through to the database I was trying to create through the script. Turned out I couldn’t read from my database because the library folder – where db files are placed by corona- was hidden. A lion OS thing.

Tried to list the databases from Terminal – got message
Error: unable to open database “data.db”: unable to open database file

Downloaded Lita to see if I could read the db file from there, but as Library folder is hidden, not possible to browse to the db file.

Googled the problem and found the answer in this thread: https://discussions.apple.com/thread/3841618?start=0&tstart=0

Open Terminal and write: chflags nohidden ~/Library

Now my corona generated databases are accessible from Lita

First 3 days with mobile development in Corona

DAY 1, I downloaded the Corona SDK and an lua editing plug-ing for Eclipse called Lua Development tools. I managed to start my  game project working titled “lovLetters” , based on a corona game template. (worried about redunancy in that code, but for now it suits my needs). I got the letter ‘a’ to display and added a touch listener to it that handles drawing on the letter.

DAY  2, worked with masking the letter and the drawing on top of it. Performance not good. Masking gave me some weird looking results. Got it working though, after making sure images (letter and mask) that were exported from Flash were both placed in 0,0. Started looking in to building for testing on physical devices. Hit the wall of IOS certificates.  Led me to upgrading my XCode to 4.2. Bit of a headache finding this for Snow Leopard.

DAY 3, Already registered as an Apple Developer it should be less than 24 hours  now, before I recieve the information I need from Apple to download and install needed certificates. While waiting I managed to add more interactivity to the game. Now registering the quality of the drawing and giving feedback accordingly. Also managed to optimize performance on drawing.

 

LEGO® Life of George – YouTube

A brilliant example by agency Hello Monday, of connecting smartphone interactivity with physical space activity. It’s a game that encourages users to be creative by building objects, and using the phone to validate creations. It’s costly and unsatisfying to simulate the environment needed to engage in construction themed play on a computer. With this app construction is moved to its native habitat and users engage simultaneously virtual and real life interactions. The two worlds coexists, sustain and complement eachother.

LEGO® Life of George – YouTube.

Jing – a neat little screencasting tool

Find jing here: http://www.techsmith.com/jing.html

Jing is a desktop app which is highly intergrated with the web. The user creates an account on screencasting.com in the install process, in return it’s extremely easy to share the content created using Jing.

Get Adobe Flash player


Providing your ftp information (including which directory you wish to use for video/images) in the jing settings, it’s possible to upload your content by simply pressing a button. No need to start an ftp client, locate the file in your archive and drag it to the right location on your webserver. A handy little feature is that in the same settings you can make sure that jing adds the filepath to your clip board so that that all you have to do is paste the URL where you need it to be. I use wordtube so I paste the URL into a field provided by the media>wordtube panel.

After