Written by

I found an interesting couple of issues today whilst working with Popup’s. Due to time this post is brief but to the point and below is a link to an example (with source) of the issues with fixes.

1) Firstly I was passing an Object to the Popup with the data to display and discovered if this Object data is a String of HTML text to be displayed in an TextArea then casting the Object to String causes the HTML text to be rendered incorrectly. Quick Fix: Cast Object to XML then to String.

2) Secondly I had an effect on the closing of the popup window and noticed that the modal layer beneath the popup was being removed after the popup effect had finished and ultimately removed which looked cr@p. Quick Fix: Dispatch a flex hide event from within the popup when the closing animation method is called.

Popup Example

Written by

I have recently created a new GitHub repository for my code seperation of Alex Harui’s combination of Spark List components to build a datagrid. As my notes say:

I have basically taken Alex Harui’s example from http://blogs.adobe.com/aharui/2009/12/spark_list_spark_list_spark_da.html and broken it up into more bite size chunks, added some styling and various other attributes to try and make it more flexible? Here is an example application using the source http://demo.newtriks.com/ExampleSparkDataGrid/

SparkDataGrid

SparkDataGrid

This is by no means perfect but I did manage to get some sort of separation to be able to use in a couple of projects quite nicely and as a simple grid it works fine, have a play and fork the project to offer some improvements.

Written by

I had a head banging moment last night trying to help a mate out to stream an FLV from Akamai (also seen on Wowza) using the latest Spark VideoPlayer component. We had a working flv streaming in the old mx:VideoDisplay absolutely fine, update the component to the Spark equivalent and nothing, nowt, nada, not even a glimmer?

1
2
// OLD MX COMPONENT - WORKS FINE
<mx:VideoDisplay source="rtmp://myserver.com/my_application/my_stream.flv" />
1
2
// NEW SPARK COMPONENT - DOES NOT WORK!!
<s:VideoDisplay source="rtmp://myserver.com/my_application/my_stream.flv" />

My first thought was I that when the component was upgraded, the syntax was changed for defining the source string? After a chat with Stefan he also mentioned that as the VideoPlayer/VideoDisplay is now built on OSMF this would most likely be the case.

I then started looking through the docs to find out what the syntax is for streaming an FLV in the latest spark components (a fairly common practice I would have thought), damned if it was a quick find for me! The typical example I found was as below:

1
source="rtmp://fmsexamples.adobe.com/vod/mp4:_cs4promo_1000.f4v"

Then we started playing with DynamicStreamingVideoSource and I stumbled over the thought that I should dig into OSMF documentation more and eventually found the solution but buggered if I can find it again and I flippin’ forgot to bookmark (there may be alternatives but this worked):

1
2
// WORKS!!!
<s:VideoDisplay source="rtmp://myserver.com/my_application/?streamName=my_stream&streamType=flv" />

Written by

I have stumbled across an old fix I found for a problem I had with an mx:ComboBox ages ago and thought it worth while blogging about. Basically I found that if I bound an ArrayCollection to the dataprovider of a ComboBox and then changed the contents of the ArrayCollection, the ComboBox would not update? I tried all sorts of things i.e. itemUpdated() on the provider/collection, invalidateProperies/DisplayList on the ComboBox and so on to no avail. I originally found that setting the prompt attribute in the ComboBox caused the issue but on building a quick example application I found that with or without the prompt it still fails to update. In fact its even odder without a prompt, the selected item changes but not the content within the dropdown???

Read on →

Written by

I have used the below logic repeatedly now for processing Flash Vars in my Flex 4 applications which others may find useful. In the example below I use it in a service class. Basically I define a custom value object with the flash var properties defined. I then loop through the available parameters in the loadParameters() method using a [Transient] array which returns the name of each parameter.

Read on →

Written by

I have been working on some further ANT scripts recently on my Ant-Funk repository that tests out integrating Github logic. Thanks to an old friend Mark Lowe who helped put together an nice git-task ANT script I have managed to run the core common Github related tasks i.e. initialise a directory, add, checkout, commit, push, remote add and check current revision in a local repository.

