10 Awesome Flex Developers You Should Follow

These individuals have all inspired and/or helped me at one point in time. I’d like to take a moment to point them out and say thanks. They have all helped me greatly and their insight is fantastic. You should check out their blogs or follow them on twitter to gain great Flex development advice, code, tutorials, articles, etc. Thanks to all of you very much!!!!

David Tucker

I first noticed David’s work when he created the blog series on learning Cairngorm. He did such a great job it was amazing. He provided written explanations, code example and videos. Kudos man, I still send people there to learn about Cairngorm. David Tucker is a Rich Internet Application developer, author, and trainer. David currently serves as a Software Engineer at Universal Mind. In addition, David also blogs regularly at InsideRIA where he produces the Weekly RIA RoundUp podcast. David also recently completed the AIR 1.5 Cookbook (with a great group of co-authors) and the Lynda.com series,
AIR for Flash Developers.
Check his blog here:
http://www.davidtucker.net/
Follow on twitter:
http://twitter.com/mindmillmedia/

Andy Powell

Andy is pretty much a guru in Flex / server integration and development. Andy has answered a number of my questions about Java, BlazeDS and Spring integration for Flex development. Andy is a RIA developer located in the metro Atlanta, GA area. He is currently employed by Universal Mind where he builds really cool applications with tools like Java, Adobe Flex, Adobe ColdFusion, Adobe Spry, Hibernate, Spring, & other cool technologies.
Check his blog here:
http://www.infoaccelerator.net/blog/
Follow on twitter:
http://twitter.com/umandy/

Laura Arguello

She was instrumental in providing technical reviews and input regarding the details of the framework. Laura is the CTO at ASFusion. She specializes in RIA development using ColdFusion and Flex. She regularly gives presentations at tech conferences and user groups. She is a Certified Advanced ColdFusion MX 7 Developer and the manager of the Orange County Flex User Group.
Check her blog:
http://www.asfusion.com/
Check her side project blog:
http://www.mangoblog.org/
Follow on twitter:
http://twitter.com/instante/

Matt Chotin

Matt is a Product Manager for developer-focused technology after having been a software engineer for 6 years. He is the Product Manager of Flex at Adobe.
Check his blog here:
http://weblogs.macromedia.com/mchotin/
Follow on twitter:
http://twitter.com/mchotin/

Eric Feminella

Eric is one of the best Flex developer. Definitely an extra special thanks to Eric!! Eric is a Software Architect specializing in providing quality solutions and services for enterprise and consumer class RIAs targeting the Adobe Flash Platform and associated technologies.
Check his blog here:
http://www.ericfeminella.com/blog/

Adam Flater

Adam is a Technical Architect and Evangelist at Roundarch. His career has been centered on building innovative graphical user interfaces and research of emerging technology. He is also a contributor to InsideRIA and the creator of Merapi.
Check his blog here:
http://adamflater.blogspot.com/
Folllow on twitter:
http://twitter.com/adamflater/

Kevin Hoyt

He provides what seems to be effortless presentations that are easy to understand, interesting and just plain cool. Kevin is a Platform Evangelist with Adobe, and is actively involved with both the Flash and JavaScript communities.
Check his blog here:
http://blog.kevinhoyt.org/
Follow in twitter:
http://twitter.com/parkerkrhoyt/

Sean Voisen

Sean works with a lot of different technologies and probably wouldn’t classify himself as a Flex Developer. Sean has been a teacher at the Art Institute of California and has worked with companies like AOL and Adobe.
Check his blog here:
http://voisen.org/
Follow on twitter:
http://www.twitter.com/svoisen/

Jesse Warden

Jesse is a professional software design & development consultant. His background is in multimedia, blending art & programming together. If it’s cool, and computer related, he wants to be involved. He is currently a Flex & Flash Architect at Roundarch.
Check is blog here:
http://jessewarden.com/
Follow on twitter:
http://twitter.com/Jesterxl/

Rich Tretola

Rich has been building Internet applications for over 10 years and has worked with Flex since the original Royale beta version of Flex in 2003. Other than Flex, Rich builds applications using ColdFusion, Flash, and Java.
Check his blog here:
http://blog.everythingflex.com/
Follow on twitter:
http://twitter.com/richtretola/
  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
Read Comments

Flex Documentation links

Flex Documentation link: http://livedocs.adobe.com/flex/3/flex3_documentation.zip
  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
Read Comments

Technical FAQ for Flex Developers

