Archive for the 'Flash' Category

20
Jun
10

A Flash spoof of Apple’s HTML5 page

This is absolute Gold!

http://www.flashlab.com/html5/

Bravo to those that created it; you’ve made some very salient points with the examples and comparisons given.

Now we just need to ensure that the same number of people (including Managers and tech decision makers) that read the dribble Apple’s CEO posted a few months back could see and experience this site. And hopefully they can if the Flash community band together with the aim of setting the facts straight.

16
Jun
10

FileReference.load() - keep it in scope!

Just a quick note (possibly to self) that when dealing with FileReference you need to ensure that the scope of the FileReference is maintained. This was mentioned in the Actionscript documentation, but it took me a while to figure out that that could be the problem for my code failing silently. Originally I thought it was because I wasn’t using the right playerglobal.swc from within Flex, or that I couldn’t export using Flex SDK 3.2 (as this method is a Flash Player 10 one). It took me a while to reread the documentation for the load method and comprehend that perhaps I needed to declare some instance variables instead of local ones. Some code will hopefully illustrate what I mean:

public function uploadImage():void
{
	var __imageTypes:FileFilter = new FileFilter("Images (*.jpg, *.jpeg, *.gif, *.png)", "*.jpg; *.jpeg; *.gif; *.png");
	var __fileRef:FileReference = new FileReference();
	try	{
		__fileRef.addEventListener(Event.SELECT, onFileSelect);
		__fileRef.addEventListener(Event.COMPLETE, onFileOpen);
		__fileRef.browse([__imageTypes]);
	} catch (error:Error) {
		trace("Unable to browse for files.");
	}
}

private function onFileSelect(event:Event):void
{
	trace("onFileSelect called");
	var fileRef:FileReference = event.target as FileReference;
	fileRef.load();
}

private function onFileOpen(event:Event):void
{
	trace("onFileOpen called");
	var fileRef:FileReference = event.target as FileReference;
	var data:ByteArray = fileRef.data as ByteArray;
	var encoder:Base64Encoder = new Base64Encoder();
	encoder.encodeBytes(data);
	trace(encoder.toString())
}

The problem with that code is that the original __fileRef variable is only available within the uploadImage function. As soon as onFileSelect is triggered (which works fine), fileRef (a new local variable within this function) trys to call load(). This was failing silently for me.

So instead of declaring the original __fileRef variable as a local one, I’ve declared it as a private variable in the class. That way it’s always in scope!

27
May
10

Flash 10.1 - Failure is not an option

In light of the recent debate sparked by Steve Jobs’ comments regarding Flash and it’s perceived weaknesses I thought I’d take an opportunity to make it patently clear - the perception of Flash is that it’s a slow, memory and cpu intensive, battery sucking sun of a gun!

Now while I found it relatively easy to pick apart what Jobs said in my previous post, there’s certainly a long way to go to convince the rest of the tech world that the things he’s saying are false. It seems that Adobe are putting a good percentage of their eggs in the Flash Player 10.1 basket as a sign to all those interested in the debate that they are trying to address all (or most) of the issues that have been raised. My fear is that if this release isn’t the golden hair child that Adobe’s making it out to be, then we’ve got a bit of a case of the boy crying wolf on our hands.

The more I read (and I’ve been keeping close tabs on what both sides are saying), the more I see the battle lines are being drawn based on a lot of misinformation. Or more succinctly, the naysayers are not aware of the work that’s been going into 10.1 - fair enough I suppose, you’re only as good as your last innings…

So it’s for this reason that the only thing that really matters is that this latest release gets beta tested to buggery, delivers on the feature-set and enhancements that are being touted, and the millions of other Flash developers out there continue to have a livelihood that doesn’t involve jumping through hoops that are wasteful, and frustrating.

I’m slightly miffed that it’s taken a massive kick in the pants by a competitor (though perhaps that’s always the way…) to open Adobe’s eyes to some of the more regularly complained about issues with Flash. The issues that are now trying to be addressed aren’t new, they’re issues that Flash Designers and Developers have been on Adobe’s case about for many years … so long as their eyes are now open (and remain so), well I suppose that’s a start.

I can’t remember a tech issue that’s gotten me this energised for years! So I’m looking forward to seeing what devices start to utilise the forth coming Flash Player, and how they (and there battery life) perform.

Failure is not an option.

30
Apr
10

“Everyone wins” - ya f#%king what?

Steve Jobs, in his recent enlightened rant regarding Flash said that as a result of barring Flash from all of their mobile devices the following would occur, “Everyone wins - we sell more devices because we have the best apps, developers reach a wider and wider audience and customer base, and users are continually delighted by the best and broadest selection of apps on any platform.”