Git-task ANT Scripts

Git-task ANT Tests

I have written some test scripts that all work fine, running the ANTUnit build file works a treat, however, it’s kinda cheating as I am yet to fully add assertions to some of the tests. Due to lack of time I basically just wanted to get some simple scripts to test each bit of functionality individually to ensure it all works. I have been struggling to come to a definitive decision on how to pass/fail some of the tests due to committing to remote repositories etc, if anyone has some suggestions I would be appreciative, I am not sure if revision checking (on a push) is the best logic?

It’s been a tricky one getting some further understanding of how Github works and why some of my tests just would not work. For example, I was initialising a directory then clone/pulling into it which would fail, doh! This was because when you clone/pull the project folder is created and initialised, obvious really….

I will post up an actual example of how to use them in a project as I am yet to do this myself. I hope they are helpful for someone out there.

P.S. Props again to Mark Lowe for your help on this and also the blog post he got some source code from (and I used the revision comment by Timo).

Written by

I use an ergonomic mouse (Evoluent VerticalMouse) which doesn’t function to it’s full potential on Mac OSX. I then discovered a USB driver called SteerMouse which recognises my mouse fine but comes with some extra functionality which proved to be both useful and time saviing (an alternative driver company is USBOverdrive).

In a nutshell there are configurable commands that can be triggered by any button on your mouse:

Read on →

Written by

Dan aka PolyGeek has reminded me that I have been meaning to write a short post about using a darker theme in Flash Builder. In IntelliJ IDEA I use the fantastic Dark Pastels theme by Ted Wise but for Flash Builder a.k.a Eclipse I could not find a similar theme (ok thats a lie, I found some dark themes but it wasn’t to my liking). So I decided to tackle the arduous task of going through all the preferences and setting the fonts and colours manually.

Initially I exported my preferences to an .epf file but Eclipse was temperamental on how it would import these settings and I could not get a consistent result. I then found this post and then dived into the workspace for Flash Builder and if you have the standalone version your in for a treat as it only really shows ActionScript and MXML related preferences so you don’t have to dive through a mine field of different language preferences.

I have uploaded my preferences which result in an IDE looking like the below screen shots, may not be to your taste but its a start to get fiddling. NOTE that I have stripped out certain settings not really applicable so please don’t overwrite your existing files as you will lose your existing settings. I imported these as they are directly into a new workspace and it worked fine for me though.

Read on →

Written by

Here is a quick and easy way to detect a users Flash Player Version using SWFObject:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!-- SWFObject js files -->
<script type="text/javascript" src="js/swfobject.js"></script>
      
<script type="text/javascript">

  var minMajorVersion = 9;
          
  var flashVersion = swfobject.getFlashPlayerVersion();
          
  if(flashVersion['major'] >= minMajorVersion){
          alert("Flash Player Version correct");
  }
          
</script>

Written by

Cliff Hall from Future Scale and PureMVC has released a public Beta for his companies new product called Zarqon. This is a much needed AIR app for licensing your Flex/AIR applications and the beauty of it is that its reliant only on Amazon S3 no other third party dependencies!

Zarqon is a cloud-based system that works with Adobe Flex and AIR to give you feature-level control of your software, and complete ownership of your license-holder data, which is stored and accessed for pennies per month in your own Amazon S3 account. Sell your application anywhere and anyhow you like. Your data never passes through our servers and you pay no royalties or percentages on the licenses you sell aside from your payment vendor’s charges.

There is not much point in me running through what Zarqon does as Cliff has documented it thoroughly on the links above, so go visit the Zarqon home page have a good read around this cool piece of software he has developed. If your interested in registering as a Beta tester though (for the moment at least) you have to be in the US to join the beta program.

Read how to secure your Flex application with Zarqon. Read how to secure your AIR application with Zarqon.