1. How do I integrate Flex with IIS?
The "Integrated JRun" install does not support IIS connectors. If you are using full JRun or ColdFusion, visit the link below:
http://www.macromedia.com/go/96611248
For other application servers, see their respective documentation.

2. Can I dynamically instantiate a WebService or HTTPService in ActionScript?
Flex 1.5 does not support this. First declare the tags in MXML and then manipulate the URLs, request objects, and so forth using ActionScript.
See the simple "Beginner's Tips" examples on www.cflex.net, and see the Cairngorm Framework's Service Locator pattern for a more fully realized solution.

3. Can I load CSS style sheets dynamically at runtime?
Dynamic loading of CSS files is not supported in Flex. CSS in Flex is processed on the server side during MXML compilation rather than on the client side at runtime.
There is a trick though: A CSS file can be compiled into a separate SWF file and loaded dynamically into the application using the Loader component. Read more about this topic on Manish Jethani's blog at http://www.livejournal.com/users/mannu/286686.html.

4. When I set visible="false", the component still takes up space and appears in the tab order. Why is that?
You can often achieve the "display=none" effect by setting the height/width to zero when you set it invisible, and then set it back to a fixed value or to undefined when you make it visible again.

5. Why are my ValueObject member variables undefined in the results from my RemoteObject requests?
Flash Player deserializes objects in a special order that can confuse developers used to object serialization from other RPC systems. When a strongly typed object is returned to the player, it first creates an instance from the prototype of the registered class without calling the constructor. It then populates the object with the properties sent in the result. Finally, it calls the constructor without arguments.
If your ValueObject constructor expects arguments to initialize an instance, be sure to check whether arguments were actually sent to the constructor before overriding member variable values.
Note: Flash Player does not currently honor getter/setter properties in object serialization or deserialization.

6. Why do strongly typed objects appear as "undefined" in the NetConnection Debugger?
The NetConnection Debugger is an old utility from the early days of Flash Remoting that some developers still find useful. It has an issue, however, displaying types that have been registered with Object.registerClass(). If your Flex server is installed locally, we suggest enabling server-side "debug" level logging in /WEB-INF/flex/gateway-config.xml to watch the raw trace information in the Flex server console/logs from the AMF Gateway as it processes your RemoteObject requests.
Flex Builder also includes a Network Debugger that allows you to monitor AMF traffic.

7. How do I get access to the J2EE session from my RemoteObjects?
The AMF Gateway provides access to the current HttpServletRequest instance in a thread local variable. The session can be obtained from the request, as follows:
flashgateway.Gateway.getHttpRequest().getSession();

8. Can I resize the Internet Explorer browser window from Flex?
Use getURL() to communicate with JavaScript in the HTML wrapper:
getURL('javascript:window.resizeTo(1050,900)');
Note: This solution has been tested only in Internet Explorer.

9. Event Bubbling
Ans: The mechanism through which event objects are passed from the objects that generates an event up through the containership hierarchy


10. Can Flex applications communicate with each other on the client?
See the LocalConnection API in the documentation.

11. Is double-clicking supported on various components?
Unfortunately, double-clicking is not supported by default. If you wish to add this functionality to, say, a List or DataGrid component, you will have to add the following ActionScript 2.0 code to your application:
// used to detect a double-click
var someTimestamp:Number;

...

