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.

Friday, 12 April 2013

Flash Builder 4.6 and Windows 8

When installing Flash Builder 4.6 on Windows 8, you'll find it behaves oddly when trying to import and debug an existing project. Bizarrely the debug button doesn't appear to run the app, and the window doesn't appear with your compiled Air app. The trace window oddly enough shows the app is running - but no visuals!

I suspected this was due to misconfiguration somewhere, but having recently done two Windows 7 installs and setups of Flash Builder I remembered not having to do this, so guessed it was a Windows 8 issue.

The solution to this (after looking through a lot of web forum postings - most of which didn't apply in my case as usual) was to make sure the application runs with administrator privileges. Presumably this was something to do with UAC, which of course I have switched off on my other machine.

To do this create a desktop shortcut to Flash Builder 4.6, and right click on it and set the options on its preferences.

Now working on Flex / Adobe Air Applications

Its been a while since my last blog entry. Of course all the Apple / Adobe Flash Furore in late 2011 caused me massive problems career wise - Although I'm still in a job, my colleagues have been drinking the kool-aid and believing the strategic business lies Apple has peddled over the last year.

Unfortunately Apple's stance on allowing Flash content on their iOS devices caused a major loss of confidence across the industry, mainly because management types didn't understand the reality of what was going on, and why Apple did it (to make money for themselves) and why Flash platform development still makes sense, and it IS POSSIBLE STILL - and makes sense (its cheaper!).

Twice I found myself explaining to the owner of our business why you shouldn't rebuild the wheel several times, this coupled with the availability of cheap labour overseas has made my work very difficult, as everyone seems to now think that HTML5 is the answer to everything.

Experience has told me that it is fraugt with issues, and a browser based technology just can't do what most applications need to do, e.g. save content locally, work when their is no connection etc, and of course access to other hardware on the machine. Our team has learnt this the hard way after not listening to me, both on a technical/workflow level, but also in terms of the additional financial costs of dropping my approach, which was cross platform for "native" apps.

Despite all the firefighting on a personal level - its now clear that this was productive on a career level, as Flex/Air Developers are still demanding a high salary compared to Flash Designers and Developers.

On a personal level, I decided that it was finally time to start working with Actionscript 3.0. Many legacy products and systems I had developed had stopped me doing this, as time constraints stopped me from learning so the last few new projects were a good opportunity to start working with the newer (now mature) technology.

Of course inevitably, a new project requirements force you to use AS3 - As a lot of features are either a) impossible to do with AS2 or too slow to be practical with the older technology, e.g. bitmap encoding, which was always very sluggish during uploads to a webserver.

AS3 is an odd beast, In some respects things are a lot easier - but in others, you end up writing a whole paragraph of code where it used to be a single line. But I said that about AS2 when migrating from AS2!

AS3 of course requires different tools. With Flash compiling is the usual simplistic approach, hit publish movie, the Flex development environment however is another matter, its a complicated jumble of configuration options. Even installing and setting up a project is not simple.


After 3 months of Flex/Air development - Its still not plain sailing. The configuration options cause tremendous issues when re-installing on another development machine, which if you're used to working in two locations makes work hard to setup.

I found FlashDevelop to be pretty tough to use, as it had no "WYSIWG" layout editor, which of course I'm familliar with from years of using Flash.

You still need Flash, as Flex/Flash Develop/Flash Builder has no ability to make complex layered assets - well apart from programattically using basic elements.

I've settled on using Flash Builder 4.6, although I do have access to 4.7 via a subscription to their Creative Cloud service, unfortunately it only gives access now to the "very latest editions" and after starting to use 4.6 and then rebuilding a Windows installation and setting up Creative Cloud again, which takes a whole day due to ridiculously long download times using the Adobe Application Manager, I suddenly realised the version I was used to had been replaced. This isn't an option for me. Unfortunately Adobe deprecated the useful "Design View" feature that helped to build a "State" view using drag and drop functionality and WSYWIG positioning using the mouse in Flash Builder 4.7.

Its strengths of course are the ease in which you can build an application using seperate components - of course you can build on 3rd party code, but as usual this itself is a nightmare as often examples of code don't work, they require a specific version of components / compiler languages etc - its not as simple as something just being "AS3"

I do like working with Flex, but to be honest despite its obvious advantages, for the beginner and experienced Flash Developer, its like going from being a bricklayer to an architect in terms of complexity.

This of course leads to other commercial considerations - I've found it pretty difficult to justify the timescales involved of course, during development - which is not suprising when the company you work for has blocked your learning time due to workload. Not only that, things that used to take me a couple of hours can take days now with Flex/Air.

