Stretch Media
home services Solutions news about us Blog contact us

Using external services-config.xml files and setting up on Mac

Problem:

I want to reference a remote instance of the services-config.xml file for a project I'm working on. I'm now developing on the mac platform (which I love) and need to figure out how to reference it.

Solution:

1) Connect to and "mount" the external drive on which the services-config.xml file resides.

Connecting to the remote drive via Finder by choosing Go -> Connect to Server or Cmd+K will give you access to the networked drive, but doesn't help you when you need to reference that drive (mapping in Windows) within the compiler settings in FlexBuilder. So...

Fire up Terminal and navigate to the root of your system, and then into your Volumes directory. Create a new directory here as follows:

mkdir [new_name]

Choose something relevant as the name as you'll be referencing it in a second.

Next, use the following command to "mount" your remote network drive to this new drive you've just created.

mount_smbfs //[userame]:[password]@[remote_server_url]/[drive]/ /Volumes/[new_name]

Each of the vars used here is pretty straight forward, but make sure you use the same when you reference the "mounting" location in /Volumes

You won't be returned with any confirmation of success, but if you don't get any error, then it's setup successfully.

Now, go back into FlexBuilder, and setup your services pointer to:

-services '/Volumes/[new_name]/ColdFusion8/wwwroot/WEB-INF/flex/services-config.xml'

or whatever your path may be.

A Persistent/Interactive Tooltip in Flex

I came across a requirement at work a few weeks back which involved an "interactive" tooltip... We needed to provide a summary of information in the tooltip, but then provide a link button to a more detailed document.

I came up with the following example by creating some functionality around the DataGrid mouse movements to display a "tooltip" (in reality a Menu instance) at the mouse position. Rather than digging into the framework to try and extend the ToolTip class to make it "stick" when moused over, I realized we've got popup menu functionality like that already. Slap a custom menu item renderer in there, skin it, and you've got a mousable, interactive tooltip instance.

I could have gone the extra mile and created a custom DataGrid instance using this new functionality, but I'm lazy so I'm just going to post the instance I implemented and let you figure out how to implement it for yourself :-) The idea being that it could be just as easily implemented on any List based control, and even with a bit of work any component in the Flex framework. Just modify the renderer to fit the content you need!

Example Here

Source Here

Copy from DataGrid to Clipboard/Excel in Flex

A really simple example today for a pretty useful feature... being able to copy contents from a datagrid (or any structure which uses a dataProvider for that matter) onto the system clipboard, and into an application like Excel.

Excel is able to recognize an HTML table format and pastes the structure into appropriate cells. The following example is tailored to that type of structure, but can really be formatted to whatever needs you have by modifying the createHTML() (or more appropriately named) method.

View example here : Example

And source here : Source Code

Set "Loading" screen background color on Flex

If I had a nickel for every time I've looked at a Flex application these days and seen that dull, default greyish blue color...

So here's my tip for the day:

Check out the compiler arguments line in the Flex properties and add

-default-background-color #PUTYOURCOLORHERE

Easy to do, and then your Flex apps won't look like everyone else's anymore :-)

More compiler arguments are available if you'd like to get frisky...

http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=compilers_123_24.html

And better yet, check out Ted Patrick's blog on creating custom preloaders and be a real rock star.

http://www.onflex.org/ted/2006/07/flex-2-preloaders-swf-png-gif-examples.php

Installing CFEclipse/Subclipse plugins on FlexBuilder 3

A co-worker sent me this post for installing things through software updates. Issue is, trying to install through update sites would result in error:

Eclipse Modeling Framework (EMF) - org.eclipse.emf.codegen.ecore.ui (2.3.0.v200706262000) requires plug-in "org.eclipse.jdt.core".

Joao (Fernandes?) has posted the solution over on his blog:

Link Here

Note the comment I added about having to check a second option labeled:

'Eclipse Java Development Tools 3.3.1.r331_......' as well to get it to work.

Thanks Joao!

What is Adobe Thermo? - Answer: Designer/Developer Integration

Notes taken from the keynote at MAX:

- an RIA design tool

- allows designers to create rich internet applications with logic embedded

- allows them to wire up interactivity without working any code

- allows them to use dynamic data without having access to the data source