/**
* Double-click handler for some DataGrid component.
*/
public function doubleClickHandler( evt:Object ):Void {
var now = getTimer();

// we got a double-click
if( ( now - someTimestamp ) < sometimestamp =" now;">

12. Why are there errors with the macromedia.css.LocatorParser class and WebLogic?
WebLogic ships with its own version of the fop.jar, which in turn includes the batik.jar, which is older and breaks Flex. To resolve this issue, remove the fop.jar from the CLASSPATH in the startWebLogic.cmd file. This may apply to non-WebLogic servers as well, where batik.jar was included.

13. What does "The URL is not in the Proxy's whitelist" mean?
The whitelist is a security feature in Flex that requires you to define explicitly which URLs a data service call can access. You set this by editing the following file: ...\[flexroot]\WEB-INF\flex\flex-config.xml There are three sections, one each for WebService, HTTPService, and RemoteObject. Be sure you edit the correct section! Each has a subsection which contains nodes. To enable a URL for access by a Flex dataService call, enter that URL between the tags. For development phase only, you can allow global access with the wildcard rows. The flex-config file is heavily commented. Open it up and you will see more detailed instructions there.

14. Sometimes, if I don't move the mouse, "click" and "mouseDown" don't work. Why is that?
This is a focus issue with Flash Player; usually when the UI changes "underneath" the mouse pointer, as in a ViewStack navigation where the buttons are in the same screen location. One workaround is to add the following property to the Button tag: trackAsMenu="true"

15. Can I make my own right-click (or context) menu?
Flex—or, more correctly, Flash Player—has the notion of a context menu that you can configure. Check out the Flex LiveDocs for details about the ContextMenu class: http://livedocs.macromedia.com/flex/15/flex_docs_en/00001276.htm However, there is a limitation of the current player (Flash Player version 7 and earlier) where the context menu can only be shown on components inside the root container (such asmx.core.Application.application). You can get around this by having the context menu on the root object and changing it dynamically at runtime depending on which component the mouse is over—but this is a bit more work for you.

16. Why is myTreeNode.label or myTreeNode.attributes.label undefined?
Make sure you use the TreeDataProvider methods to modify a node. Don't rely on the node being XML. For example, the above should be myTreeNode.getProperty("label")instead.

17. When I add or modify an item in my dataProvider, why doesn't it show up in my DataGrid?
Low-level methods like Array.push() or myArray[0] = "whatever" do not cause the dataProvider's modelChanged event to fire. When you work with a dataProvider, it is always best to use the dataProvider API. In the above example, you might code: myDataProvider.addItem(myItemObject) to add an item or use editField() to modify a value programmatically. See dataProvider in the Flex LiveDocs:http://livedocs.macromedia.com/flex/15/asdocs_en/index.html Alternatively, you can call myDataProvider.modelChanged yourself or reassigndataProvider to the control, as follows: myDataGrid.dataProvider = myDataProvider;

18. myTree appears just fine but why can't I access the node attributes?
Select a node in your myTree. In ActionScript, you can reference this node by using the following code: myTree.selectedNode; To access the attributes of the node, use the tree DataProvider API. These methods will work for any format dataProvider item, which might be an object, array, or XML node. The following example might work: myTree.selectedNode.attributes.myAttribute But the following example is far more reliable: myTree.selectedNode.getProperty("myAttribute"); See dataProvider and treeDataProvider in the Flex LiveDocs: http://livedocs.macromedia.com/flex/15/asdocs_en/index.html

19. Can I create an application in Flex, compile it into a stand-alone SWF file, and run it on a machine without the Flex server?
This is technically possible. However, the Flex 1.5 license requires the presence of a Flex server, and the SWFs compiled using the Developer version of Flex expire in one day. Review the license carefully. If you have a special business case for doing this, contact your Adobe sales rep; they are often willing to discuss special agreements.

20. How do I pass parameters to a pop-up window?
Tracy Spratt has put together a very simple example that you can download here: • http://www.cflex.net/ChannelFiles/1/popupexample2.zip (ZIP, 4K) You can read more details regarding this solution at:http://www.cflex.net/showfiledetails.cfm?objectID=197

21. What does "Branch between ... and ... around line ... exceeds 32K span" mean and how do I get rid of it?
Don't panic. Your application is not too big for Flex to handle. True, the 32K limit is really a Flash Player limitation to the size of certain structures, such as if blocks and for loops. But you don't really care about that right now because you don't have any direct control over those things. Here is some information that will help you get back to coding. There are two main reasons why you might encounter the 32K issue. The primary cause—and the one to address first—is the architecture of your application code. The 32K error message asks you to "refactor" your code. Refactoring is essentially the process of modifying the structure of your source code while keeping the same functionality. In the Flex world, this means moving some parts of the code out of a main file and into separate components. One way to do this is to use custom MXML components. So instead of, say, having several hundred lines of MXML in a child container of a ViewStack, you put that MXML code into its own component file and have just a single line in the ViewStack reference it. If you do that for all the ViewStack children, 1000 lines of code can easily become 30. Decreasing the total number of visually rendered MXML tags in a single file will help avoid the 32K limit. Another type of refactoring is to move ActionScript code into its own class. Important note! Just putting the ActionScript code into a file and then using the#include directive or the mx:Script source="myscript.as" method to include the code will not help with the 32K problem. You must create a true ActionScript class that contains the functionality. At 2000 lines of mixed MXML and ActionScript code, you are in danger of the 32K error. We have not found an upper limit whatsoever to code length in a class. The second cause of the 32K error is not your fault. During compiling, Flex generates ActionScript code out of your MXML source. It then compiles that into the Flash SWF file. During that process it decides how to break up your source code and generate the ActionScript class code. In Flex 1.5 it doesn't always make the right decision, and so the result is the 32K error. If you are confident that your application is already efficiently "refactored," and you suspect that you might be at one of these boundary conditions, first try compiling the app with ?debug="true" in the URL. If the app compiles, then you are surely at a boundary condition. What happens is that debugging adds code to your source during generate/compile. This additional code causes Flex to change the structure of the ActionScript classes so that the application does not reach the 32K limit. Hmm, more code? Yeah. Try just adding 50 or so lines of code, even if it is bogus code. Usually, this will get you working. When you add more real code, remove the bogus code because you won't want that in your production code! We have found a third cause of the 32K limit error: There are some syntax errors that get by the compiler, yet cause the 32K limit error. At this time there is no example of the kind of syntax that can cause this problem, but you should be aware that it is possible. A final hint: After hitting a 32K error and trying one of the previously described solutions, and if the error still occurs, delete the temporarily generated ActionScript code. It is located in ..\MyAppServer\flex(flexroot or contextroot)\WEB-INF\flex\generated\*. You can delete all the folders safely (make sure to restart your Flex server). This can be an aggravating and somewhat scary problem, and it always seems to happen just before an important demonstration. Just use good, modular design and remember the bogus code trick. Adobe has stated that it is committed to improving this situation in the next release.

22. What does "Warning: Changes to unknown property, ..., will not be detected" mean and how do I get rid of it?
Generally speaking, binding needs type information to set up its change detection functionality. Anything that hides this information can cause this problem. Here are some ways around this problem: • Don't use mx.core.application.application.myVariable in binding. • If you are passing a reference to some component into another component through public properties, type the property variable definition as specifically as possible. If you pass a reference to the application itself, the type is the MXML filename. • When using "dot.down" notation to specify a property in an object or model, cast it to a type:text="{String(myObject.whatever.firstName)}"

23. Is there a Rich Text Editor?
With the current Flex 1.5 component set, there is no Rich Text Editor. There are some limitations in the current version of Flash Player (Flash Player 7 and earlier) that make such an editor difficult, although there are implementations that people have used. Adobe has heard many requests for a Rich Text Editor and has indicated that there might be better support for it in a future release. There is a third-party component called FlashTextEditor that you can integrate. There are plans for Flex 2 to include the mx:RichTextEditor tag.

24. How do I run Flex as a service?
Flex is not a server that you deploy and run. It is simply deployed as part of your web application. So it will work, no matter which web container you are using: Tomcat, JRun 4, WebLogic, and so forth. To learn how to deploy Tomcat, JRun 4, or any other Java server as a service, refer to the appropriate documentation for the server you are using.

25. Does Flex work on my platform?
Probably. Search the archives if you have a specific question about your platform before posting to the list.

26. How do I get Flex to query my database?
Flex does not have any native database integration functionality. You must have your own server-side tier that provides the database-access tier and sends the data back to Flex through one of the following protocols: • RemoteObjects: This is the fastest. It communicates with server-side EJBs or POJOs using AMF, a binary compressed format. • HTTPService: This one uses the HTTP protocol. Sources can be JSP, ASPx, .NET, or any URL that returns HTTP. • WebService: This is the slowest. It uses the SOAP protocol. Sources can be .NET or any web service.

27. I'm sending my request, and I see the data traffic in the command window, but why is the result always empty? You are probably trying to read the result immediately after the send(), right?
You're expecting synchronous behavior? You can't do this. See the next question, "How do I make synchronous data calls?"

28. How do I make synchronous data calls?
You cannot make synchronous calls. You must use the result event. No, you can't use a loop,setInterval, or even doLater. This paradigm is quite aggravating at first. Take a deep breath, surrender to the inevitable, resistance is futile. There is a generic way to handle the asynchronous nature of data service calls, called ACT (Asynchronous Call Token). Search for this in the Developing Flex Applications LiveDocs for a full description. Here it is in a nutshell.

This example uses HTTPService but will be similar for RemoteObject and WebService:
1. Create a function to handle the data return, like onResult().
2. In the HTTPService tag, put this function name in the result property and pass "event" in too.
3. Invoke the call in the script:
4. //invokes the call to the HTTP data service
5. var oRequestCallbject = app.mxdsGetData.send(oRequest);
6. //Next, define a string to identify the call. We will use this string value in the result handler.
7. 8. oRequestCall.MyQueryId = "WhateverIWanttoUseToIdentifyThisCall" ;
9. //Yes, you CAN set this AFTER you invoke send()
10. In the result handler, which will be called every time the data service call returns, identify what the returned data contains, as follows:
11. var callResponse = oEvent.call; //get the call object
12. //gets the value of this property you set in the call
13. var sQueryId = callResponse.MyQueryId; //will be "WhateverIWanttoUseToIdentifyThisCall";
14. trace(sQueryId); You can use the sQueryId value in a switch to do the correct processing. Alternatively, you can pass reference to a handler function directly.

29. When I have only a single record, why doesn't it appear in my DataGrid?
This is a known issue that is caused by the inability of Flex to differentiate between an object and an array with a single row. The solution is to always use toArray(), as in the following examples: In MXML: {mx.utils.ArrayUtil.toArray(modelAccidents1.accidents.accident)} The inline format: dataProvider={mx.utils.ArrayUtil.toArray(testSrv.result.result.error)} In ActionScript: myControl.dataProvider = mx.utils.ArrayUtil.toArray(testSrv.result.result.error)

30. I have two alerts in my code, but why do they appear in reverse?
Actually, it is worse than that. Alerts and "modal" pop-up windows are not truly modal. They prevent user interaction with the interface, but they do not block code execution. What happens is that both alerts appear; the second one on top of the first. To get the behavior you want, use events and handlers. Your code must display the alert, or modal pop-up window, and then end. When the user dismisses the prompt, you then complete the processing. You should be able to find some examples of how to do this on one of the sites listed in the Resources section of cflex.net.

31. Why are the columns in my DataGrid in some strange order?
The order is typically the reverse of the order in which they were added. If you need a specific order, specify that and many other good things by using DataGridColumn tags. See the Flex LiveDocs for more information about this.

32. Can I embed HTML in my Flex application?
Flex supports a limited subset of HTML in its TextArea and some other text-related classes. There is also a new article by Christophe Coenraets on his blog discussing how to fake HTML with an IFRAME: http://coenraets.com/viewarticle.jsp?articleId=95

33. How can I make Flex Builder faster?
For Flex 1.5: To improve Flex Builder performance, it is best to disable the Design view. This can only be done in Flex Builder 1.5. To do so, please follow these steps: 1. Select Preferences > Edit.
2. In the General section, deselect the Enable MXML Design View option.
3. Click OK.
For Flex 2: Deselect the Build Automatically option. Deselect Project > Build Automatically option from the menu and you will see an increased performance, especially during save operations. Also, if you're not using a project, make sure you close it, making more memory available.

34. Why doesn't the Flex Builder debugging tool stop at breakpoints in components?
The safest way to set breakpoints in component files is to use the Files list. Start the debugging session, navigate in your application to where you want to start debugging. Click the Files button on the Debug Toolbar (select Menu Debug > Files). Select the component you want, usually the MXML or ActionScript files.
The list strips out underscores in filenames and can be very long, but this method always works. Flex Builder will open a temporary file and set the breakpoints. Now you can proceed.

35. Are there frameworks available for Flex?

Yes there are:
• Cairngorm: http://www.iterationtwo.com/open_source_cairngorm.html
• FlexUnit: http://www.iterationtwo.com/open_source_flexunit.html
• SynergyFLEX: http://www.mossyblog.com/archives/473.cfm (this link is for 1.0.0a)
• ARP: http://www.osflash.org/projects/arp/about
• AsUnit: http://www.asunit.org

36. Is vertical text possible in Flex?
Yes, that is possible. You have to embed the font outlines and then use the _rotationproperty of the control.
For example, you can use the Label _rotation property. But you would need to embed the font if you want to rotate a Label, TextInput, or TextArea:


@font-face
{
fontFamily:myfont;
src:url("file:///c:/windows/fonts/Georgia.TTF");
}

37. How do I print custom components in Flex 1.5? How do I customize printing in Flex 1.5?
See the following resources:
• Printing only a record set from a datagrid (Flexcoders list)
• Printing whole lotta pages? (Flexcoders list)
• Tips for using PrintingJob in Flex 1.5 by Lin Lin
• The Secret to Printing in Flex by Darron Schall
• Printing Custom Flex components using PrintJob by Abdul Qabiz

38. Can I upload files from a Flex 1.5 application?
Yes, see the following resources:
• Flex applications using Flash Player 8
• Flex applications using Flash Player 7
• File Uploading in Flex Using ColdFusion and JavaScript by Jack D. Minster

39. Can I call an ActionScript function in a Flex 1.5 application from JavaScript?
There is no direct way to call an ActionScript function from JavaScript with Flex 1.5 applications running Flash Player 7. Flash Player 8 has a new feature called ExternalInterface that allows two-way communication between ActionScript and JavaScript.
Because Flex 1.5 applications cannot take advantage of some of the new features in Flash

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
Read Comments