Changing Selection Indicator in Datagrid
add Tween, alpha, shape, etc.
Categories: FlexSo I was recently working on a project, and the client wanted to have a different effect on the DataGrid's selection indicator. He said that he wanted the indicator to fade rather than the default "hard" appear. After doing some digging, I found a post about changing the List Selection indicator which was pretty close to what I needed, but this was for a TileList. The good news is that DataGrid inherits from the List base class, and the List Selection indicator methods are in there as well. Sound easy!
The two methods in question are the drawSelectionIndicator() and drawHighlightIndicator() in the ListBase.as class. If you override these two methods, you can create some pretty cool effects. Here is an example of implementing a Tweener fade, and setting the final alpha to 50%:
override protected function drawSelectionIndicator(
indicator:Sprite, x:Number, y:Number, width:Number,
height:Number, color:uint,
itemRenderer:IListItemRenderer):void{
var g:Graphics = Sprite(indicator).graphics;
g.clear();
g.beginFill(color,.25);
g.drawRect(0,0,width,height);
g.endFill();
indicator.x = x;
indicator.y = y;
}
override protected function drawHighlightIndicator(
indicator:Sprite, x:Number, y:Number, width:Number,
height:Number, color:uint,
itemRenderer:IListItemRenderer):void{
var g:Graphics = Sprite(indicator).graphics;
g.clear();
g.beginFill(color,.5);
g.drawRect(0,0,width,height);
g.endFill();
indicator.x = x;
indicator.y = y;
indicator.alpha = 0;
Tweener.addTween(indicator,({alpha:.5, time:1, transition:"easeOutCubic"})); }
package com.swfflex
{
import caurina.transitions.*;
import flash.display.Graphics;
import flash.display.Sprite;
import mx.controls.DataGrid;
import mx.controls.listClasses.IListItemRenderer; public class DataGridEx extends DataGrid
{ override protected function drawSelectionIndicator(
indicator:Sprite, x:Number, y:Number, width:Number,
height:Number, color:uint,
itemRenderer:IListItemRenderer):void{
var g:Graphics = Sprite(indicator).graphics;
g.clear();
g.beginFill(color,.25);
g.drawRect(0,0,width,height);
g.endFill();
indicator.x = x;
indicator.y = y;
}
override protected function drawHighlightIndicator(
indicator:Sprite, x:Number, y:Number, width:Number,
height:Number, color:uint,
itemRenderer:IListItemRenderer):void{
var g:Graphics = Sprite(indicator).graphics;
g.clear();
g.beginFill(color,.5);
g.drawRect(0,0,width,height);
g.endFill();
indicator.x = x;
indicator.y = y;
indicator.alpha = 0;
Tweener.addTween(indicator,({alpha:.5, time:1, transition:"easeOutCubic"})); }
override protected function clearHighlightIndicator(indicator:Sprite, itemRenderer:IListItemRenderer):void{
if(highlightIndicator)
Tweener.addTween(indicator,({alpha:0, time:1, transition:"easeOutCubic", onComplete:function():void{Sprite(highlightIndicator).graphics.clear()}}));
} }
}
360 Flex recap
My recap of the event in San Jose
Categories: 360 FlexSo, here is my recap from the 360|Flex conference in San Jose:
First off, I would like to congratulate Tom & John for putting on such a great event. The venue at eBay was awesome, and the turnout was equally as good. Second, as promised, I have posted my slides from my hands-on presentation here, and my example app with source code (right-click) here. Also, you can watch my session on AMP by following the instructions here. While I haven't yet seen any of the feedback from the survey app, most people said they got a lot out of my session...which is great. I tried to make it as unusual and hands-on as possible, so I think most people were surprised to see the full size chromakey backdrop set and lighting. I was running out of time at the end though, so I did feel a bit rushed when writing the example application with the class which caused some app errors. Also if you watch the session on AMP, since it was a hands-on class, you will not get to see the lighing and camera setups. Sorry about that!
Some of the sessions I saw that I think were great was Ben Stucki's How to Build A Framework, and Ryan Campbell's session on Plexiglass 3D. Another one of note that was totally not expected was Joel Geraci's session on Flex and Acrobat. It's amazing how Flash/Flex and other Adobe products are integrating so well, and how paper media seems to be just so passé now.The event parties were great networking events and most people seemed to be working the room really well. Jeffry Houser had some great live Flex Show interviews, and even Doug McCune showed up un-expectantly at Tuesday's event.If you missed this sold-out event, I would recommend you get on the ball for the next one, as it is the premier conference for anyone interested in Flex.
-Christopher Keeler 25 June 2008
July Meeting cancelled but 360Flex is not
Categories: 360 Flex SWFFLEXDue the holiday weekend being too close to our next meeting, we have decided to cancel it altogether for the month of July and wish everyone a safe and happy 4th.
Also as a reminder, the 360|Flex San Jose event is right around the corner, and if you haven't registered yet...you better get on it. It's the "end all be all" of Flex events, and I will be there. Go register today: http://www.360conferences.com/360flex/
-Christopher C. Keeler
Yahoo! Weather API Flex Mashup
Integrating Yahoo Weather results with local live camera stream
Categories: FlexHere's a neat little Flex app I created that combines a live local camera stream with Yahoo! weather results. The need for this came about as a result of a previous weather.com Cold Fusion module not functioning anymore, and I wanted to see if it could be done in Flash to give it a bit more pizzazz.
As before, Yahoo! comes through with a Flash API that can deliver local weather results. I used the ASTRA Actionscript 3 API which contains the Weather and Weather Results class. In this mashup, I combined the results from the Yahoo! Weather Results class and a local live stream from a web camera. The only drawback is that the webcam is a network IP camera which does not contain a crossdomain.xml file, so Flash gives me a security sandbox error and will not pull the image feed. My workaround for this was to have a local server go out and fetch the current image and save it locally, then Flex just grabs the latest image on the server. Not the most elegant solution, but it works for this project. Ultimately, it would be nice to have the IP camera stream right into Flash Media Server, and pull the live stream into Flex. This would give you full motion live video, and not look like the old webcam sites from 1998. On a side note, I also incorporated Degrafa into this project to make some easy overlays on top of the live image, and used my own forecast weather icons instead Yahoo's default ones.
Live project here.
Source code here.
-Christopher C. Keeler
Yahoo! Maps Flex/AS3 API
Flash mapping made easy
Categories: Flex
Recently, I got involved in a project to create a dynamic mapping application, and found a great little Actionscript 3 API from Yahoo! Maps. Written by Zach Graves, this API allows you to create dynamic Flash based mapping applications, and when coupled with Yahoo! Local search requests, it becomes a sort-of digital concierge for the local area. The Flex app I created marks a specific location on the map via a geocoded address, and then does a Yahoo! Local search for nearby Hotels, Restaurants and Other Points of Interest within a 25 mile radius. I also added a custom search text box (thanks Doug McCune for the prompting textInput in flexlib!) on the legend to find specific business by name. i.e. Best Buy, Wal-Mart . There are still a few more things I am planning to add, but this will give you an idea on how to integrate the Yahoo! Maps API into your next Flex project.
The live app is here.
Souce Code here.
-Christopher C. Keeler
Speaking at 360|Flex - San Jose
Summer in Silicon Valley
Categories: 360 Flex
I will be speaking at the 360|Flex conference coming this summer to San Jose, CA - Aug 17-20, 2008. My topic is entitled: "High Definition and Flex - Hands On" - This session covers the tools and workflows you need to produce and stream great HD video in the Flash player and Flex. Topics will include a hands-on look at cameras and lighting, recording formats, and pitfalls when working with high definition footage. Also see Flash Media Server 3 in action, and how to exploit it's H.264 streaming in Flex. Finally, get a look at how to leverage tools like Adobe After Effects to add cool Flex friendly effects, and the best compression encoder settings for producing super lightweight HD files.
This will be my first time in San Jose, so it should be an experience. Register here if you would like to attend THE BEST Flex conference in the world. Hope to see everyone there.
-Christopher Keeler
Flex Jukebox using Degrafa
drawing and skinning with Degrafa
Categories: Degrafa FlexSo recently I finished a project creating a music jukebox for a touchscreen and I used Flex to build it since most of the code snippets for the functionality were freely available throughout the web. When the task of skinning the player came up, I turned to this new open source project that I had heard about at 360|Flex conference in Atlanta called Degrafa. 
-Christopher Keeler
360|Flex Atlanta is a wrap.
Thoughts about this conference
Categories: 360 FlexJust returning from the 360|Flex Atlanta conference, and I was going to post my overall thoughts on how the conference went, when Doug McCune decided to post a really great writeup about it, and pretty much summed up all of the same thoughts I had. So I recommend you check out his post and thoughts on the event. Looking forward to the next one. Great work from the 360 Conference guys.
21 February 2008360|Flex Atlanta
Drop by and say hi
Categories: 360 Flex
I will be attending the 360|Flex conference in Atlanta on Feb 25th - 27th. If you are also going, be sure to find me and say hi. I'm really looking forward to another great installment of a 360 event. If you haven't yet registered, you still have a few more days left! See you in Atlanta.
Top 10 Flex Misconceptions
Are you a victim?
Categories: FlexAt QCon, Adobe's James Ward shared with InfoQ.com the top Adobe Flex misconceptions that he encounters in his travels evangelizing the Flex application framework.
- Users Need to Install Something New to Run Flex Applications.
Ward, exclusive to InfoQ.com, discusses the Flash adoption rates and Flex programming model:Flash Player 9 is required for Flex 2 & Flex 3. The Flash Player 9 runtime is currently installed on 94% of the world's computers.
Flex 2 and Flex 3 applications execute in the Flash Player 9. Flex applications are built on top of the native Flash Player APIs like vector graphics, bitmap manipulation, and networking (which are based on the browser networking stack). The Flex framework adds reusable components like date pickers, data grids, charts, etc. Compiling a Flex application results in a SWF file which is the binary byte code format for the Flash Player. Contained in the SWF file is the byte code for the Flex framework code and a project's custom code. The Flex compiler optimizes the byte code so that only classes which are used go into the SWF file.
For desktop applications, Adobe is aiming to make their new desktop runtime, dubbed Adobe AIR, as ubiquitous as the web runtime. The 1.0 release of Adobe AIR will be available in the beginning of 2008. Currently, AIR is in beta release from labs.adobe.com. Many companies are already building production applications on AIR. One example, can be seen with eBay's application eBay Desktop. - Flash Player is 100% Proprietary.
Ward continued on this item for InfoQ.com:The core of Flash Player is the Tamarin Virtual Machine, which is an open source project under Mozilla. While the SWF file format is not fully open, it is documented by the community on osflash.org. There are numerous open source products that read and write SWF files. The Flash Player's product direction has traditionally been heavily influenced by the community and their needs. The core language for Flash Player is an implementation of ECMAScript 262, which is the specification for JavaScript. Flex also uses CSS for styling of components / applications. Adobe AIR uses web standards as the basis for desktop applications as well as Open Source technologies like Tamarin, Webkit, and SQLite.
- Flash is for Designers, Video, and Annoyances.
In Ward’s July, 2007 blog, “How I Overcame My Fear of Flash,” he discussed this point:Indisputably, the power of Flash has been abused. Pop-ups, pop-overs, skip intros and annoying ads run rampant across our screens. I've heard it said that one should never judge a religion by its abuse. The same adage applies to technology. Flash shouldn't be avoided just because people use it for annoying things. After all, e-mail isn't avoided just because spammers happen to abuse it.
Ward elaborated on the topic for InfoQ.com:Traditionally Flash content was built with the timeline based tool for designers. Flex is the developer toolset for building Flash based content / applications. Designers and developers can work together by sharing assets between the two tools. Flex adds a comprehensive component base:
http://www.adobe.com/go/flex_explorer_app
http://www.adobe.com/cfusion/exchange/index.cfm?event=productHome&exc=15&loc=en_us - Flex is Not for Enterprise / Business Applications.
Over the last few weeks, Ward published a seven part blog series on a number of new Oracle applications implemented in Adobe Flex. The applications, which were announced at the recent Oracle OpenWorld, ranged from sales tools, to database management, and business intelligence.
In addition to Oracle’s usage of Flex, InfoQ.com published a piece recapping a number of groups using Flex for enterprise applications. Ward also points out to InfoQ.com, that there are numerous examples of enterprise applications being developed with Adobe Flex, including work at: Workday, SAP, Salesforce, and Business Objects. - Flex is Expensive.
Ward detailed a number of things Adobe has done to address the cost concerns:Flex is a free, and soon to be open sourced, developer toolkit for building Rich Internet Applications for the web and the desktop. This free SDK includes everything a developer needs to build RIAs that work the same on any browser or operating system. Part of the free Flex SDK is an extensive set of components which are extensible, skinable, and accessible. You can see many of these components in the Flex Component Explorer: http://www.adobe.com/devnet/flex/samples/code_explorer/
To see a comparison of AMF to other text based serialization technologies, see James Ward's Census RIA Benchmark application: http://www.jamesward.org/census
Flex Builder is an optional plugin for Eclipse which makes developing applications with the free Flex SDK more efficient. It includes features like integrated debugging, design view, and code completion.
The Flex Builder pricing has changed in quite a few ways recently. Flex Builder is now free for Students and Faculty. The price for the vanilla Flex Builder, without the charting components, has been reduced to $249 to better balance the tiered pricing for Flex Builder.
There are a number of options for building backend infrastructure for Flex Applications. To take advantage of the high performance AMF data transfer protocol, there are official Adobe products like LiveCycle Data Services, as well as numerous open source projects like Granite Data Services. Using AMF removes the unnecessary steps of converting data to text (SOAP, RESTful, etc), transferring it, and then converting it back to data. AMF also allows type information to be preserved across the wire. - Flex Applications Require a Special Server.
Once again, Ward speaking with InfoQ.com:Flex applications can run on top of any web server, application server, and database server. Flex applications are much more like client-server applications. Since the logic is running on the client inside the Flash Player, you need some way of communicating with the server. There are many different options for how you connect Flex to your infrastructure. Without any special libraries, you can expose your back-end data and services as RESTful, XML, or SOAP and easily consume that data in your Flex application. If you choose to use the AMF binary serialization protocol, you may need to add some additional libraries into your web application. AMF is just another serialization technology, like XML or JSON, so it can be one of the various methods you use to communicate to your back-end SOA.
- Flex is Hard to Learn.
Leftie Friele, from the InfoQ.com community, posted a comment on the InfoQ.com piece “Who is Using Flex?”, detailing his company’s experience in learning Flex:Our startup company, Ezmo, have used Flex since the start and we're extremely happy with the framework.
For those new to Flex, Ward has a Screencast showing a Flex application being built to help get you started. There are also numerous other articles about using Flex and Java in the Adobe Developer Connection.
Without any prior knowledge of Flex/Flash, we built our application in less than two weeks. The integration between Java and Flex is super simple, and getting started with Flex is just a walk in the park.
The tool support is very good too with Flex Builder. You get the familiar surroundings of Eclipse and you are off and running without many problems. The one thing that is missing is better tools for continuous integration and better plugins into Maven for building Flex applications. - With Flex, I Will Need to Rebuild My Entire Application.
In January, Bruce Eckel published an article titled, “Hybridizing Java.” He argues that the Java community should continue using the good parts of Java, but should use other technologies where Java is weak. His primary focus in the article is using Adobe Flex for user interfaces, instead of the traditional Java options (Swing, JSF, etc…).
Ward elaborates on this concept:Since Flex applications are just the UI piece of an application the back-end usually stays the same. If your back-end was built following the SOA pattern then it is usually very easy to expose those services out to a new Flex UI. This preserves your existing business logic whether it is in EJBs, Spring services, POJOs, etc.
- Flex Breaks Normal Browser Functionality, Like the Back Button.
Ward’s blog discusses the back button:In Flex, back button support is built in and easily customizable so this was never an issue. Flex also provides an easy way to do hashmark urls (or named anchors), so the url changes as application state changes. Another Web 1.0 integration problem solved.
Ward adds more details for InfoQ.com:Flex 3 provides a simple way for applications to store state parameters in a named anchor and correctly restore state based on those parameters when the URL is requested. More information about this feature can be found in the Flex 3 Feature Introductions Deep Linking documentation.
Accessibility has always been very important for Flex applications. Since the Flash Player works with Jaws and other accessibility technologies, the capability for adding accessibility to Flash based applications is there. The Flex framework builds accessibility into the core framework. There are many different pieces of accessibility depending on what impairments and disabilities your application needs to support. You can find out more about the accessibility features of Flex in the Developer's Guide. - I Can Do Everything Flex Does With Ajax.
Ward explains:RIA with Flex and Ajax is not either/or. Sites like Google Finance show how you can use Flex and Ajax together. Ajax is very good for content-centric applications, while Flex is very good for interactive, media, and data-centric applications. If your application is somewhere in between the two sides of that spectrum, then you can use the Flex Ajax Bridge to combine the two technologies. In Flex 3, the Flex Ajax Bridge is integrated directly into the SDK. If you are using Flex 2, you will need to download the Flex Ajax Bridge separately.
Also, from the InfoQ.com community, Michael Marth commented on why his group chose Flex:We use Flex 2 for our soon-to-launch online dating site viibee.com
The reason: Flex enabled us to create a user experience far beyond anything that we could have done with a comparable effort in Javascript/Ajax.
Save The Date!
Flex 3 Pre-Release Tour Coming to Florida
Categories: FlexThis is just an announcement to save the date for January 21st, 2008!
The Adobe Developers of Greater Orlando (Adogo) user group has been selected as a stop on Adobe's Flex 3 Pre-release Tour. They're fortunate enough to have Ben Forta, Adobe's Senior Technical Evangelist, speaking to the group for this leg of the tour. The meeting will be held on January 21st, 2008 @ 7:00 PM in the Oleander Room at Westgate Lakes Resort and Spa (located at 10000 Turkey Lake Road, Orlando , FL 32819, parking at The Smokehouse). They'll be giving away a copy of Flex 3 and CS3 Web Premium, a pass to CFUnited 2008, as well as lots of branded schwag from Adobe and CFUnited. Food and drink will be provided to all in attendance while it lasts. This is the ONLY Florida stop for the tour, so be sure to attend.
Registration for this event is available at http://adogo200801.eventbrite.com/ Additionally, more information can also be found on the Adogo website at http://adogo.us.
Hope to see everyone there.
Next meeting date
January 3, 2008
Categories: SWFFLEXThe next SWFFLEX meeting will be on January 3rd, 2008 at 6PM. There will be free pizza and soft drinks, provided by yours truly, and we will be discussing a new Adobe product launch and custom skinning.
See you in 08!
Meeting cancelled this month
No meeting in December
Categories: SWFFLEXDue to scheduling conflicts, there is no meeting on December 6th, 2007. Stay tuned in January for some exciting news from Adobe!
29 October 2007Adobe "Pacifica"
New features for Flash player
Categories: Flash PlayerAdobe reveals the next generation of Flash player features at MAX 2007 and a new project code named "Pacifica" which are in development now. Pacifica is a project that allows peer-to-peer communication within the Flash player using VoIP protocol, and capability to integrate with a PSTN network. Listen to episode 26 of the Flex Show to hear Tony Hillerson & Dan Florio discuss these and other new features.
26 October 2007Flex Video Conference
The Camera class with Flash Media Server
Categories: Flash Media Server Flex
In my quest for a video email application, I was interested in experimenting with the Flash Camera and Microphone classes, and so with a little help from Renaun Erickson, I devised a little video conference app where you and 9 of your friends can have a video chit-chat conference complete with audio using the Flash Media Server as the central connecting point. The Camera class in Flex is so easy to use, it's not even funny...Once you have the NetStream setup, it's just a matter of calling Camera.getCamera() constuctor and attaching the camera to the NetStream. The same holds true for the Microphone class, and you can even set NetStream's attachAudio method to mute individual streams on the fly. I have posted a sample app with source code here. I also modified Renaun's original example and replaced the Panel with the SuperPanel so now each user can move individual conference attendees around within the browser. I'd like to see Doug McCune implement this with a version of TileUI, so you can start throwing people around the screen mid-conference. 
Abobe unveils Thermo
and other experiments
Categories: Flex
If you know Flex, then you’ve heard of Ely Greenfield. He is the charting master, and a member of the Flex engineering team. Recently for MAX 2007 in Barcelona, Ely gave a “Flex Roadmap” presentation, see it here, and talked about several new experiments Adobe is considering for the Flex product. The first thing is the Flex designer application code-named “Thermo”. This app is aimed at designers and will give you a visual approach to creating Flex apps much more than design view does now. Think of it as Fireworks in Flex…You as the designer just draw out the layout, and Thermo will generate all the MXML code for you. In addition to Thermo, Ely goes on to talk about some of the experiments they are doing with the Flex framework, and re-thinking the way components are made and interact with each other. Ely talks about for example taking a step back and saying even though we already have these 7000 lines of code that make up the base List component (with all its layout, scrollbars, and button states) what really IS the core function of a List? Its core function is to show an Array of data, all the other stuff like layout, scrollbars, etc is just extra crap that has nothing to with the core function of a list, so this should be handled some where else through the use of visual extensions, and CSS states. This way, there is sort of an MVC kind of architecture going on within the components themselves. Leaving the developer to extend multiple facets of each component in ways that are difficult to do now. It’s kind if hard to explain here, but if you watch the videos it will become clear. As well as that, another thing Ely reveals is a new MXML Graphics engine for Flex, where we can now draw primitive shapes right in MXML. Keep in mind though that all of the examples Ely give come with the disclaimer (that he makes several times) that everything you see may or may not ever make into a release, the roadmap looks promising and very exciting if Adobe does go this route. I say, let’s just skip 3.0 and go straight to 4.
Drag & Drop Flex MyTube
Streaming video with Flash Media Server
Categories: Flash Media Server FlexRecently I was shown a video email application that would send email recipients a link to a video email message. The idea was cool, but raised concerns for my healthcare practice due to the new privacy laws (HIPPA) and the app being hosted on third party servers. So I figured I would try to build a similar app using Flex and hosting it internally...This way there would be no privacy issues. Before going full bore on a video email app, I thought I might get my feet wet building a simple streaming video library using Flash Media Server to see how it performed. The video files I have on hand are about 30 minutes in length, shot in HDV, and edited in Sony Vegas. This produces, when fully rendered as NTSC (720x480), about a 2GB MPEG file. So, step one was to get some working FLV files that I could test. I needed to batch upload to FMS (Flash Media Server) and transcode the MPEG's (or any other file for that matter) to the FLV format on the fly. I found a command line tool called FFMPEG that does this with great speed, and also captures a still frame from the file that you can use as the thumbnail preview. Sweet...this tool is a must! More on FFMPEG in a later post. I also needed to create a standard SQL database table to hold additional info about each of the videos, like description, title, duration etc. (FLV's can be injected with Metadata for some of these fields, but its limited), and I created a CFC that will query the database and return all recordsets to the Flex app upon initialize. Okay, boring part finished, now onto the Flex front-end and FMS. So my thoughts were to have a single interface, where users could browse the preview thumbnails, and watch a video at the same time. I went with draggable previews that drop onto the main player, and the video starts playing. Easy and intuitive, and you can just page through the rest of the recordset while the video play, while tooltips on the previews provide the user with a video description and duration. Flash Media Server, to my surprise, is such a breeze as well. Just install FMS, create your app directory structure, upload the FLV's into the "streams/_definst_" folder, and feed your Flex app the source paths of the FLV's using the rtmp protocol. It all just works, and the videos stream in!
I have posted an early example of the app HERE which includes source code. (Right-click for the source code) Flash Media Server is for sure the way to go if you want true streaming, video copy protection, and an easy way to deliver lengthy presentations. Way to go Adobe for making it so easy for us! 01 October 2007
Adobe releases Flex Beta 2 today
Categories: FlexJust announced on labs.adobe.com today that Flex Builder 3 Beta 2 is available, as well as several skinning add-ons for other CS3 design platforms. Awesome news!
24 September 2007Scale 9 "On Time"
Reduce stying time and up production value
Categories: FlexSo, a few months back I went to the 360|Flex conference in Seattle, and met someone name Juan Sanchez who runs a little site called Scale 9. This site is a collection of Flex and AIR themes that you can incorporate into your own Flex and AIR apps.

