David Harris's Technology Blog

ColdFusion, Flex, and other stuff...   (and 323,446 hours, 20 mins in to my plan for global domination)

Search:

Calendar:

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Subscribe:

Enter your email address to subscribe to this blog.

Archives By Subject:

Tags:

adobe air ajax cfug coldfusion flash flex frameworks free software fxug general jpgmetadatareader mac off topic opensource papervision spry

Recent Entries:

Top Posts:

Recent Comments:

Top Commenters:

My Links:

RSS:


A couple of Flex Podcasts

Today I listened to the ColdFusion Weekly podcast.

The topic was Flex Frameworks Roundtable

Peter and Matt got together the different "voices" of the Flex Frameworks out there and got them talking.

Speaking personally the saying, "If all you have is a hammer, then everything is a nail" rings true for my experience with frameworks. I tend to find once I get my head-space in a particular framework I find myself approaching all the problems I need to solve within that framework.

In ColdFusion, "Fusebox" was that framework for me for a while, and currently "Cairngorm" is the Flex one.

While it is not a bad thing to actually learn a tool/framework well, it's great to listen to well respected members of the various framework communities flesh out what problems their favorite framework is trying to solve, and how.

A couple of the things that stuck with me are:

- the less "boiler plate" code you have to write to add functionality to an Application, the better

- MVC is not a framework, but applications should be MVC, no matter what framework/approach you take [that's a *whole* other blog post I've been thinking about for a while now!]

At the end of the day, no matter what framework/style/approach you take, if you are going to create a non-trivial application, there is still a lot of work to do! Even if you use one of the plethora of code-gen tools out there, you will still have a lot of leg work!

Near the end of the podcast (64mins) there is some great talking about what these guys would like to see in Flex/Framework in the future.

Well done Matt and Peter for setting this up, and thank you!

I also listened to this one, which is great for a more in-depth on Cairngorm: www.theflexshow.com: Universal-Mind-Cairngorm-Extensions-w-Thomas-Burleson

Enjoy!

Simple Effects on a Form - Flex Example - the next version

In my previous post I had an example on simple effects in Forms.

As was quickly pointed out in the comments, if you click on the "Toggle Form" button quickly so unexpected behavior happens.

Try it if you like:

My Flex Playing requires Adobe Flash Player 9. Get Adobe Flash..

The issue seems to be that while the effect is playing, it will finish playing even if the "advanced" value has changed while it is playing. (make sense?)

So to work round this, I have added a <mx:Move> effect tag of my own and given it an ID. In the moveEffect attributes of my tags now I have put the ID of my Move effect Then in the Button tag, on the "click" event, rather than switch the "advanced" value in there, I am now calling a function.

What the function does is check if the effect is playing, and if it is NOT playing, it toggles the "advanced" attribute.

This means that even if the button is clicked rapidly you won't get the unexpected behaviour that was happening previously.

For a bit of fun, I put the "Bounce.easeOut" function in the "easingFunction" attribute of the move effect.

Have a Look:

My Flex Playing requires Adobe Flash Player 9. Get Adobe Flash..

Simple Effects on a Form - Flex Example

Lately I have been working on a Flex application and I have been enjoying the ease that the Flex framework allows a developer like me to add some nice looking effects very simply.

In my example I have a form, and this form has a Advanced mode which, when selected, will display extra fields for the user to fill in.

As you can see in the first application below, when you click the "Toggle Form" button the extra fields are shown or hidden.

My Flex Playing requires Adobe Flash Player 9. Get Adobe Flash..

The way I have done this is to create a private bindable variable called "advanced" which the extra fields bind too. When you click the "Toggle" button this value is changed from true to false or vice-a-versa as required.

The attributes of the form items that bind to that value are "visible", which controls if you can see the form field or not, and "includeInLayout" which lets Flex know if this field should be taken in to account when laying and rendering out the form.

By setting both of these to "false" the form field is hidden and the layout of the form changes.

Now, one thing about this is that the user gets know idea of the context of the fields.

EG: you start with "First Name", "Email" and "Password", and when you toggle to the advanced form, the "Last Name" field appears between the "First Name" and "Email" fields, and the 3 "Address" fields appear between the "Email" and "Password" Field.

So do give a feeling for the context I am going to add a "moveEffect" and a "showEffect" to each of the fields.

The Flex frame works ships with a library of these effects which are available to us. (See the docs for more info) We can build our own effects sequences, but that is another example entirely!

In to the "moveEffect" I am going to put the "Move" effect.

The "moveEffect" kicks in then the "x" or "y" positional properties are changed, and "Move" will move the UI component to that position, rather than just jump it there (as it does in my first example)

The "showEffect" happens when the "visible" property of a UI component goes from "false" to "true". I put "Fade" here so the UI component will fade in to view.

The application below is the finished result.

My Flex Playing requires Adobe Flash Player 9. Get Adobe Flash..

NB: You can right click on the applciations to View and download the source. Enjoy! :-)

RIA conference In Queenstown, New Zealand - Web on the Piste - take2

Straker have just announced that Web on the Piste is happening again.

The conference is a deliberately smaller conference of only the low hundreds of attendees available. This means you get get access to the speakers to talk to between sessions etc.

The years theme is "Usability and Rich Internet Technologies" and one of the speakers that has been secured at this stage is Robert Hoekman Jr, author of the best selling book "Designing the Obvious" with more speakers to come.

So it could be good.

