About Me

My photo
Derek lives in Wall Street, Lee-Over-Sands, St Osyth. A mobile and event software/product designer by trade - and is keen to improve things for all the local residents - and has lived in this idyllic location since 2009.

Wednesday, 21 October 2009

Buggy Flash Text Fields!

Yet another strange Flash issue. Today I had problems with a dynamic text field that just refused to show a £ symbol - I tried everything, embedding the font, setting the html text parameters, and even forcing the textFieldmc.html=true value in Actionscript before populating it.

Nothing worked, Googling didn't help either, then I remembered that I'd had this problem before, and the solution is to delete the text field completely and re-create it again using the Flash UI Text tool.

Hey presto. It works now.

Nice bug Adobe ;)


Monday, 19 October 2009

Google Wave goodness

There are some really "out of the box" thinkers at Google... and this sort of thinking really changes the world eventually, once of course people "get it".

Of course not everyone is ready to change their habits, working practices or software clients - sometimes its a quantum shift, other time its a small release that gradually gathers momentum, like Firefox, spreading virally by word of mouth. Facebook did it because of simplicity and mass appeal, so it success was guaranteed because of everyone using it.

Gmail too, and even the Iphone were similar "game changers".

From watching half of their video presentation about their product, as a remote worker, I really think over the next 2 years, Google Wave should also end up as an essential group working tool. Forget trying to manage your day's work with an exchange server, this could be the future..  And it is perfect for collaboratively building documentation or any group docs for a team of workers.

I haven't tried Adobe's collaborative offerings though so I can't compare it with their one...


http://wave.google.com/help/wave/about.html#video

Sunday, 11 October 2009

Gmail and Facebook sluggishness

Cloud computing is supposedly the way of the future, but I often wonder how practical it really is when relatively simple online services like Gmail and Facebook start reacting very slowly... recently I've been getting used to seeing the "working..." or "loading..." message at the top of Gmail on a regular basis.

Perhaps they've become victims of their own "free" success.

Or my O2 Broadband might be playing up (as I'm a fair distance from my exchange). Pretty sure not as other servers seem to work fine, so I don't think its ISP related.

Saturday, 10 October 2009

Text Alignment issues

Here's another Flash odd behaviour. Lets say you have a movieclip template with a dynamic text field. Lets say you want to dynamically work with said text field and scale it, then reset its alignment e.g. "left", "right", "centre" using text.align?... And it doesn't work.

You're confused because the code syntax is fine and you've followed the manual documentation to the letter...
var format:TextFormat = new TextFormat(); format.align = "justify";

If it doesn't work as expected and always stays left aligned, After a bit of head and wall banging, I discovered that this bug is caused by the "Line Type" box settings for the object in the properties window... if this is set to "single line" it won't react to your code - changing it to "multiline" makes it work, and your align code will suddenly work properly!

Adaptive Resolutions

Its amazing how much work you have to put into the simplest things sometimes with Flash. Recently I was working on a Plasma/Projector screen app, and the client announced that his projector was 4:3 ratio. Being a forward thinking (or so I thought) chap, I had originally designed the app to run in "Full HD" e.g. 1920 x 1080.

Now Flash fullscreen .exe files are lovely beasties, and suffer few connectivity and sandbox security issues than a browser based flash app (mainly because it is implied that the use ran the .exe so wants full network access). This also means, as long as you make all your elements as vector graphics as I do, it scales beautifully and automatically, whatever the resolution.

I found a really odd situation - after thinking through the best approach I decided that the app should detect the height of the Flash Player .exe window, then use code to top align the stage, and use deeper page elements. Sounds simple doesn't it. Well as usual with software development, it wasn't - and that is where the problems began. After a few experiments and head scratching, I found some code that I'd used on our touchscreen building software I built a while back, that listens for a change in window size, although that used Javascript from the browser to transmit the size into the flash movie, which then reacted with the incoming data. Being an exe file, with no browser, obviously that technique wouldn't work in the same way. However - It seems that the only way you can do this is turn off Flash's automatic scaling feature.

Now this would be fine, except that the "design size" was HD, so when this param goes on, zap, most of your design is offscreen on a low resolution monitor... Grr... I don't want my content going off screen thankyou very much!

What a nightmare. In the end, I opted for the quickest solution, remove the auto-sensing feature and stick a parameter in a locally loaded text file saying screenAspectRatio="4x3". Then the staff setting up the kit onsite can look at the screen and decide on the format, changing the text file params to "16x9".


I'm pretty sure there is a chance it can be done automatically though, I mused over switching the parameter off, measuring it and switching it back on, but that seems daft, The main issue is that it seems there just isn't a usuable parameter you can interrogate to return the window size unless you turn off automatic scaling.

I have a few forum responses to check - as its always best to see if anyone else is trying to do what I'm doing, however most Flash developers always work on the web, it seems few build standalone applications.

Of course the mantra here, that I've learned over the years in the commercial world, with short deadlines - sometimes you have to compromise, if only for the short-term to get a job done.

Friday, 9 October 2009

Iphone development

Some recent news has piqued my interest... After recently trying to pick and choose between potential 3rd party Iphone developers to reverse engineer my Flash Lite application built for our VPAR Live Golf Scoring handset application that I built last year, and the fun of downloading both my code and system design into somebody else's head - There might be another alternative. My colleague Tom Mason, who built and designed the server architecture for the VPAR system pointed me in the direction of an official Adobe Labs video about the subject.

This means its a rumour no more, and Adobe and Apple have obviously been slugging it out in a dark room to reveal a final result. Flash will apparently in the Beta release due end of 2009 of Creative Suite 5 export directly to build Iphone applications...
The theory is that its going to be a compilation option (similar to export to .exe) from the Flash IDE 

Wow... thats great for me and lots of other Flash Developers.


The big questions are:
1) Will you need expensive Apple kit to use it
2) Will it compile older Actionscript 2.0 code, or only Actionscript 3.0

Personally I hope it supports AS2, otherwise Adobe, although always pushing their latest tech will prevent developers like me from easily re-using and publishing older apps without extensive rework.

Its exciting news, I've always been sceptical over the last year with all the talk about Flash for the Iphone, so this delivery method via the Apple App Store for Iphone means that the Cupertino boys are still in control of their beloved "Jesus phone" and more importantly it will keep them supplied with loaves and fishes still.

More about me... who is Derek Foley?

I am currently a company Director with Red Digital, who specialise in bespoke software solutions for live events as their Head of Product Development.

I've worked for several large and small companies over the years, across different industry sectors from Print to Website design, Property Multimedia and finally Mobile and large scale display system development. Some of the companies I've worked for over the years include Polestar Whitefriars, Dynamic Webs, Spain Homes, Interlink Marketing Systems, XComplete, WIN (Wireless Information Network).

Flash Oddities... Part One

Here's an odd bug I've found the other day with Flash CS3. If you create a dynamic text field and forget to embed the font, if you try alpha blending its parent object programattically, you'll find that the whole object alpha fades apart from the text object!

Took me a few moments to realise what was going on! So if anyone else has this problem, check your font/character embedding options. Bit of a strange rendering behaviour that one!

Welcome to my blog - derekcfoley - confessions of a Flash developer

Hi there, I thought I'd share some of my experiences in Flash development with the online community. After going through good times and bad with Flash, I've finally decided to write a blog to share knowledge and hopefully some of technical pains I go through with Adobe Flash posted here will help someone else out!