Recently in Flex Category

XML Manipulation in Flex and ActionScript

| No Comments
There are lots of crazy ways of manipulating XML in ActionScript.Here are a few simple tips and tricks on manipulating XML in Actionscript.

  1. Declaring an XML Variable: An XML variable can be created in ActionScript as follows :
                 var tempSearchXML:XML =     <searchCriteria>
                                                                <branchName>023</branchName>
                                                                <contfirstname></contfirstname>
                                                                 <contlastname></contlastname>
                                                                 <contmailsort></contmailsort>
                                                                 <contphone></contphone>
                                                             </searchCriteria>
                                         
2.  Preview an XML Variable : An XML variable can be previewed in an Alert Box by converting the XML to a string object
       
            Alert.show(tempSearchXML.toString());
           
3.  Getting the value of a Node in the XML:

           Alert.show(tempSearchXML.branchName.toString());

4.  Setting the Value of Node in the XML : The following code sets the value of a node 'contfirstname '.
 
            tempSearchXML.contfirstname ="Armaghan";

5.  Setting / Changing / Updating the Node Attribute in the XML: The following code snippet changes the name of a Node from 'contlastname' to 'lastname'.

            tempSearchXML.contlastname.setName("lastname") ;
           
5.  Delete a Node in the XML: The following code snippet deletes a Node called 'contphone' in the XML.

            delete tempSearchXML.contphone;

6.  Adding a Node in the XML: The following code snippet adds a Node called 'text' in the XML and sets its value at the same time.

            tempSearchXML.text ="Taylor" ;

Happy Coding :)

Native Drag and Drop with Adobe Air

| No Comments

I came across a good article for native drag and drop support in Air apps. Thought i'd re-share it with the world :)

Native drag and drop link

Share what you learn....Happy Coding :)

Remote Debugging Using Flex Builder IDE

| No Comments

About a year ago, i came across the wonderful world of remote debugging and was surprised to find such a powerful feature within Flex Builder. I have been using it since then for every project. I have listed a step by step guide on how to configure your Flex IDE to use remote debugging.

Its important to note that if you have exported the project as a release to the remote site, this approach will not work(for the obvious release that its no longer a dev project). To use remote debugging, developers like myself just copy the contents of the bin folder and use these files for remote debugging.

Initially,I had a painful experience finding an article on Remote Debugging with Flex 3. Here's some free  advice in a few time saving steps:

1. Copy your project to a remote site (In my case: http://myDevServer:9080/myRemoteApp). You should copy the files out directly from the Bin folder of your project as mentioned above.

2. In Flex Builder 3, navigate to Run > Debug > Other... or click on that bug icon and click on other.

 

Rem-Debug0.PNG

3. In the Create, Manage and Run Configurations dialog that just opened up, either create a new configuration or keep the one that just opened up for you ( I'm assuming you were debugging the app locally on your PC before you decided to run remote debugging).

4. In the URL or Path to Launch section, uncheck the Use defaults checkbox.

 

Rem-Debug1.PNG

5. In the debug, run and profile fields, add the location of the html file hosted on the remote server( Developers tend to point these to the swf file, it doesn't work that way).
e.g., http://myDevServer:9080/myRemoteApp/index.html

 

Rem-Debug2.PNG

6. Click on the apply button,close your eyes and click the debug button to start debugging your remote application.

Share with you learn...and Happy Coding :)

Best Practices:Sync your Flex Project using Subclipse

| No Comments

I've noticed that a lot of Flex Developers aren't fimiliar with checking in their source code for the projects into the SVN (Subversion Client) through Flex Builder using Subclipse. Its really simple since Flex Builder is built on the Eclipse framework. If you are using the Eclipse Plugin it will be the same steps for you as well. Here's how you do it.

Step 1. From your Flex IDE, click on help >> Software Updates >> Find and Install

 

 

0.PNGStep 2. Select the "Search for new features to Install " option

 

1.PNG

Step 3. In the "Update sites to visit " window, click on "New Remote site " and add the following URL as show in the diagram. Once done, click on "OK" and click on finish. This should update your flex builder with Subclipse.

 

     

2.JPG

To verify your installation, Window >>  Perspective >> Other and you should see "SVN Repository Exploring " at the bottom. Click on "OK" and you should be able to see the SVN Perspective.

 

3.PNG

 

4.PNG

Go ahead and check in/ Check out your project directly to/from the SVN.

Happy Coding :)

Pages

About this Archive

This page is an archive of recent entries in the Flex category.

Acrobat is the previous category.

Java is the next category.

Find recent content on the main index or look in the archives to find all content.