Home

Follow Skinkers.

 

Flex

6

Could not resolve <s:states> to a component implementation.

February 2nd, 2011 | AS3, Flex | Matt Bryson

If you get the error “Could not resolve <s:states> to a component implementation.” on a Flex component, it might be that you are extending a Spark/Mx component and the compiler loses the scope / namespace of the states.

A simple fix is to use the namespace of your sub component instead of the spark / mx namespace. eg…

<?xml version="1.0" encoding="utf-8"?>
<view:MyComponent xmlns:fx="http://ns.adobe.com/mxml/2009"
	xmlns:s="library://ns.adobe.com/flex/spark"
	xmlns:view="com.domain.job.view.components.*"

	<view:states>
		<s:State name="LOGIN" />
		<s:State name="WELCOME" />
	</view:states>

</view:MyComponent>

m.

0

Adobe AIR window won’t show external HTML/SWF in HTML Component

January 13th, 2011 | Air, Flex, Geekery, Tech | Matt Bryson

We had a challenging situation on our hands this week.

We are building an AIR application for a client, that has an HTML control in one of the windows and this HTML control loads up an HTML page with an embedded SWF, both locally hosted within the application domain.

In the prototype for the app, all worked fine. However, once we started to build the final application, the external SWFsuddenly failed to load!

The HTML page loaded up fine, and we could execute javascript from it but the SWF would not load at all. For some reason the HTML wrapper was simply refusing to load it.

Read the rest of this entry »

4

Memory Management in AIR / AS3 / Flash Garbage Collection.

October 8th, 2010 | Air, AS3, Flex, memory management | Matt Bryson

Memory management and garbage collection in Flash Player is a well debated topic. Some think that the Flash player’s garbage collections is, well, useless. Others think that most flash developers simply don’t understand it and their poor code causes memory leaks.

I’m not here to get into all that, its probably a bit of both anyway, but needless to say it will cause even the best Flash / Flex developer a headache or two at some point!

There are some good resources on Flash player garbage collection -How the GC works and How to kick start the GC in Air, so read up on those first if you haven’t already.

Below are our recent experiences with an Air application that did not release memory when a window was closed.
Read the rest of this entry »

4

Adding Gzip support for Flex/AIR HTTPService/URLLoader

September 2nd, 2010 | Air, AS3, Flex, Geekery, Tech | Matt Bryson

Update : Thanks to Paul Robertson for pointing out that as of AIR 2.0.2 released a couple of weeks back, there is native cross platform GZIP support in Air. However, if you need to achieve this in the 1.5 runtime for any reason, the below is still applicable!

To reduce bandwidth many servers compress HTTP responses using GZIP encoding. Pretty much all web browsers support GZIP decoding, so the actual data transfered is a fraction of the final unpacked response. Flex/Flash apps running in a web browser can take advantage of this as the browser handles the HTTP responses.

However, Flex AIR apps which do not run in a browser don’t have this luxury. By default, the headers sent in a request from AIR do not accept GZIP encoding, and even if they did, Flex / AIR runtime has no idea how to handle GZIP de-compression!!

Thanks to the Flex community however, it is possible!
Read the rest of this entry »

1

Skinkers Develop Urgent Care Dashboard for NHS

August 6th, 2010 | Air, AS3, Flex, Releases, Tech | Tim Heyes

Skinkers release cross platform dashboard built in Adobe AIR to help patients choose the appropriate care based on real-time and location-based data.

Today Skinkers announce the launch of the UK’s first digital Urgent Care Desktop Dashboard.

Created by virtue of a joint innovation venture between Skinkers, NHS Choices, Directgov and Businesslink, United Lincolnshire Hospitals NHS Trust and NHS Lincolnshire, the tool is aimed at making the choice of which NHS service to use a little easier.

United Lincolnshire Hospitals NHS Trust patients can now download the cross-platform desktop app for free from the UHLT web site (http://www.ulh.nhs.uk/for_patients/urgent_care_tools.asp) and use it to access information about getting the right treatment in the Lincolnshire area.

Read the rest of this entry »

0

Flash Builder 4 Profiler – unable to connect to the application to fetch profile data

August 2nd, 2010 | Flex | Matt Bryson

Found a very odd Flex Builder / MS Network bug today. The profiler wouldn’t run, and reported
“unable to connect to the application to fetch profile data. Please try profiling the application again”.

It turns out that on my home machine, everything ran fine, but on the office machine the profiler just plain refused to start up. After some googling I found that it was to do with the office network, Active Directory and my Home Drive.

Read the rest of this entry »

0

Flex stylesheet namespacing issues

July 26th, 2010 | Air, AS3, Flex | Adam Maloney

Last week I discovered a  rather annoying bug with Flex’s implementation of CSS.

When you create a class selector, either the compiler or the VM seems to completely ignore it. Not really really a show stopper, but when you handling multiple components with stylesheets it can be a bit frustrating when they aren’t behaving properly.

These for example:

Component1.header {
  color: #ff00ff;
}
Component2.header {
  color: #333333;
}

Flex completely ignores ‘Component’ part and just uses ‘header’, so will overwrite and use last one defined for all components using styleName=”header”

Even across separate MXML files and global CSS files the last one specified will overwrite previous ones.

One way to avoid any conflicts is ditching class selectors and stick with using unique names.

Component1-header  {
  color: #ff00ff;
}
Component2-header {
  color: #333333;
}
2

Flex File upload with PHP issue : uploadCompleteData has empty data

June 15th, 2010 | AS3, Flex, PHP | Matt Bryson

We got stuck on a strange issue recently when trying to upload a file to a server using the Flex FileReference class. The file data was sent to a PHP script that processed the file, and then returned some information about the file as a response. What we found was that it worked fine on a PC, but on a MAC when Flex received the response in the uploadCompleteData handler the returned data was empty! Turns out extra white space after the php tags in a php include caused the issue.

Read the rest of this entry »

0

Flex setter function not running when setting a property.

June 11th, 2010 | AS3, Flex | Matt Bryson

A small issue that might cause you headaches in flex – setting a property where the setter will only run once. It’s usually caused by flex being clever, but you can easily work around it.
Read the rest of this entry »

0

Flex Effects with Pixel Bender filters, part 2.

March 21st, 2010 | AS3, Flex | David Spanton

This is the second part of a series on using Pixel Bender to create effects in Flex. In this part I’ll go through making a simple filter in Pixel Bender that can be used to animate an effect in a similar way to the last post.

You can get hold of a copy of the Pixel Bender toolkit here and also get hold of a lot of good reading material to get started using it.

Read the rest of this entry »