David Harris's Technology Blog

ColdFusion, Flex, and other stuff...   (and 341,536 hours, 10 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:

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

Recent Entries:

No recent entries.

Top Posts:

Recent Comments:

Top Commenters:

My Links:

RSS:


Adobe Community Road Show Coming to Auckland!

This Thursday http://www.cfug.org.nz/ and http://www.fxug.org.nz/ are hosting an Adobe Roadshow event with Mark Szulc.

Come along to hear more about Flash Builder, Flash Catalyst and CF9!

I will attempt to broadcast the meeting on http://experts.na3.acrobat.com/nzcfug/, all going well!

Related Links:

http://groups.adobe.com/posts/1b5f77b054

http://nzroadshow.eventbrite.com/

http://labs.adobe.com/

See you there!

AIR Widget: Snow Reports to your desk top!

The last while I've had the fun of developing an AIR app for one our clients.

A pretty simple little widget to let you know the Snow conditions on the Ski fields in New Zealand.

So, if you wish you where here skiing, download this widget to make you green!

http://www.summitlager.co.nz/widget.html

I made use of http://code.google.com/p/flexcairngorm/ and a little http://www.degrafa.org/ in there too!

Thanks to the design team for making it look so cool.

Enjoy!

Simple Example of Randomizing the order of an array in ActionScript

Just got asked this by a work mate and after asking Mr Google and looking at the Array Documentation came up with this (Flex based) example, so thought I would share :-)

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

<mx:Script>
<![CDATA[
private function myExample() : void
{
//can be an array of anything you like, but using letters here
var myArray   : Array   = ( "a,b,c,d,e,f,g,h,j,k,l" ).split(",");

//sort the array using my function
myArray.sort( myFunction );

debug.text = myArray.toString() + "\n" + debug.text;
}

//This function takes in 2 args, but we never use them...
private function myFunction( a : Object , b : Object ) : int
{
return ( Math.round( Math.random() * 10 ) - 5);// return a random value above, below or on 0 }
]]>
</mx:Script>

<mx:Button
label="Make me Random"
click="myExample();"
/>


<mx:TextArea
id   = "debug"
height="100%"
/>


</mx:Application>

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!

More Entries