21 September 2007
Seconds Past Midnight
SQL Server conversion
Categories: ColdFusionRecently I was tasked with creating an automatic email appointment reminder system for a healthcare practice. While building the app, I discovered that the database stores it's appointment time values as an integer, calculated as "seconds past midnight". So for example 1:30PM get stored as 48600. I needed to convert this integer to a readable time format. I could do this in Flex or ColdFusion as a separate calculation function, but discovered that SQL Server could do this for me on the fly right in the SELECT statement using the DATEADD() function. Here is the code in ColdFusion:
<!---Set todays date--->
<cfparam name="TodayDate" default="#DateFormat(Now(), "mm/dd/yyyy")#">
<!---Query Database using DATEADD() function and alias the field as DBApptTime--->
<cfquery datasource="YourDSN" name="test">
SELECT DATEADD(s,ApptTimeFieldName,#TodaysDate#) as DBApptTime
FROM AppointmentTable
</cfquery>
<!---Comes back as "Year-Month-Day Hour:Minute:Second:Millisecond" format--->
<cfset displayAppointmentTime = #TimeFormat(DBApptTime, "hh:mm tt")#>
<!---TimeFormat CF function removes the "Year-Month-Day" part, and formats the time to a common display with AM/PM. Note: Use capitol HH:MM for military time display--->
<cfoutput>#displayAppointmentTime#</cfoutput>
Works like a charm everytime!
-Christopher Keeler

