July 21st, 2008 by Kyle
Tags: , , , ,
Posted in: Flash Player, Flex


I have answered questions for a few customers regarding the policy files changes in the recent releases of the Flash Player and have referenced the following documents:

This change in behavior is noted in the following kb article:
Sockets do not function in Flash Player versions later than 9.0.115.0

A good reference on the security changes in the new Flash Player is located here:
Policy file changes in Flash Player 9

The page that is probably of most interest to you is here:
http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_04.html

This is an article describing how to set up a socket policy file server and provides some samples:
http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html

In addition to these articles, I have found 2 more that I personally found useful:

This one shows how to make and use a simple java socket server to act as a policy file server:
AS3 + Java: Socket connections to ports below 1024

This blog post shows how to create a simple java app that tests your socket server:
Flash Player 9 Update 3 and the Socket Policy File

Now if only I could figure out how to easily start the socket server when I start my TOMCAT server up?? Anyone?



1 Comment »

February 27th, 2008 by Kyle
Tags: , , , , , , , ,
Posted in: Flex, LCDS


Here are some debugging tips I provided to a customer this week regarding debugging ant tasks that seemingly compiled a Flex app that used dataservices fine, but the app didn’t seem to get any data. The are generally useful, so I thought I would post them.

1. Try setting fork=”false” in your mxmlc and compc ant task, since forking the compile process will hide the stdout and stderr streams from the compile process and hide any errors or warnings that may be happening in the compile process, setting the fork to false will allow you to see any compile output in your console.

2. In your ant target echo out a formatted statement that would represent the equivalent mxmlc (or compc) commandline statement with all variables and relative paths, etc. resolved. Then you can use this echoed statement to run against mxmlc to help detangle yourself from ant to rule that out as a source of problems or rule out any pathing issues.
(Maybe you are not pointing to correct sevices-config.xml file?)

3. Make sure your dataservice tags and dataservice operations have fault handlers. (Maybe faults are being returned from the dataservice or the operation, but they are not being handled.)

4. Compile the Flex app with and run in the debug Flash Player. This should produce logging info in the flashlog.txt that is helpful for watching the network traffic between your Flex app and a server and may help narrow down the issue.
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=logging_125_10.html

5. Look in your LCDS install dir under resources/config at the services-config.xml. This file is a sample config file that has comments explaining the various settings. You want to look at the logging tag and enable more verbose serverside logging.

You should probably set the logging tag like this:

(This will log “Debug level” output to your servlet container’s logs.)
The default patterns are probably sufficient to start with, but this sample config file lists all the possible debug patterns. If the debug level does not result in enough info, you may want to try the “All” level.

6. Use a network traffic sniffing tool like Charles: http://xk72.com/charles/ to view traffic between browser and server.



No Comments »

I just published two Tech note articles for Flex regarding changes to Daylight Savings time in effect for 2007 and Sun’s JVM changes regarding this:

“How to upgrade the JVM shipped with Flex”

and

“Flex and Sun’s JVM: U.S. Daylight Saving Time changes in 2007″



1 Comment »