Use length of XML file to tween movieclip?

Hello,
I'm creating a horizontal scrolling gallery in which the content is loaded through xml. So far the xml loads fine and the content is easily nested within movieclips and positioned within a larger movieclip containing each of the movieclips containing the content. With that said, I am able to move this main movieclip left and right with no problem using a tween and a fixed position but I have no way of stopping the movieclip according to how much content is in the xml file. I'm attempting to use the length of the xml file to move this main movieclip but either it can't be done or my coding is wrong.
Thank you in advance!
Here is my code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import  fl.transitions.TweenEvent;
var currentContentIndex:uint = 0;
var  currentContent:MovieClip;
// container movieclip
var container:MovieClip = new  MovieClip();
container.y = 120;
addChild(container);
var imageLoader:Loader;
var xml:XML;
var xmlList:XMLList;
var xmlLoader:URLLoader =  new URLLoader();
xmlLoader.load(new URLRequest("gallery.xml"));
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
var x_count:Number = 0;
var y_count:Number = 0;
// Everything in the function below loads and positions fine
function  xmlLoaded(event:Event):void
     xml = XML(event.target.data);
     xmlList  = xml.children();
     for(var i:int = 0; i < xmlList.length(); i++)
          //  contentContainer
          var contentContainer:MovieClip = new  MovieClip();
          contentContainer.graphics.beginFill(0xFFFFFF);
          contentContainer.graphics.drawRect(0,  0, 1000, 500);
          contentContainer.graphics.endFill();
          contentContainer.width  = 1000;
          contentContainer.height = 500;         
          contentContainer.x  = (contentContainer.width+400)*x_count;
          contentContainer.y  = 0;
          // thumbInfo
          var  imageInfo:MovieClip = new MovieClip();
          imageInfo.graphics.beginFill(0x000000);
          imageInfo.graphics.drawRect(0,  0, 150, 100);
          imageInfo.graphics.endFill();
          imageInfo.x  = 400;
          imageInfo.width = 150;
          imageInfo.height  = 100;
          addChild(imageInfo);
          imageLoader  = new Loader();
          imageLoader.load(new  URLRequest(xmlList[i].attribute("source")));
          x_count++;
          y_count = 0;
          contentContainer.addChild(imageLoader);
          contentContainer.addChild(imageInfo);
          container.addChild(contentContainer);