Let me pull apart that sentence, and impart what Steve actually meant. Which is, “we (Apple) sell more devices”.

Surely the best apps in the world are created by developers that have been plying their trade for more than 10 years now. Why on Earth would you choose to isolate them from the development process if you were truly after the best applications.

Surely reaching the widest audience, actually involves reaching the widest audience - not some bizarro subset that Steve Jobs deems appropriate (users are smart enough to make their own decisions about what technology they should and shouldn’t use - making the choice for them is denigrating and anti-competitive). Apple will likely get what’s coming to them in a form of a law suit and a lot of bad press.

And surely users would be delighted to choose from millions of applications from the best and brightest creative minds on the planet, rather than only being able to choose applications built by developers suckling at the teet of Apple and it’s proprietary Mac hardware and software.

So be under no illusions folks, the only potential benefactor from Steve Jobs’ lunacy on this matter is Apple. Plain and simple.

And I for one will be having no bar of it.

As developers of the applications, we have the power to steer our own destiny. Sure Adobe need to pull there finger out on a few of the points Jobs has made in his post (reliability, security, performance, touch) but as far as I can tell the latest version of the player will attempt to address these issues. And boy oh boy if it does, Apple can kiss good bye to any lead it enjoys on the Apps store front and the i/phone/touch/pad front - ‘cos the Google Android express (which is truly an open platform) is coming through. The guile of the man to even hint at one of the issues with Flash being it’s proprietary nature, when everything that Apple does is controlled with an iron fist is (and I’m definitely not the first to use this phrase in regards to his post) the pot calling the kettle black. I’ve never really understood what that old saying actually means, so perhaps I’ll just say that they’re being pretty blood hypocritical and leave it at that.

So when Adobe team up with the other platforms (Google, Nokia, Sony Ericsson, et al), and forge ahead with a truly cross platform Flash player - Apple will be left wondering how it can have screwed the pooch so badly… for the second time in it’s history. The sooner this happens the better for me - the Apple’s been bad for a while now.

(Update: here’s a great video that has Adobe’s CEO Shantanu Narayen rather elegantly sticking to the company line, at the same time making Jobs look like he’s thrown all of his toys out of the pram).

09
Feb
10

My babies alive!

http://www.wrench.com.au/

Initially built using AS2 but never launched in 2006 (due to time constraints i.e. doing real work), the domain that was supposed to showcase my wares remained as a coming soon page for nigh on 4 years. Finally the bullet was bitten in the latter part of 2009 and the decision to port the entire site to AS3 and utilise the Gaia framework was made. Within 4 weeks, a fully functional, SEO compliant, user accessible site was finished and launched. Kudos to Steven for the framework, rock on Gaia!

Feel free to leave any comments you’ve got about the site; be they good, bad or otherwise…

Wrench screen grab

20
Oct
09

Loaded swf obscuring mouse events in overlapping movieclips

Long time no read. Been busy with a large Flex project, plus I’ve been trying to see a bit more of Europe - but thought it was about time to get back onto some blogging. That and I’ve come up against something that I can’t seem to figure out (and it doesn’t look like anyone else has either from the amount of Googling I’ve done looking for a solution).

Basically what I’m doing is loading an swf with an image in it, which loads over the top of another swf which has some navigation elements in it. What is occurring is the swf on top is preventing any mouseover events from reaching the buttons below the image. I’ve zipped up a test archive to try and illustrate what’s going on. If you run test2.swf, and then mouseover the part of the orange square that intersects the green square, the green squares mouseover event should fire. I’ve set mouseEnabled = false on the orange square, but the fact that it’s in a completely different swf seems to mean that this doesn’t have any effect. The part of green square underneath the orange square is simply not receiving any events.

I’m actually using the Gaia framework, so it’s doing all of the loading of the swf’s. And I thought possibly setting the ApplicationDomain of the swf’s to be the same would mean things would work - but it didn’t. So if anyone’s experienced overlapping assets in two different swf’s interfering with mouse events then please let me know in the comments below.

01
Jun
09

Flash Catalyst or Catastrophe?

I’ve been watching the large number of blog links regarding the news from Adobe labs that Flash Catalyst is now in public Beta; naturally I had to download and have a go myself.

My first impressions are not good.