Last year I organized User Groups on the Piste which was a chance to get the Adobe Development community together to hang out and talk geek. If you are coming this year, keep an ear out for this event, as I am hoping to organize (or help organize) something similar again.

New Zealand has 2 official Adobe User groups:

- http://www.cfug.org.nz

- http://www.fxug.org.nz

so WOTP is a good chance to get us all together in one place!


Disclaimer: at this stage I am currently employed by Straker, but only for one more week! ;-)

RSVPs open for Special New Zealand Flex User Group Meeting!

Just a follow up on a previous entry to let all interested know that the RSVP for Wellington and Auckland are open for the special FXUG meeting at the end of the month!

http://nzfug.eventbrite.com

See you there!

New Zealand has an Adobe Ambassador!!

Just reading over my blog feeds this morning and I noticed Campbell Anderson has become an Adobe Ambassador!

Congratulations Campbell.

I have been on the receiving end of his help, and think Adobe (via Andrew Spaulding) have made a good choice in asking Campbell for this role.

Campbell's knowledge in Flex and willingness to share that knowledge has helped me out a few times my Flex forays.

So go along to NZ Flex User Group and congratulate the man in person!

[Edit] Does anyone know if there are other "Adobe Ambassadors" in New Zealand? Campbell is the first one I am aware of...

NZ Flex User Group Meeting you won't want to miss!

At the end of February, the New Zealand Flex User Group, in association with the New Zealand ColdFusion User Group are having a special event!

Seats will be limited, so be ready to RSVP ASAP when you can! The RSVP site will be announced soon! (promise) See http://www.fxug.org.nz and http://www.cfug.org.nz/fxug for more details! I'd suggest signing up on the Flex User Group's mailing list too!

Flex takes on "Second Life" in the form of "Small Worlds"

The team at OutSmart have resurfaced from 12 months of self declared "Stealth Mode" according to this Blog: nz-entrepreneurs-going-to-town-on-web

The result of this time is "Small Worlds" which is an online world, powered by Flex, produced by OutSmart.

"Small Worlds" is 100% web based, and runs within the browser.

Campbell destroyed my evening last night by sending me an invite to Small Worlds.

The "Small Worlds" Game/application looks very sharp and the highlight was beating Nathan at a game of pool. I have never met Nathan in the real world, but I was informed he was one of the developers that worked on the pool game!

May last year they showed off early stages at the New Zealand Flex User Group, and then provided an open demo. See this entry.

The related links below have links to other announcements and photos.

My email address is on the right, so feel free to email me if you want an invite!

Congratulations and Well Done to the team at OutSmart! We all look forward to seeing your "Small Worlds" grow!

Related Links:

http://blog.digitalbackcountry.com/?p=1238
http://blog.xsive.co.nz/archives/260
http://www.flickr.com/photos/xsive
http://blogs.zdnet.com/Stewart/?p=713

Must.not.sign.in.to.Small.Worlds!

Train + Flex2 + PaperVision =

It's been a while since I have looked at PaperVision3D, so I have been using the train trip home to refresh and learn more.

In my Geek Gift entry I wanted to have it so that it was possible to click on a single Cube and spin that one, and not the whole lot. Due to my approach and "newbe" to PV3D I never worked out how to do this.

In the new PV3D there have been lots of improvements to help people like me do stuff like that.

To show this I have added a hover event to each cube, and when your mouse hovers over a cube, that cube will spin.

If you click on a cube, filter effects are changed a bit, but that happens to all of the cubes

Hope you like it!

My Flex Playing requires Adobe Flash Player 9. Get Adobe Flash..

Binding of properties between sub components

On the NZ Flex UG list, (another) David posted this question.

In the process of testing what he outlined, I created a simple example, which I have posted here.

The point of this example is to show how you can declare "public" variables in a component, and then access those variables as properties form the component that uses it...

The example consists of 2 files:

FormExample.mxml (Application File)

Code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >
   
   <mx:Panel>
      <!-- call in the MyForm component -->
      <local:MyForm
         id="myForm"
         title="My Form"
         xmlns:local="*"
      />

      
      <!--
         a button with the "enabled" property bound to the "formValid" property of the myForm component above
      -->

      <mx:Button
         id="myButton"
         label="My Button: enabled is '{myButton.enabled.toString()}'"
         enabled="{myForm.formValid}"
      />

      
   </mx:Panel>
   
</mx:Application>

MyForm.mxml (in the root folder of the project)

Code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">

   <mx:Script>
      <![CDATA[
         /*
            Create property and expose it by declaring it as "public",
            and let the compiler know to make if bindable using the [Bindable] meta tag
         */

         [Bindable] public var formValid:Boolean = false;
      ]]>
   </mx:Script>
   <!-- Something to let us know if the 'form' is currently Valid or Invalid -->
   <mx:Text text="Form is Currently {formValid == true ? 'Valid' : 'Invalid'}" />
   
   <!-- simple button to toggle the formValid status -->
   <mx:Button label="Toggle Form Valid" click="formValid = !formValid;" />

</mx:Panel>

Result:

My Flex Playing requires Adobe Flash Player 9. Get Adobe Flash..

Feel free to ask questions!

PS: There can NEVER be enough Davids!

FlexBuilder2 + MacBook + Train ride equals...

On the ride home on the train tonight, while talking to a fellow commuter about the internet and life in general I was having a quick play with the drawing API to get used to the Mac and the differences on it VS XP.

This is what I came up with:

Click and Drag and see what happens...

My Flex Playing requires Adobe Flash Player 9. Get Adobe Flash..

More Entries