function tweenCurrentImageF(){
     currentContent=MovieClip(xmlList[currentContentIndex]);  // PROBLEM CODE?
     var targetX:Number = stage.stageWidth/2 -  currentContent.x - currentContent.width/2;
     var  myTween:Tween = new Tween(container, "x", Strong.easeInOut, container.x,  targetX, 1, true);
rightArrow.buttonMode = true;
rightArrow.addEventListener(MouseEvent.CLICK,  right);
function right(e:MouseEvent):void {
     currentContentIndex++;
     if(currentContentIndex<xmlList.length){
          tweenCurrentImageF();

Hey again,
I understand what you are saying and I've omitted that problem code because it's code I'm trying to carry over from a gallery using an array of movieclips and, to me, it seems irrelevant to this code. I have moved some code around and the movieclip scrolls now but its scrolling directly to the last nested movieclip even though the "currentContentIndex" variable traces 0.
I moved the button and it's function code inside of the xmlLoaded function because it was recognizing "contentContainer.x" as an undefined term when it was outside of it (I just stated this in case this is the problem).
Thank you again!
Here is my new code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import  fl.transitions.TweenEvent;
var currentContentIndex:uint = 0;
// container movieclip
var container:MovieClip = new  MovieClip();
container.y = 120;
addChild(container);
var imageLoader:Loader;
var xml:XML;
var xmlList:XMLList;
var xmlLoader:URLLoader =  new URLLoader();
xmlLoader.load(new URLRequest("gallery.xml"));
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
var x_count:Number = 0;
var y_count:Number = 0;
function xmlLoaded(event:Event):void {
       xml = XML(event.target.data);
        xmlList  = xml.children();
        for(var i:int = 0; i < xmlList.length(); i++)
            //  contentContainer
            var contentContainer:MovieClip = new  MovieClip();
            contentContainer.graphics.beginFill(0xFFFFFF);
            contentContainer.graphics.drawRect(0,  0, 1000, 500);
            contentContainer.graphics.endFill();
            contentContainer.width  = 1000;
            contentContainer.height = 500;        
        contentContainer.x  = (contentContainer.width+400)*x_count;
        contentContainer.y  = 0;
          container.addChild(contentContainer);
            imageLoader  = new Loader();
         imageLoader.load(new  URLRequest(xmlList[i].attribute("source")));
          contentContainer.addChild(imageLoader);
            x_count++;
            y_count = 0;
          var imageText:TextField = new TextField();
          imageText.x = 400;
          imageText.y = 30;
          imageText.text = xmlList[i];
          imageText.autoSize = TextFieldAutoSize.LEFT;
          contentContainer.addChild(imageText);
     function tweenCurrentImageF(){
          var targetX:Number = stage.stageWidth/2 -  contentContainer.x - contentContainer.width/2;     
           var  myTween:Tween = new Tween(container, "x", Strong.easeInOut, container.x,  targetX, 2, true);
     rightArrow.buttonMode = true;
     rightArrow.addEventListener(MouseEvent.CLICK,  right);
     function right(e:MouseEvent):void {
          currentContentIndex++;
          if(currentContentIndex<xmlList.length()){
             tweenCurrentImageF();

Similar Messages

  • How to define the style for JTextArea using synth style xml file.

    Hi all,
    How can we align the text inside the JTextArea using synth style xml file.
    We defined a style for the TextArea. But the text is displayed immediately after the border. So we want to provide some space between the border and the text.We specified the insets as given below. But it is not reflecting during runtime.
    <insets top="3" left="3" bottom="3" right="3"/>
    Please help me if any one knows

    Hi Anju,
    This may help you.
    http://www.xenta.nl/blog/2009/10/28/oracle-soa-suite-11g-setting-and-getting-preferences/
    Preferrence Variable can be updated either thorugh EM console or ConfigPlan
    Regards,
    Richa

  • Overriding SPMetal Defaults by Using a Parameters XML File

    hi everybody,
    I have a datatable
    Employee below :
    FullName Single line of text
    Age
    Number
    After use SPMetal to generate entities, i have
    EmployeeItem below:
    FullName string
    Age
    double?
    I want Age is Integer so i use "Overriding SPMetal Defaults by Using a Parameters XML File" :
    <?xml version="1.0" encoding="utf-8"?>
    <Web AccessModifier="Public" xmlns="http://schemas.microsoft.com/SharePoint/2009/spmetal">
    <List Name="Employee" Type="Employee">
    <ContentType Name="Employee" Class="Employee">
    <Column Name="FullName" />
    <Column Name="Age" Type="Integer" />
    <ExcludeOtherColumns/>
    </ContentType>
    </List>
    <ExcludeOtherLists />
    </Web>
    When generate it have error "There is an error in XML doc" at :
    <Column Name="Age" --error here-- Type="Integer" />
    Would you like help me?

    Hi,
    I came across the same error when testing your code in my environment.
    Anyway, if we convert the Number field to Integer, there will be a risk of damaging our data due to the conversion accuracy.
    So if you want to use the Integer type of data, a workaround is that you can convert the double type of data to Integer type programmatically after retrieving the data you want.
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to specify the webLogic server startup script to use different config.xml  file ??

    Hi,
    I have 2 weblogic startup scripts (startWebLogic.sh and
    startWebLogic_recovery.sh) for the same domain.
    startWebLogic.sh uses config.xml file.
    I would like to use config_recovery.xml as the configuration file for startWebLogic_recovery.sh
    How would I do this ?
    I am using WebLogic Server 6.1 on SunOS 5.8 / HP-UX 11.0.
    Appreciate any help.
    Regards
    Gunaseelan Venkateswaran

    I guess you're using Weblogic 6.1 with WLCS 3.5. I think you're supposed to work with one config.xml for the same domain, and not have a different config.xml.
    To start up different applications or EJBs, use the "target" property to control which applications to start up for the particular instance.
    YY

  • How to set customized wallpaper using MDT unattended.xml file

    hello
    I need to set own wallpaper  with OSD using MDT.
    I have edited the unattended.xml file  as added below component to it, other customization with answer file worked except not getting set the wallpaper set and wallpaper  image is available at specified location.Please help to resolved this issue.
    <settings pass="oobeSystem">
           <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <Themes>
                    <DesktopBackground>\\MDTSERVER\DeploymentShare$\pics\images.jpeg</DesktopBackground>
                    <ThemeName>\\MDTSERVER\DeploymentShare$\pics\images.jpeg</ThemeName>
                    <ScreenSaver></ScreenSaver>
                </Themes>
            </component>
        </settings> 

    Putting the JAR files in WEB-INF/lib and using the standard URIs in the taglib directives are all that's needed; the container locates the TLDs in the JAR files at startup.
    If this doesn't work, it's a bug in the container. You may want to upgrade to a later version of Tomcat; 4.0.6 is ancient, and may very well be buggy in this area.

  • Using a local XML file for parsing - iPhone

    Good afternoon everyone. I am trying to create an application for the iPhone that will use an XML file for it's data source. I have been attempting to convert the SeismicXML application from the dev center to use a locally stored file, but to no avail. I have it building and running fine, but no data is appearing. Is there anyone that can give me an example of parsing with a locally stored file? Thanks!

    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"myFile" ofType:@"xml"];
    NSData *myData = [NSData dataWithContentsOfFile:filePath];
    if ( myData ) {
    NSXMLParser *parser = [[NSXMLParser alloc] initWithData:myData];
    [parser setDelegate:myObject];
    [parser setShouldProcessNamespaces:NO];
    [parser setShouldReportNamespacePrefixes:NO];
    [parser setShouldResolveExternalEntities:NO];
    [parser parse];
    NSError *parseError = [parser parserError];
    if ( parseError && error) {
    *error = parseError;
    // Do post load activity

  • Dreamweaver - using CDATA in xml file

    Greetings, I am a designer, not much of a coder... trying to bring in an xml file into an html file using the Spry Menu.  I went through creating the .xml file, inserting a Spry table, all working with success. EXCEPT that the CData link I have referenced is coming up as text, not a link.  I thought a CDATA attribute would be read as html.
    Here's the TEST.xml file:
    <?xml version="1.0" encoding="utf-8"?>
    <orgs>
    <org>
                <name><![CDATA[<a href="http://www.animaltribes.com">Animal Tribes</a>]]></name>
                <type>Sanctuary</type>
                <animal>Horses</animal>
                <animaltype>Wild Horses</animaltype>
                <city>Reno</city>
                <state>NV</state>
            </org>
    </orgs>
    And here's my page:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>TEST XML</title>
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var dsTest1 = new Spry.Data.XMLDataSet("TEST.xml", "orgs/org",{sortOnLoad:"name",sortOrderOnLoad:"ascending",distinctOnLoad:true,useCache:fa lse});
    //-->
    </script>
    </head>
    <body>
    <div spry:region="dsTest1">
      <table>
        <tr>
          <th spry:sort="name">Name</th>
          <th spry:sort="type">Type</th>
          <th>Animal</th>
          <th spry:sort="animaltype">Animaltype</th>
          <th spry:sort="city">City</th>
          <th spry:sort="state">State</th>
        </tr>
        <tr spry:repeat="dsTest1">
          <td>{name}</td>
          <td>{type}</td>
          <td>{animal}</td>
          <td>{animaltype}</td>
          <td>{city}</td>
          <td>{state}</td>
        </tr>
      </table>
    </div>
    </body>
    </html>
    I did not think I needed a .xsl page for a simple table like this.  I feel like I am missing something basic!  Please help.  Much appreciated.
    Kimberly

    Thanks for your quick response!
    So all I need to do is change the html file to add the line you suggested.  The html file looks like this now:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>TEST XML</title>
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var dsTest1 = new Spry.Data.XMLDataSet("TEST.xml", "orgs/org",{sortOnLoad:"name",sortOrderOnLoad:"ascending",distinctOnL oad:true,useCache:false});
    dsTest1.setColumnType("name", "html");
    //-->
    </script>
    </head>
    <body>
    <div spry:region="dsTest1">
      <table>
        <tr>
          <th spry:sort="name">Name</th>
          <th spry:sort="type">Type</th>
          <th>Animal</th>
          <th spry:sort="animaltype">Animaltype</th>
          <th spry:sort="city">City</th>
          <th spry:sort="state">State</th>
        </tr>
        <tr spry:repeat="dsTest1">
          <td>{name}</td>
          <td>{type}</td>
          <td>{animal}</td>
          <td>{animaltype}</td>
          <td>{city}</td>
          <td>{state}</td>
        </tr>
      </table>
    </div>
    </body>
    </html>
    I am getting FAILED TO RETRIEVE DATA SET (dsTest1) FOR SPRY REPEAT.
    Or do should I start over and re-insert the Spry region?
    Sorry for being a neophyte and thank you for your patience!
    Kimberly

  • Correct adapter to use for an XML file

    Hi,
    My current scenario for our business partner is that we are sending them an 850 and 856 then an XML file.
    For 850 and 856, we are using AS2 adapter. For the XML file, could I still use the same adapter?  Or I need to use File adapter instead?
    My scenario for the xml file is that an IDoc is converted to an XML file.  This XML file is then sent to the business partner.
    Please advise.
    Thanks very much.
    Regards,
    Lex

    Hi VJ,
    I just found out that I could also use the AS2 adapter to send the xml file to the trading partner.
    Thanks for your kind response.
    Regards,
    Lex

  • Using an online XML file v. a local copy

    I'm working on a web project that reads in XML data and processes it accordingly. The system seems to work as it should except that it will only read the XML file if it is stored on a local drive and not through a URL. When trying to access it through a web address I get file not found alerts. Is there a different way I need to reference online files vs. ones stored locally? Thanks for any advice.

    I would use a URL to reference both local and remote resources. (Don't call them "files" or you may be tempted to use a File object for both, and of course that doesn't work.)
    But you do have to have valid URLs that point to actual resources, and you do have to have a network configuration that allows you to get to those resources, and so on.
    Sorry if that seems vague, but it matches the question.

  • XML - 0112 Error on parsing using SAX and xml file in InputSource object.

    I need to parse a XML string and extract some information. I have to use SAX parser. I'm converting hte string to InputSource and then trying to parese.
    i'm getting XML-0112 error, my guess is that it is not able to locate DTD file but i tried hardcoding the whole path in DOCTYPE tag.
    i tried doing setSystemId also but no luck.
    null

    Can you post a simple test case to look at?

  • File to RFC (create Project Def in R# using data from XML file)

    I configured the scenario as follows:
    Step 1.
    Created data type and message type suitable for file data.
    Createtd async outbound message interface
    Defined message mapping between Messge type defined and BAPI
    Defined Interface mapping between Message interface & BAPI
    Definf file sender communicational & RFC receiver communicational
    and completed the rest of configuration id and activated all.
    File is being read successfully but Project creation is not happening.
    error "no sender or receiver interface definition " shown in SXMB_MONI.
    Plesase through light on this problem.
    Regards,
    Venkat

    Hi Seshagiri,
    it is not cleare to me where to look for Service Simulation active or not.
    In SICF "/default_host/sap/bc/bsp/sap/net200_otr_d1 " against it is showing that Service Reference(active)
    again I tested.
    error is still comming.
    Error different at different times. However the most frequent error is as follows:
    When payload is not given
    "Interface Mapping ... (109 lines)  "
    Any further suggestion please?
    Regards,
    Venkat

  • How to Update existing XML File Using Java Swing

    Hi,
    I am reading XML file and getting keywords into JList. When i add some keywords into JList through textfield and remove keywords JList, then after click on save button it should update xml file. How can i do it ?
    Please provide me some code tips for updating xml file
    This is the code that i am using for reading XML File:
    import javax.swing.*;
    import java.awt.event.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    import java.io.IOException;
    import java.util.*;
    import java.text.Collator;
    import java.util.regex.*;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import com.cloudgarden.layout.AnchorConstraint;
    import com.cloudgarden.layout.AnchorLayout;
    public class getKeywords extends JFrame implements ActionListener
    static JPanel p;
    static JLabel lbl;
    static JButton btnSave,btnAdd,btnRemove;
    static String path;
    static Vector v;
    static JList lstCur;
    static JTextField txtKey;
    Document dom;
    static image imgval;
    NodeList nodelstImage;
    static AnchorLayout anchorLay;
    private DefaultListModel lstCurModel;
    public getKeywords()
         super("Current Keywords");
        v=new Vector();
        p=new JPanel();
        txtKey=new JTextField(10);
        btnAdd=new JButton("Add");
        btnRemove=new JButton("Remove");
        btnSave=new JButton("Save");
        lbl=new JLabel("Current Keywords");
        lstCurModel=new DefaultListModel();
            lstCur=new JList();
            JScrollPane scr=new JScrollPane(lstCur);
        runExample();
         lstCur.setModel(lstCurModel);
         p.add(lbl);
         p.add(scr);
         p.add(txtKey);
         p.add(btnAdd);
         p.add(btnRemove);
         p.add(btnSave);
         add(p);
         btnAdd.addActionListener(this);
         btnRemove.addActionListener(this);
         btnSave.addActionListener(this);
         setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    public static void main(String arg[])
         getKeywords g=new getKeywords();
         g.resize(250,400);
         g.setVisible(true);     
    public void actionPerformed(ActionEvent ae)
         if(ae.getSource()==btnAdd)
              lstCurModel.addElement(txtKey.getText());
         if(ae.getSource()==btnRemove)
              lstCurModel.remove(lstCur.getSelectedIndex());
         if(ae.getSource()==btnSave)
              //Code to Write
         public void runExample()
              //Parse the XML file and get the DOM object
              ParseXMLFile();
              //Get the Detail of the Image Document
              parseImageDocument();
              //Get the Detail of the LML Document
              //parseLMLDocument();
              //System.out.println(lmlval.Title);
         public void ParseXMLFile()
              //Get the Factory
              DocumentBuilderFactory builderFac = DocumentBuilderFactory.newInstance();
              try
                   //Using factory get an instance of the Document Builder
                   DocumentBuilder builder = builderFac.newDocumentBuilder();
                   //parse using builder to get DOM representation of the XML file
                   dom = builder.parse("LML.xml");
              catch(ParserConfigurationException pce)
                   pce.printStackTrace();
              catch(SAXException sax)
                   sax.printStackTrace();
              catch(IOException ioex)
                   ioex.printStackTrace();
         public void parseImageDocument()
              //Get the root element
              Element docImgEle = dom.getDocumentElement();
              //Get a nodelist for <Image> Element
              nodelstImage =  docImgEle.getElementsByTagName("Image");
              if(nodelstImage != null && nodelstImage.getLength() > 0)
                   for(int i = 0; i < nodelstImage.getLength(); i++)
                        //Get the LML elements
                        Element el = (Element)nodelstImage.item(i);
                        //Get the LML object
                        getImage myImgval = new getImage();
                        imgval = myImgval.getimage(el);
                        v.addElement(new String(imgval.Thumb));
                        String[] x = Pattern.compile(",").split(imgval.Keys);
                        for (int s=0; s<x.length; s++)
                        lstCurModel.addElement(x[s].trim());
                        //System.out.println(x[s].trim());
    }     Thanks
    Nitin

    You should update your DOM document to represent the changes that you want made.
    Then, using the Transformation API you simply transform your document onto a stream representing your file. Something like this:
    Transformer transformer = TransformerFactory.newInstance().newTransformer();
    transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    // TODO - set indentation amount!
    Source source = new DOMSource(dom);
    Result result = new StreamResult(file);
    transformer.transform(source, result);Hope this helps.

  • Crystal Report using XML file

    Hi,
    I want to create dynamic crystal report using below mention xml file.
    Example:--
    <?xml version="1.0" encoding="utf-8"?>
    <root xmlns:inl="http://inline">
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://inline" xmlns="http://inline" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="Person">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="First_Name" type="xs:string"/>
    <xs:element name="Last_Name" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    <inl:Person>
    <inl:First_Name>Anna</inl:First_Name>
    <inl:Last_Name>Ant</inl:Last_Name>
    </inl:Person>
    <inl:Person>
    <inl:First_Name>Betty</inl:First_Name>
    <inl:Last_Name>Boop</inl:Last_Name>
    </inl:Person>
    </root>
    Crystal report column will be generated using this xml file.
    my report look like--
    First Name Last Name
    Anna Ant
    Betty Boop
    Thanks
    Praveen

    can you please be more detailed on what you mean automatically
    like put the xml file together and have the report generated without actually attaching the dataset to the rpt file and placing the fields in the report?
    if that is the case i dont believe crystal functions that way, been working with it for many years. i know you can create webi files through business objects where an end user can talk an dataset and build there own queries and rpt files on a dashboard type screen.

  • How to read the attribute of the xml file using jaxb

    Thanks,
    Buddy as i have a issue i have to read the xml file using jaxb and xml file contains this data and i have read the attribute like name , desc and action for a particular menu name pls tell the code how to do this it will be a great favour to me
    thanx in advance
    Rasool
    <contextmenu>
    <menu name='Lead' >
    <menuitem name='newlead' desc='New Lead' action='/leads.do?dispatch=insert' />
    <menuitem name='editlead' desc='Edit Lead' action='' />
    <menuitem name='leadinfo' desc='Lead Information' action='' />
    </menu>
    <menu name='Cases' >
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    </menu>
    <menu name='Contact' >
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    </menu>
    </contextmenu>

    What my program do is to get the encoding of XML files and convert them to UTF-8 encoding files, while I need this "encoding" information of the original XML document thus I can convert...
    After reading specifications and JDOM docs, the truth turns to be disappointed, no function is provided to get this information in JDOM level 2(the current released one), while it's promissed that this function will be provided in JDOM level API....
    Thanx all for your help and attention!!!

  • Using an XML file for server URL instead of hard coding

    I can't find a good example.
    Could someone give me an example of using a local XML file to set a server url variable so i don't have to hard code url's?
    This works and i can trace the xml file but how do i access the individual xml data nodes?
    protected function initApp():void
         var loader:URLLoader = new URLLoader(new URLRequest("config.xml"));
         loader.addEventListener(Event.COMPLETE,configLoadComplete);
    private function configLoadComplete(event:Event):void
         trace(event.target.data);

    Hi,
    <a href="foobar.xml">right click and select save as from the context menu</a>
    or
    write your xml data or a copy of it with a different extension (text) so that it is not parsed as application/xml-xhtml
    or
    Use AJAX to retrieve the xml file and display it as the textContent of a <textarea>
    window.open wraps the xml markup in html tags for display purposes.
    Rob^_^

Maybe you are looking for

  • Safari won't open, can't even reset

    It works fine on my admin account, but won't work on my daily account. I tried clearing cache and stuff, but no joy. I can't reset because nothing comes up, and if I mouse over the task bar I just get the spinning beach ball of death. I would post th

  • What is vector? plz help

    what is vector? what does it do? how do i use?

  • In MIRO - wants to put Tax amount manually (Not % basis)

    Dear Friends, While doing MIRO normally we select tax code as per tax code , tax is coming in % and if we do simulation it shows it is posted to its GL. But this is having always fix % . But in my case at the time of MIRO we noticed  that  taxes are

  • End of clip play from beginning.

    When playing the last clip to the end... it jumps to the very beginning and starts playing from the very beginning. What is the trick to turning off this feature? Thanks Marv.

  • POC RA key to calculate reserves

    Dear all, I have introduced the POC method  ( RA type E with profit indicator Q) for projects and all my RA/settlement is working fine. All excess costs/billings will be calculated and posted to FI. Now I want to create at the same time warranty cost