Second step : setup your Flex project

The server is ready, we won't have to touch it anymore for now.

For the Flex part, either checkout from google code, either use the zip file here. It contains a Flash Builder 4 project that you can import in your workspace as a Flex Library Project. If you want to copy the src folder directly in your main project, of course you can.

  • Create your main project, let's call it FlexqueriesDemo. It should be under your web root.
  • On the last page, add the FlexqueriesLib project to your library path
  • Set the output folder URL as you would write it in your web browser


Here is what you should have :


Once created, you have to copy two javascript files into your html-template directory. They are in the /js directory, in the FlexqueriesLib project. These two files are required for synchronous calls. The first one is prototype.js, a wonderful library, and the other one is the actual synchronous calls handler.

You then just have to add references to these javascript files in the index.template.html, like this :


	        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	        <style type="text/css" media="screen">
	            html, body    { height:100%; }
	            body { margin:0; padding:0; overflow:auto; text-align:center;
	                   background-color: ${bgcolor}; }
	            #flashContent { display:none; }
	        <script type="text/javascript" src="prototype.js"></script>
	        <script type="text/javascript" src="flexajax.js"></script>
	        <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
	        <!-- BEGIN Browser History required section ${useBrowserHistory}>
	        <link rel="stylesheet" type="text/css" href="history/history.css" />


The environment is now ready !

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <pre>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.