Mind you, the projects I'm working on involve video, screengrabs, jpeg processing and Facebook integration - as I said to our project manager - this latest project is the most complicated thing I've ever worked on.

But as usual I'm up against non-technical office bods thinking that its easy to do chromakey effects and upload to facebook (doesn't it just take a few clicks?) I hear them wonder...

But I have to be philosophical about all this. History will show that cross-platform is the way to go - and after all the term "No-Pain-No-Gain" applies to this situation.

Thursday, 10 February 2011

The joys of the trace command

Isn't the Flash trace command brilliant for finding problems in your applications... Unless you have too much content going into the trace window of course!

In which case it kills your app during testing as all the trace commands execute. A useful method to avoid this is an obvious one, but could be useful to some novicecoders - do a search and replace for the phrase "trace" and replace with "//trace" this then sorts out the bulk of it. Make sure you save your work first!

Another tip I've worked out recently while working on massive 5000 line programs is to put the comment "/here" wherever in the code segment that I'm working on. This makes it pretty easy to jump about tp the salient sections in a lot of code whole you test and tweak your program.
Published with Blogger-droid v1.6.7

Friday, 20 August 2010

Flash Lite remote loaded .swf interactivity

Not sure if anyone has ever noticed this, but strange things happen with Flash Lite 2.1 when you try remotely loading a .swf with dynamic variable text fields.

If you export the seperate .swf as Flash Lite 2.1 - any parameters and variables calling values on the root of the main movie just don't work - also buttons don't operate in the seperate movie etc.

Exporting as Flash 5 results in a similar problem.

If you export at Flash 6 it does seem to function, well some parts do - buttons etc fine, but some parameters just don't change for some reason when that file is loaded in dynamically into the Flash Lite 2.1 environment - all variables and params that are referenced show "null", even though they might be targetted to:

_root.counter

Why would you need to do this I hear you ask... well I was trying to load seperately a readout debug style display, to save memory in my main application. Had to give up in the end because, although it saved a little memory, it made the tool uttely useless for diagnosing issues with the app and server!

Quite suprising this. I'll be glad to see the day when I no longer need to use Flash Lite, and we can export to full Flash 10.1 - although I still haven't read anything yet about how the new player handles mobile specific FSCommands, e.g. checking network status, triggering vibrate on the phone, etc.

Tuesday, 10 August 2010

Flash Text Field autoSize="center"

Had the usual problems with autoSize on fonts today in Flash Pro 8 and Actionscript 2.0. After making a text box react to content length and reposition itself vertically (I wish Flash could do that like DTP software does) using code, I found some text was always cut off at the end of the paragraph.

After some experimentation, I found the following solution: Applying a leading command in code sorts it out, width and wordwrap values obviously contribute. Hopefully the code below will help anyone else that has the same problem. The border command is useful to show whats going on with the size of the text box.


var my_fmt:TextFormat = new TextFormat();
my_fmt.leading = 0;
description1.setTextFormat(my_fmt);
description1.wordWrap=true;
description1._width=453.2;
description1._height=300;
description1.border=true;
description1.autoSize="center";

Thursday, 3 June 2010

FSCommands.. and Flash/Flash Lite export

Here's a weird thing I found today - if you have a Flash application, say originally built for Flash Lite 2.1 and you're suddenly asked to make it work on the desktop... The obvious thing to do is go to the export settings, change it to Flash Player 8 or whatever then publish.

What I found today is that ANY code on a given frame that has FSCommands on it halts code execution. So if for example you do the conventional thing and put all your Actionscript code on frame 1 - if there are FSCommand2s there - the whole thing just fails when compiled.

I tested this by putting a trace command in after the FSCommand after noticing the app just wasn't starting when exported to Flash Player 8 rather than Flash Player 2.1, which worked fine - a very odd thing indeed - and of course these weird findings are the main reason why I started this Flash Developer blog!

Friday, 14 May 2010

NaN errors

So much for modern "strict data typing" programming theory. I waste so much time debugging problems with scripts that are usually related to extracting data from XML, which is a string, then trying to turn it into a number using a pre-typed variable - only to find I end up with NaN.

Rubbish. Older programming languages, such as Atari Basic in my childhood had no such issues - they would throw an occasional "type mismatch" error if it went wrong or the data was unexpectedly a string instead of a numeric value. Of course that used to be fixed by using int(variable).

This modern approach fools the app and compiler into thinking everything is fine, but simply refuses to convert the variable properly, and populates it with the useless NaN value, which of course you can't do anything with!

This means a lot of value tracing in functions needs to be done to diagnose these problems  - then finally you can spot ity, and attempt various ways of converting the original values again until you get something sensible out of Actionscript.

Screw ECMA script conventions - more trouble than its worth.