June 24, 2008

Application Version Control in AS3

Filed under: ActionScript, Bug Fixes, Flex, Japanese — Anthony @ 2:23 am

I thought that I would just write a quick note on how I know which version of an application I am looking at when it has been published to the web. It's all well and good saying its revision 87 from svn but how do you know? Well a simple way is to add it to the Flashplayers custom context menu. Right click to see the custom menu and to view the source

(more...)

Custom Color Picker Source

Filed under: ActionScript, Components, Flex — Anthony @ 12:56 am

Some time ago now I decided as a self improvement mechanism to re-write one of the Flex components from scratch so that I could get my head around the Flex Component Framework. So I set my eyes on the ColorPicker Brave or stupid you decide as this was going to be one of my first components ever, I should have probably started somewhere a bit smaller.. But hey.. It works and I learnt a hell of a lot. and now it's time to share. (more...)

June 19, 2008

Profiler Problems in Flex!

Filed under: Bug Fixes, Flex, Physics, Profiler — Anthony @ 12:44 am

After reading an example chapter from Training from the Source : Profiling Flex Applications on InsideRIA I thought ooo! I like using the profiler but i didnt know you could do that! So away I went and opend up one of my apps and clicked Profile.... O no whats going on? No Profiler prompt just straight into the application

Socket closed.
Socket closed.
Socket closed.
Flex Profiler No activity 60 seconds after connection.

and then quiet (more...)

June 5, 2008

Using describeType( ) and getDefinitionByName( ) to return a Dictionary of public static const

Filed under: ActionScript, Flex — Anthony @ 2:47 pm

Wow that was a big title!
Ok i know its not something you would usually have to do but I think this is useful anyway when you have a large list of public static constants declared in a class and you want to somehow loop through them without having to place them in an array or dictionary manually. For example i was writing a Translation utility class today and i needed to add this list of supported languages. (more...)

June 3, 2008

Canon Buzzwords goes Live!

Filed under: ActionScript, Flex, JavaScript — Anthony @ 10:28 am

The application went live on Friday lunchtime at http://www.canon-europe.com/buzzwordbuster in support of Canon's attendance at "DRUPA", the "World Cup" of Print Industry events!.

(The application is also available in German at http://www.canon.de/druck_glossar).

There were some interesting challenges presented with this application such as

  • Bilingual
  • Deeplinking ( without the use of JavaScript )
  • PureMVC Framework
  • Component Driven.

The problem with the Deeplinking was the fact that Canon uses a content management system that doesn't allow you to add any JavaScript to the Page! Not even as an include. This posed a big problem with the app due to the fact that Deeplinking was requirement of the brief. As you may or may not know Deeplinking is enabled in Flex via an external folder called history and within this folder you have history.js and history.css files both of which are needed to allow Deeplinking to work. (more...)

May 19, 2008

Custom Color Picker

Filed under: Flex — Anthony @ 2:51 pm

Some time ago now i built this custom color picker that allows you to group colors together in addition it also allows users to search the Kuler database to bring back color sets rather than using the plain old colors in Flex. I haven't got the code at the moment but if anyone wants it just leave a comment and i will post it up. See the ColorPicker in action after the jump. (more...)

Predictive Search Component

Filed under: Flex — Anthony @ 12:23 pm

I have recently been building a predictive Search engine for a project for Canon to be released at this years Drupa in Germany. I cant release the code just yet but i will as soon as the project has gone live.
You can see it in action here you can search the ( very small ) archives of posts by typing in the search area. The predictive search is performed on the Titles of the Posts whereas if you press return or click search a full search is performed on both the titles and their content. Try it out 'Predictive' is a good place to start!.

May 18, 2008

Static Code

Filed under: Flex — Anthony @ 2:37 pm

I have recently seen some interesting posts regarding the topic of Static code blocks especially over at InsideRIA I posted my own two cents over there but I will also post it here for future reference:

I often use static variables for creating default styles for my components, these styles then can be overwritten by someone using the component however there will always be my initial stying applied if they arent overwritten.

/***** DEFAULT STYLE DECLARATIONS GO BELOW ***/
 
private static var STYLES : Boolean = defaultStyles( );
 
private static function defaultStyles( ) : Boolean
{
   //NO CSS DECLARATIONS
   var newStyle : CSSStyleDeclaration = new CSSStyleDeclaration( );
   if( !StyleManager.getStyleDeclaration( 'yOffSet' ) )
   {
      newStyle.setStyle( 'yOffSet', 30 );
   }
   StyleManager.setStyleDeclaration(
                                     'CustomComponentName',
                                      newStyle,
                                      true
                                    );
 
   return true;
}