22
Aug
10

Passing a value object as a parameter to amphp’s browser

Unfortunately I don’t have the answer on how to do this, and after a bit of Googling it seems like I’m not the only one.

Getting VO’s from AMFPHP back into my Flex app as strongly typed objects is fine. Sending a single VO to a method in AMFPHP has me somewhat bamboozled though, given that this makes the Browser then only want to take a single parameter as well (which makes life a bit difficult for testing purposes).

My initial idea to get around this was to modify the service browser to detect when a parameter of a service method was actually a VO object. Then instead of letting the Browser just display a single textinput field (which would require an object with the same type as the VO you want to use - something I’ve got no idea how to do by text alone in the browser), each property of the VO would instead be displayed as it’s own individual textinput field.

Has anyone else been sending VO’s to AMFPHP and still made use of the Browser in their setup? Please drop us a comment if you have.

28
Jun
10

Be careful source controlling Flash Builders html-template folder

As the title of this thread suggests, svn’ing the html-template that Flash Builder relies on to generate the container html files can lead to some headaches. One in particular that has just taken me about 5 hours to solve.

I’ve been migrating my SVN repo over to Springloops (check it out if you haven’t already) and decided to add the html-template folder to source control. Made a few commits, then got to building a deployable swf and that’s when the shit hit the fan. From what I can ascertain, Flash Builder was copying whatever was in the html-template folder (which included the .svn metadata folder) into the build folder. As everything in the build folder was versioned as well (so I can one click deploy to staying and production server) bizarre things started happening when I tried to commit things. In hindsight I should’ve cottoned on to the fact that Flash Builder was actually copying and pasting the html-template’s svn data into a folder that it shouldn’t have been. Of course, hindsight’s a wonderful thing ;-)

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!

09
Jun
10

why no AIR store?

Does anyone else find it odd that there’s no Adobe backed central repository for distributing AIR applications? I know that the Central runtime never really went anywhere (apparently due to the technical limitations of the users computer at the time).

So is the world ready for a centralised, built for developers, run for users AIR (dare I say it) App store?

Perhaps it’s time to feed Apple a bit of it’s own medicine, pretending to be innovative in an area that quite clearly has already been done - just not marketed properly.

This time around however, I think Adobe (and it’s throng of Flash developers) can cling to the coattails of Apple’s App Store - but with the promise of being able to use the application across all devices that have the Flash Player installed.

I’m hoping that the latest Flash Player version will allow this to become a reality.

If anyone’s got information about businesses that have already tried to monetise this please add your comments at the bottom.

UPDATE: I’ve been reliably informed by Tink in the comments that there is an Adobe AIR Marketplace. Possibly the fact that I don’t know about it means that there’s still a bit of marketing work to be done somewhere.

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).

16
Feb
10

Flex 4/Air Unit and Currency Converter

This is my first foray into using Flex 4, and it takes off from where I was at with my Converter application (as mentioned here, here and here) back in September of 2006 (shizzer time flies!).

I’ve changed the currency conversion to use Google’s Finance site, which means far more accurate conversions are occurring now.

I’d like to make it so you can select multiple currencies and convert to them all at one time. Also with the ability to remember the settings that you’ve used.

If anyone else has got any ideas about features they’d like to see just leave me a comment.

You can view the web version of the converter here www.wrench.com.au/converter

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.

Or you can install the Air app by clicking on the install badge if you’d prefer to have it on your desktop.

I’m using Flash Builder 4 Beta 2 to create this app. I’ve had to setup 2 projects to export both the web and Air version of the converter. If anyone’s got any tips on doing this from a single project then that would be appreciated. I suppose if it was a more complex piece of code, then there’d be some benefit in splitting the codebase, as it is this just adds a hurdle in the way of a smooth development process.

I’ve also given up on trying to fix the security issues I was having with accessing an external link on a 3rd party server for the currency conversions (as detailed back in the first three posts I made on the converter). I’ve got a php proxy page on my server instead which calls the google site and then returns the results to the swf. This only occurs for the web version though, the Air one connects directly to Google so is about 250ms quicker on each currency conversion.

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

23
Jan
10

Obama’s Approval Rating - Non US citizens have your say

I’ve been interested to see the response to President Obama’s approval rating dipping below 50% and it made me wonder, what if the rest of the citizens of the world got a say in this rating…? So now I’m giving you that chance! If you’re not a citizen of the US, how do you think the President is handling things?

One things for sure, he’s doing a damn site better job than that last clown that was voted in twice!

The Polls below, just select Yes or No and then the Vote button.

Have at it!

[NON US citizens only please] Is Barack Obama doing a good job as President?

View Results

Loading ... Loading ...




Categories

Recent Comments

Posts this month

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

Archives