It seems like they’ve decided to invent their own usability best practices for the tool shortcuts. Where the hell is the pan tool? Why doesn’t holding the space bar and then using the mouse to scroll perform a pan? Keyboard shortcuts for delete don’t seem to work in the layers panel. Where is the align panel? Do I really have to right click an asset and select an align option from a dropdown? It’s a real mouseathon in the program at the moment. These aren’t really things I see as Beta related, they should just be in the app - which they are in any other CS4 product, so I’m mystified how these issues got through QA to this stage.

Probably the biggest issue is the speed (or lack thereof) of the program. Trying to edit a button’s state is painfully slow. I’m not sure whether this is to do with my system (dual core 2.4Ghz with 4Gb RAM on Vista) but I’d like to know if I’m the only one who thinks the program runs painfully slowly.

Aside from the usability and productivity issues I’m still at a loss as to why the CS4 core wasn’t used for this (or was it?) and even why we need a further dilution of the Flash product base. Surely Flash CS could be re badged as Flash Designer and the Catalyst toolset integrated (I realise I made that sound easier than it would be, but as it stands the introduction of this third tool looks like more of a money grab than anything else). This would go nicely alongside the newly re badged Flash Builder (which incidentally looks very good, so kudos to the Flex team).

I haven’t upgraded to CS4 as yet, and it’s for some of the reasons above that I haven’t. I just don’t know where the Flash products are headed, and quite frankly if this is where they’re going I may jump ship completely onto HMS Flex and let the “designers” out there handle getting the assets I’m after into a state in which I can use them. Though the right side of my brain may have something to say about that statement…

15
Jan
09

as3 casting issue

Either I’m going slightly mad or casting using the “as” keyword works differently to the old way of casting.

Here’s some code to illustrate:

showFormItem = (((e.target as CheckBox).selected as String) == _local.displayTriggerValue[i]) ? true : false
Now this gives a different result to:
showFormItem = (String((e.target as CheckBox).selected) == _local.displayTriggerValue[i]) ? true : false

WTF?!

I’m pretty sure I’ve got my brackets in the correct spot.

Yhelp!

18
Nov
08

The all encompassing Flash Platform

Seems we’ve come a long way from the days of Flashkit users (ahh the memories ;-) asking whether Flash can be connected to a database. Now the questions is more likely to be what can’t Flash be connected to!

The formalisation of the Flash Platform helps to answer the later question, and to be honest there’s not a lot it can’t be connected to according to this image!

This is just one of the many things to have come out of the MAX conference thus far. Looks like the marketing/corporate relations team has had they’re work cut out for them, issuing 8 separate press releases yesterday!

I’m off to read about what else has been going on at MAX…

16
Sep
08

Flash Player ate all the pies!

I just checked out the latest Flash Player release candidate and was interested to see that the file size of the Mac and Linux versions are over 5.45Mb and 3.8Mb respectively. The PC version is still under 2Mb (which is very small for what it’s now capable of).

That got me to thinking about a few things. What were the average player sizes for the last few Flash Player releases? This led me to the Flash Player Archive page on the Adobe site. I downloaded the Flash 7, 8 and 9 archives and got to knocking up a quick average of the player sizes. Rather strangely there’s Linux releases in the Flash 7 archive but none in the Flash 8 archive (which I later discovered was due to there being no Flash Player 8 for linux per se as they went straight to 8.5)

Here’s the rough figures:

Note: I’m using the .zip, .exe, .hqx, .dmg or .tar.gz size not the actual size of the player inside the archive. Obviously this isn’t terribly scientific but I wanted to get a general guide to the increase in size of the actual single file end users have to download to install a player.

Flash 7 Flash 8 Flash 9 Flash 10
ActiveX
0.75Mb* 0.83Mb 1.33Mb 1.80Mb
Plugin
0.69Mb 0.95Mb 1.43Mb 1.76Mb
Mac OS X
1.68Mb (PowerPC) 1.42Mb (PowerPC) 2.10Mb 5.45Mb
Linux
1.00Mb no stats available 2.83Mb 3.78Mb

* There was a 300Kb decrease in size from the initial release to the final release of this version of the Player

So that brings up a few questions. Why is the Flash Player 10 Mac release so much bigger than the Flash Player 9 one? Is there a lot more code optimisation still to do for this release?

The Linux version also seems to be getting bigger relative to the PC version. Is this because the PC version can utilise functionality already available to it in Windows, or…?

Is there a magical size that if the Flash Player were to exceed, users would be less inclined to download it? Or even if the Player was 10Mb it would still have the same penetration it currently enjoys?

Lots of things to ponder, and comments to make!




Categories

Recent Comments

Posts this month

September 2010
M T W T F S S
« Aug    
 12345
6789101112
13141516171819
20212223242526
27282930  

Archives