- seamless workflow for developers working with flex builder

- can access Flex source code for the design

- taking a layered image from photoshop, and importing the psd file into Thermo generates layout and code for that layout.

- converting artwork to components on the fly (wow, very cool)

- they take a rectangle graphic, right click, convert to a TextInput component, and it retained the text within the graphic (made default text of TextInput component), all style information on the graphic is transferred to component (including font styles)

- highlight multiple graphical elements, and converted the group to a list, and creates a design time data set with the selected images to power the list

- changed padding on list items, and an onion skin of original image placement was retained for reference but just with reduced opacity

- edited an item in the list in place, and added an event to it to go to a new state, applied a transition to the state change. The state change was a size change, and was able to preview the increase in size, with the transition effect applied. Added some text information underneath the new state, which had fade effects applied to it. Was able to stagger effect play times using a simple gantt chart type tool.

- automatically provides lorem ipsum text for testing, and can define the number of words to show for it.

- takes two selected rectangle and converts to a scrollbar instance (seriously?... no way...) Able to identify the different layers of the graphic selection as the different components of a scrollbar. Associates the new scrollbar with the list using a wiring handle to simply drag over the list that it should affect, binding the two components together.

- able to easily add new items to the design time data collection

- and it all just works... amazing... bring on the applause :-)

- thermo and flexbuilder share the same project format, meaning designers and developers can very easily collaborate during development cycle.

- can expect early alpha/beta next year (2008).

Flex is Catching On... a conversation on the Train

More than a few times on my commute into or home from work, I see people plugging away on laptops, and wonder what they're working on. Sometimes, if I'm sitting directly behind them, I can make out the Eclipse IDE view, and immediately think "Hey, maybe they're working with Flex?"... I'm not peeping, or want to intrude by asking what they're doing (would be kind of rude no?)... but still wonder.

Then this morning, for the first time ever, I overheard a couple of guys above me discussing Flex. Well that's kind of neat isn't it... a sure sign that the Flex buzz is really catching on. I caught bits of the conversation, and the two guys (one with a background in Flash) had nothing but positive things to say about the framework, and ability to create "cool" things easily.

So a word of caution... don't sit close to me on the train if you want your privacy ;-)

"Flash Player Not Found" Flex Builder/Player patch

Mike Morearty has posted a fix for a FlexBuilder fix if you've installed FB3, or just the newest version of the Flash Player, and are all of a sudden seeing "Flash Player Not Found" when compiling your apps. Check it out here...

http://www.morearty.com/blog/2007/04/16/new-flash-player-and-also-a-flex-builder-patch/

Google Finance with Flex from Silvafug last night

So I gave a presentation at the Silvafug meeting at Adobe in San Jose last night on Flex Charting. I struggled on what to give the talk on up until about a week ago. I finally decided to continue with the basic range selection example I'd done a few months ago, and create a "Google Finance" app in Flex, with all (or almost all) the functionality that the Google app offers.

While the presentation was exciting and fun to do, I think my last minute prep, and the fact I haven't spoken in public for many many many years resulted in a less than stellar walk-through of the functionality involved. However, the experience and feedback gained from last night was HUGE. I realized how I can improve the presentation 1000% percent, and plan on doing so before I give my talk in Seattle at 360Flex on August 13th (at least that's the tentative date.

Today I'm posting the app for everyone to play around, but am holding off on posting the code until Seattle (I don't want to steal my own thunder). However, I fully intend to release both the code-base, and an associated swc file for everyone to use, and integrate their own data into this type of interface. Hopefully this might entice the fence-sitters to attend 360 in August if you're interested in this kind of stuff.

I will say that it's not complicated stuff... and everyone and anyone should be able to insert their own data, or adapt the UI to fit their own project needs.

So here's the app... (click the image to view)

Flex Chart Annotations... Source and Example

I've finally posted my Flex Charting Annotation sample and source code over on my personal blog... http://www.visualconcepts.ca/blog/

360Flex Conference - Seattle

A quick note that I'll be doing a presentation at the 360Flex conference in Seattle from August 13th to 15th. More details to come as I finalize a topic. Looking forward to seeing even more talented/aspiring/curious Flex developers than we had in San Jose.

360 Flex - Seattle

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.5.1.