Analyze the XML Image Description

HI -.

I modified a flash animation that displays images in a slider control. When the user will fly over the image I show a ToolTip. The problem is that I can not understand how to analyze the Description (desc) out of the image in the XML tag to display the ToolTip text. Here's what I want to look like the image tag:

< images >

< path of the image = "images/02.png" desc = "2" link = "http://srv01-dnn/Products/CoreCollection/Detail.aspx" target = "_parent" / >
< path of the image = "images/03.png" desc = "3" link = "http://srv01-dnn/Products/CoreCollection/Summary.aspx" target = "_parent" / >
< / images >

In the code actionScript how could I simply analyze the description in the ToolTip text?

Thanks for any help on this.

Larry

Assuming you have a variable xm referencing this XML can:

trace (XM.image.length ());

2

trace (XM.image.@desc [0]);

2

trace (XM.image.@desc [1]);

3

Tags: Adobe Animate

Similar Questions

  • Impossible to analyze the xml.aspx contained in the main.js.Iam get the following error"could not obtain XML document, and the connection has failed: status 500

    Impossible to analyze the xml.aspx contained in the main.js.Iam get the following error"could not obtain XML document, and the connection has failed: status 500

    My main.js resembles

    xmlDataSource var = {}
     
    URL: 'dcds. - symbianxml.aspx", etc. (sample).
     
    init: function() {}
    URL, successful reminder, the reminder of failure
    This.Connect (this.) (URL, this.responseHandler, this.failureHandler);
    },
     
    /**
    * Analyzes the XML document in an array of JS objects
    @param xmlDoc XML Document
    * @returns {table} array of objects of the device
    */
    parseResponse: {function (xmlDoc)}
        
    var chElements = xmlDoc.getElementsByTagName ("channel");
       
    channels of var = [];
      
    Console.log (chElements.Length);
      
    for (var i = 0; i)< chelements.length;="">
        
    var channel = {};
       
    for (var j = 0; j)< chelements[i].childnodes.length;="">
        
    var node = Sublst.ChildNodes(1).ChildNodes(0) chElements [i] [j];
                
    If (node.nodeType! = 1) {//not an element node}
    continue;
    }
           
    Channel [node. TagName] = node.textContent;
    }
       
    Channels.push (Channel);
    }
    Console.log (Channels.Length);
    return the strings;
    },
     
    /**
    Manages the response and displays the data from device web app
    @param xmlDoc
    */
    responseHandler: {function (xmlDoc)}
      
    var channel = this.parseResponse (xmlDoc);
    var markup = "";
       
    for (i = 0; i< channels.length;="">
       
    markup += this.generateHTMLMarkup (i, channels [i]);
    }
    document.getElementById("accordian").innerHTML = mark-up;
    },
     
    /**
    Generates HTML tags to insert in to the DOM Web App.
    * @index i, index of the device
    @param device, device object
    */
    /*
    generateHTMLMarkup: function (i, channel) {}
      
    var str ="";
    "Str += '.


    ' onclick =-"mwl.setGroupTarget ('#accordian ',' #items_" + i + "', 'ui-show ',' ui - hide');" + ".
    "mwl.setGroupTarget ('#accordian ',' item_title_ #" + i + "', 'ui-open', 'ui-farm'); Returns false; \ » > » ;
    "" Str += "" + channel ['name'] + ' ";
    "Str += '.
    ";
    "Str += '.
    ";
    "Str += '.
    "+" id: "+ channel ['id'] +" ' "
    ";
    "Str += '.
    "+" type: "+ channel ['type'] +" ' "
    ";
    "Str += '.
    "+" language: "+ channel ['language'] +" ' "
    ";
    "Str += '.
    «+ "bandwidth:" + "fast" channel + "»»
    ";
    "Str += '.
    "+" cellnapid: "+ channel ["cellnapid"] +". "
    ";
    "Str += '.
    «+ ' link: '+'start the video »»
    ";
    "Str += '.
    ";
    return str;
    },*/
    generateHTMLMarkup: function (i, channel) {}
       
    var str ="";
    "Str += '.
    ";
    str +=  "" +
    "" + channel ['name'] + ""+""
    ";
    "Str += '.
    «+ ' link: '+'start the video »»
    ";
         
    return str;

    },
     
    failureHandler: {function (reason)}
    document.getElementById("accordian").innerHTML = "could not get XML document.
    '+ reason;
    },
     
    /**
    Retrieves a resource XML in the given URL using XMLHttpRequest.
    @param url URL of the XML resource to retrieve
    @param called successCb, in the XML resourece is recovered successfully. Retrieved XML document is passed as an argument.
    @param failCb called, if something goes wrong. Reasons, in text format, is passed as an argument.
    */

    Connect: {function (url, successCb, failCb)
      
    var XMLHTTP = new XMLHttpRequest();
      
    XMLHTTP. Open ("GET", url, true);

    xmlhttp.setRequestHeader("Accept","text/xml,application/xml");
    xmlhttp.setRequestHeader ("Cache-Control", "non-cache");
    xmlhttp.setRequestHeader ("Pragma", "non-cache" "");
      
    var that = this;
    XMLHTTP.onreadystatechange = function() {}
       
    If (xmlhttp.readyState == 4) {}
        
    If (XMLHTTP. Status == 200) {}
         
    {if (!) XMLHTTP.responseXML)}
    try {}
    If server has not responded with good an XML MIME type.
    var domParser = new DOMParser();
    var xmlDoc = domParser.parseFromString(xmlhttp.responseText,"text/xml");
           
    successCb.call (that, xmlDoc);
           
    } catch (e) {}
    failCb.call (, "answer was not in an XML format.");
    }
              
    } else {}
    successCb.call (that, xmlhttp.responseXML);
    }
    } else {}
    failCb.call (this, "connection failed: status"+ xmlhttp.status ");
    }
    }
    };
    XMLHTTP. Send();
    }
    };

    Please see the content in main.js is fully analyzed.

    Forward for the solution to my request all members of the community...

  • Analyze the XML...

    Hi all.

    I have a problem, I use this method to download an xml file which revice since a .net webservice

    oapObject request = new SoapObject("http://tempuri.org/", "METODH");
                Integer i = new Integer(1);
                request.addProperty("Bloque", i);
                request.addProperty("mostrarContenido", "1");
                SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    
                envelope.bodyOut = request;
                envelope.dotNet = true;
                envelope.encodingStyle = SoapSerializationEnvelope.XSD;
                HttpTransport ht = new HttpTransport("xxxxxxx" + ac);
                ht.debug = true;
                ht.call("http://tempuri.org/METHOD", envelope); 
    
                //System.out.println("Request \n" + ht.requestDump);
                //System.out.println("Response \n" + ht.responseDump);
    
                FileConnection fc = null;
                try {
                    fc = (FileConnection) Connector.open(ruta + "myfile.xml", Connector.READ_WRITE);
                       if (fc.exists()){
                            fc.truncate(0L);
                       }else{
                            fc.create();
                        }
                        OutputStream os = fc.openOutputStream();
                        os.write(ht.responseDump.getBytes());
                        os.close();
                        fc.close();
    

    In the code, I create xml file dump Pentecost, after reading the XML and parsing.

    Its possible to read the XML in memory? whitout create the file? for example load the dump memory and read the tags xml directly?

    Thanks in advance

    If the XML data is a byte array, you can create a ByteArrayInputStream and feed to an XML parser (the DOM and SAX parsers are supported on the BB). If the data is in the form of a string or a char array, you can do two things:

    1. Convert the string into a byte array using a suitable encoding (UTF-8, to be sure) and then create as before.
    2. Write a StringReader class that extends the drive runs through the table String or char, then create an InputSource around that and feed the InputSource of an XML parser. It is more effective because you don't have to copy the data before analyzing it, but you must write your own class StringReader.

    For the life of me, I don't know why a StringReader class is not built in the BB.

  • Analyze the XML problem!

    I'm having trouble building a parser for my XML file, I tried to adapt one of the pieces of code in the examples
    comes with Flash, but still can't make it work.
    Can anyone help or point me in the right direction where I'm wrong please.

    Here is my adapted code: -.

    var CP_XML:XML = new XML();
    var masterArray:Array = new Array();
    CP_XML.ignoreWhite = true;
    CP_XML. OnLoad = {function (success)}

    move to the first node
    var curr_node:XMLNode = this.firstChild.firstChild;
    out all the < VW_WEB_Curr_Projs1
    var i: Number = 0;
    for (var childNode = curr_node; childNode! = null; childNode = childNode.nextSibling, i ++) {}

    the index of the strings in each array will be the j
    var j: Number = 0;

    masterArray = new Array();

    masterArray
    [0] = childNode.nodeName; nodeName = < VW_WEB_Curr_Projs1
    j ++ ;

    for (var stringNode:XMLNode = childNode.firstChild; stringNode! = null; stringNode = stringNode.nextSibling, j ++) {}
    masterArray [j] = stringNode.firstChild.nodeValue;
    }
    }

    Feed the ComboBox with CP_ names
    for (var k = 0; k < masterArray.length; k ++) {}
    cp_cb. AddItem (masterArray [k] [0]);
    }

    Fill the initial value of the text on stage fields
    p1_txt. Text = masterArray [0] [1];
    p2_txt. Text = masterArray [0] [2];
    }

    var cpListener:Object = new Object();

    cpListener.change = function (eventObj) {}
    for (var l = 0; l < masterArray.length; l ++) {}

    If (masterArray [l] [0] == eventObj.target.value) {}
    Set the two elements of the array 1 and 2 textfields
    p1_txt. Text = masterArray [l] [1];
    p2_txt. Text = masterArray [l] [2];

    break;
    }
    }
    }

    cp_cb.addEventListener ("change", cpListener);

    load the XML file
    CP_XML. Load ("BC_testshort.xml");
    //--------------------------------------------------------------------------------------- -------------------------------------
    Now with the above code, I can get the names of node ' < VW_Web_Curr_Projs1', but can't get any info from inside them, but that's all I can do!
    Any pointers or help with this please?

    //---------------------------------------------------------------------------------------- --------------------------------------

    Here's the XML file, I'm trying to read called 'BC_testshort.xml '.

    < xmlns:sql ROOT = "urn: schemas-microsoft-com: XML - sql" > < VW_Web_Curr_Projs1 Proj_ID = "1766" Title = "Copy of your GP letter..." "Init ="Ze"name ="Assim"Prog_ID = 'NP' = Main_research_question" the main goal of research is to... ". "" Start_date = "" 2007-02 - 01 T 00: 00:00 ' end_date = "2007-08 - 01 T 00: 00:00 ' Research_Group = 'Medicine' LocalLead = '1' / > < VW_Web_Curr_Projs1 Proj_ID ="1765"Title ="Understanding. "... "Init = name family"A"="Poe"Main_research_question ="goal
    Each... "" Start_date = "" 2005-10 - 01 T 00: 00:00 ' end_date = "2007-10 - 01 T 00: 00:00 ' Research_Group = 'Surgery' LocalLead = '1' / > < VW_Web_Curr_Projs1 Proj_ID ="1764"Title =" origins impact results of... " "Init =" Q"name = 'Pierre' Prog_ID ="the detection and prevention of damage"Main_research_question =" what is the prevalence of... "" "" Start_date = "" 2006-12 - 01 T 00: 00:00 ' end_date = "2008-06 - 01 T 00: 00:00 ' Research_Group = 'Neuroscience' LocalLead = '1' / > < VW_Web_Curr_Projs1 Proj_ID = '1763" Title = "Predicting persistence..." "Init =" R"name = 'Wheel' Prog_ID ="the detection and prevention of damage"Main_research_question ="this study aims to connect the data... " "" Start_date = "" 2006-04 - 01 T 00: 00:00 ' end_date = "2007-10 - 01 T 00: 00:00 ' Research_Group = 'Neuroscience' LocalLead = '1' / > < VW_Web_Curr_Projs1 Proj_ID ="1762"Title ="Closing the skin..." "Init =" Y"name ="HOM"Prog_ID = 'Musculoskeletal disease' Main_research_question ="the first goal... " "" Start_date = "" 2007-02 - 01 T 00: 00:00 ' end_date = "2008-02 - 01 T 00: 00:00" Research_Group = "Musculoskeletal" LocalLead = "1" / > < / ROOT >

    //---------------------------------------------------------------------------------------- -------------------------------------------------

    Hello
    See the code.
    I've traced all the attributes and values.
    You can just push them in a desired table and use them to fill in anything...

  • Analyze the XML order getElementsByTagName node

    Is the order of the elements in a NodeList returned by a rootElement.getElementsByTagName ("item") coherent? I have an XML that returns items in order descending by date (most recent at the top).  Can I count on item (0) is always the most recent and the order preserved?

    As long as your XML file shows how you said, the order does not change.

    Item (0) should be your most recent.

  • How to analyze all the data of the particular tag in the xml file

    Hi all

    I have a xml file, who like tags, code, rev_num, type... volunteers. I want to analyze the XML and save all data (code, rev_num...) the unknown tag in a text file. I tried to use a node matching vi, but I do not get the output I have need.attach is my attempt, can someone suggest me or help out me. (Sorry Cant join the XML so I recorded it in a text file.)

    Thank you

    Ankit G

    You must replace the instance of "resource" with "resource [type = 'unknown']." Did you do it?

  • The XML parsing problems

    I started with the sample of XML parsing and tried to get a simple user interface that loads buttons with the value of a child node (more later to go to a new screen and analyze another XML code).  When I analyze the XML code, I get the knots, but I don't get the values.  My example of XML is generated.

    Example of XML data:

    
    
    
    
             Bugs     BugsXML.action 
    
    
    

    Code:

    import java.io.InputStream;
    
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    
    import mbt.util.DataUtils;
    import net.rim.device.api.system.Application;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.RichTextField;
    import net.rim.device.api.ui.component.SeparatorField;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.xml.parsers.DocumentBuilder;
    import net.rim.device.api.xml.parsers.DocumentBuilderFactory;
    
    public class XMLViewer extends UiApplication {
    
      MainScreen _screen = new MainScreen();
      public static final boolean isTest = true;
      ConnectionThread _conThread;
      public final String xmlUrl;
    
      public static void main(String args[]) {
        XMLViewer viewer = new XMLViewer();
        viewer.enterEventDispatcher();
      }
    
      public XMLViewer() {
        this.xmlUrl = "http://localhost:8080/FooXML.action";
        this._screen.setTitle("XML Viewer");
        this._screen.add(new RichTextField("Requesting update..."));
        this._screen.add(new SeparatorField());
        pushScreen(this._screen);
        this._conThread = new ConnectionThread();
        this._conThread.start();
      }
    
      public void updateField(String name, String action) {
        synchronized (Application.getEventLock()) {
          ButtonField button = new ButtonField(name,
            ButtonField.CONSUME_CLICK | ButtonField.FOCUSABLE |
            ButtonField.USE_ALL_WIDTH){
              protected boolean navigationClick(int status, int time) {
                System.out.println("Name: " + this.getLabel());
                return true;
              }
          };
          this._screen.add(button);
        }
      }
    
      private class ConnectionThread extends Thread {
        public ConnectionThread() {
          super();
        }
        public void run() {
          Document doc;
          try {
            int i,j;
            DocumentBuilderFactory docFactory =           DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
            InputStream is = DataUtils.getXMLActions(xmlUrl);
            if (is == null) {
              System.out.println("InputStream is null!");
              return;
            }
            doc = docBuilder.parse(is);
            doc.getDocumentElement().normalize();
            NodeList list = doc.getElementsByTagName("action");
            for (i=0;i
    

    I get this result:

    HTTP STATUS OKItem: 1 has name: name has text: null has value: nullItem: 3 has name: url has text: null has value: null
    

    You can see this link, it may be useful for you

    http://supportforums.BlackBerry.com/T5/Java-development/help-with-parsing-XML-XMLParseDemo-Java/TD-p...

  • Analysis the xml response from PL/SQL

    Can someone please help me to analyze the XML below?

    DECLARE

    l_response CLOB.

    g_system_id VARCHAR2 (255);

    g_session_id VARCHAR2 (255);

    g_user_id VARCHAR2 (255);

    BEGIN

    l_response: =.

    ' - uuid:18cb22a2 - 11cc-43f4-bfea-c213da179d30 + id = 156

    Content-ID: http://tempuri.org/0 >

    Content-Transfer-Encoding: 8 bit

    Content-Type: application/xop + xml; charset = utf-8; Type = "application/soap + xml".

    " < s: Envelope = xmlns:s ' http://www.w3.org/2003/05/soap-envelope "" xmlns: a = " " http://www.w3.org/2005/08/addressing ' > < s:Header > < a: s:mustUnderstand Action = "1" > ". http://tempuri.org/ILoginService/LoginByUserNameResponse " < / has: Action > < a: RelatesTo > urn: uuid:cf410a05 - 23 d 4 - 4B 92-a22c-329cbc19fbe7 < / has: RelatesTo > < / s:Header > < Body > < LoginByUserNameResponse xmlns =" http://tempuri.org/ ' > < LoginByUserNameResult xmlns:i = ' http://www.w3.org/2001/XMLSchema-instance "" xmlns: x = " " http://www.w3.org/2001/XMLSchema ' > < XObject.m_element i: type = "x: string" xmlns = "" > & lt; OnlineContext SystemId = "{19E0DDB4-5FA5-41EE-B624-AEA762865A6C}" SessionId = username "{F23D32A4-B325-4BFA-9E90-39CA253E843C}" = "{2C6ABE4C-D356-46F0-B4BE-9C4F0A36A522}" / & gt; < XObject.m_element > < / LoginByUserNameResult > < / LoginByUserNameResponse > < / Body > < / s: Envelope >

    -uuid: 18cb22a2-11cc-43f4-bfea-c213da179d30 + id = 156-';

    SELECT systemid, sessionid, userid

    IN g_session_id, g_system_id, g_user_id

    FROM XMLTABLE)

    xmlnamespaces ('http://www.w3.org/2003/05/soap-envelope' 'DATA'),

    'data:LoginByUserNameResponse/LoginByUserNameResult/XObject.m_element/OnlineContext '.

    PASSAGE xmltype (l_response)

    Systemid VARCHAR2 COLUMNS (50) PATH "@OnlineContext."

    SessionId VARCHAR2 (50) PATH "@OnlineContext."

    UserID VARCHAR2 (50) PATH "@OnlineContext") xt;

    Dbms_output.put_line)

    "Session Id".

    || g_session_id

    || "System Id".

    || g_system_id

    || "User Id".

    || g_user_id);

    END;

    Thank you.

    It gets you a little closer

    declare
    -- Local variables here
    l_response     CLOB;
    g_system_id    VARCHAR2 (255);
    g_session_id   VARCHAR2 (255);
    g_user_id      VARCHAR2 (255); 
    
    begin
    -- Test statements here
    l_response := '
    
        http://tempuri.org/ILoginService/LoginByUserNameResponse
        urn:uuid:cf410a05-23d4-4b92-a22c-329cbc19fbe7
    
    
        
           
              
              
          
      
    '; 
    
        SELECT systemid, sessionid, userid
          INTO g_session_id, g_system_id, g_user_id
          FROM XMLTABLE (
                  xmlnamespaces ('http://www.w3.org/2003/05/soap-envelope' AS "s",
                                 'http://tempuri.org/' as "data"),
                  's:Envelope/s:Body/data:LoginByUserNameResponse/data:LoginByUserNameResult/XObject.m_element/OnlineContext'
                  PASSING xmltype (l_response)
                  COLUMNS systemid VARCHAR2 (50) PATH '@SystemId',
                          sessionid VARCHAR2 (50) PATH '@SessionId',
                          userid VARCHAR2 (50) PATH '@UserId') xt; 
    
    DBMS_OUTPUT.put_line (
           'Session id '
        || g_session_id
        || ' System id '
        || g_system_id
        || ' User id '
        || g_user_id); 
    
    end;     
    

    You will need to manually parse as CLOB and pull the XML itself of the response string.  This can be done via SUBSTR and INSTR looking for the first < and="" last=""> in that you showed at least.  Upgrading from a previous version of working correctly with the xmlns = "", which redefines the default namespace to the default value. "  The XPath has been corrected to reflect using the appropriate prefix.

  • Using the XML API

    Hi all.

    I'm brand new contract management module and the api XML. I going through the XMLAPI.chm but could not understand where to start. If anyone can help me with a simple program that I can run to understand the API XML which will help. Any pointer will help you.

    Thanks in advance.
    Sachin

    Hello, the API is just a servlet which receive a XML, using XMLAPI especified.
    To call the api, you must call a call on this http://server/exponline/XmlServlet with the parameter xmlQuery post url

    Here's an example of my method of connector

    public InputStream sendRequisition (XmlRequest xml) throws IOException {}

    If (conn == null) {}
    throw new RuntimeException ("not connected.");
    }

    OutputStreamWriter out = new OutputStreamWriter (conn.getOutputStream ());
    out. Flush();
    out. Write ("xmlQuery =" + xml.encode ());
    out. Close();

    Return conn.getInputStream ();
    }

    the XmlRequest is just an XML encoder, a subclass of my xml queries (I do classes to the best use)
    all you have to do is analyze the XML InputStream it returns.

    Request login example

    xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "http://app.expedition.com/ http://127.0.0.1/exponline/xml-schemas/loginrequest.xsd" >

    EXP

    EXP

    CMPROJ

    applications must sessionId, that his return to the connect call, but this is especified on Documentation

    Good luck

    Published by: user12718422 on 03/03/2010 05:22

  • Add the description of an xml file to the loaded image to full size

    Hi all

    I need a little help with the Gallery picture below please.

    I have a photo gallery that loads some thumbnail in via xml and AS3 support. When you click on the thumbnail, it loads the image full size in a charger.

    How can I add a description of the xml to the image full size.

    Thank you in advance for your time and effort to help me with this.

    I'm still learning a lot about AS3 and xml so your help is most appreciated people.

    It's my xml

    <?xml version="1.0" encoding="UTF-8"?>
    
    <menu>
    
        <items>
    
            <item>
    
                <url>thumb/1.jpg</url>
    
                <linkTo>fullsize\1.jpg</linkTo>
    
                <des>text I would like to appear in full image 1</des>
    
            </item>
    
            <item>
    
                <url>thumb/2.jpg</url>
    
                <linkTo>fullsize\2.jpg</linkTo>
    
                des>text I would like to appear in full image 2</des>
    
            </item>
    
            <item>
    
                <url>thumb/3.jpg</url>
    
                <linkTo>fullsize\3.jpg</linkTo>
    
                des>text I would like to appear in full image 3</des>
    
            </item>
    
            <item>
    
                <url>thumbs\4.jpg</url>
    
                <linkTo>fullsize\4.jpg</linkTo>
    
                des>text I would like to appear in full image 4</des>
    
            </item>
    
            <item>
    
                <url>thumbs\5.jpg</url>
    
                <linkTo>fullsize\5.jpg</linkTo>
    
                des>text I would like to appear in full image 5</des>
    
            </item>
    
        </items>
    
    </menu>
    

    It's my as3, I tried to take as much code that is not required in this example.

    var xmlPath:String = "pictures.xml";
    var xml:XML;
    
    var loader = new URLLoader();
    loader.load(new URLRequest(xmlPath));
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    
    function xmlLoaded(e:Event):void
    {
    
         
         if ((e.target as URLLoader) != null )
         {
              xml = new XML(loader.data);
              createMenu();
         }
    }
    
    var numberOfItems:uint = 0;
    var menuItems:Array = new Array();
    
    function createMenu():void
    {
              numberOfItems = xml.items.item.length();
    
         var count:uint = 0;
    
              for each (var item:XML in xml.items.item)
         {
    
              var imageLoader=new Loader();
              var menuItem:MenuItem = new MenuItem();
    
              menuItem.addChild(imageLoader);
              
              imageLoader.load(new URLRequest(item.url));
              
              menuItem.linkTo = item.linkTo;
              menuItem.mouseChildren = false;
              menuItem.addEventListener(MouseEvent.CLICK, itemClicked);
              menuItems.push(menuItem);
              
              addChild(menuItem);
              
              count++;
         }
         ***();
    }
    
    function ***():void
    {
         //menuItems.sortOn("zpos3D", Array.NUMERIC | Array.DESCENDING);
         for (var i:uint = 0; i < menuItems.length; i++)
         {
              setChildIndex(menuItems[i], i);
         }
    }
    
    //**************************************loader for large images*************************************
    
    var loader_mc : Loader = new Loader();//loader_mc var for below itemClicked function
    
    //This function is called when a thumb is clicked
    function itemClicked(e:Event):void
    {
         var urlRequest:URLRequest = new URLRequest(e.target.linkTo);//Navigate to the URL that's assigned to the menuItem
         loader_mc.load(urlRequest);//adds the urlRequest to our loader_mc ;
    }
    
    //calling "contentLoaded" function if loading is over;
    loader_mc.contentLoaderInfo.addEventListener(Event.COMPLETE, contentLoaded);
    
    function contentLoaded(e:Event):void
    {
         addChild(loader_mc);//adds loader_mc to the stage     
    }
    

    No, you have some already loaded in your menuItem objects with the "menuItem.des = item.des;" line of code... which means this object contains the text of actual description right here.  If you just need to assign to the textfield object that you want to use to display the description.  In my example I named it 'someTextField', but you can name but you want.  Read my other answer about which you assign this value to the TextField.

  • How to analyze the image url in json?

    Hello

    I get the response from the server and crawled through json. And display it in the field

    Like name1 as:

    try {}
    labelField1.setText (jsonObject2.get("name1").toString ());
    }

    catch (JSONException e)

    {
    System.out.println ("JSONException Description");
    }

    Similarly, I want to make the image. How to analyze the url of the image and display it in the BitmapField?

    You must create a separate thread to extract the bytes of the image of the URL you have.

    You can use the following code to get the image to the server.

    public EncodedImage getImageBytesFromURL(String url){
            ConnectionFactory connFactory = null;
            ConnectionDescriptor connDescriptor = null;
            HttpConnection httpConn = null;
            InputStream inputStream = null;
            byte[] response = null;
            try {
                connFactory = new ConnectionFactory();
                connFactory.setConnectionTimeout(10*1000);
                connFactory.setAttemptsLimit(1);
                connDescriptor = connFactory.getConnection(url;interface=wifi);
                if (connDescriptor != null) {
                    httpConn = (HttpConnection) connDescriptor.getConnection();
                    inputStream = httpConn.openInputStream();
                    int responseCode = httpConn.getResponseCode();
                    if(responseCode == HttpConnection.HTTP_OK){
                        response = readStream(inputStream);
                    }
                }
            }catch (IOException e) {
    
            }finally {
                try {
                    inputStream.close();
                    httpConn.close();
                    inputStream = null;
                    httpConn = null;
                    connDescriptor = null;
                    connFactory = null;
                } catch (Exception e) {
    
                }
            }
            EncodedImage encodedImage = null;
            if(response != null){
                encodedImage = EncodedImage.createEncodedImage(response, 0, response.length);
            }
            return encodedImage;
        }
    

    Remember that this method should be in a background thread. Otherwise, your user interface crashes. The encodedImage that returns the method above can be easily converted to bitmap and set in your bitmapfield.

  • How cut the length of the string IE channel name here, if it exceeds 20 characters or letters. The channel name is dynamically analyzed the spreadsheet/xml file.

    How cut the length of the string IE channel name here, if it exceeds 20 characters or letters. The channel name is dynamically analyzed the spreadsheet/xml file.

    My Council of Europe in the .js file is

    function generateHTMLMarkup (i, channel) {}
    Alert ("this is lang" + str);
    var str ="";
    "Str += '.

    ";
    "Str += '.
    "+ ""+""+"
    ";
    Alert ("this is lang" + str);
    return str;

    }

    nerateHTMLMarkup: function (i, channel) {}
    Alert ("this is lang" + str);
    var str ="";
    "Str += '.

    ";
    str += "" +
    "" +
    "" + channel ['name'] + "" +.
    "" + "
    ";
    "Str += '.
    "+ "" + "
    ";
    Alert ("this is lang" + str);
    return str;

    etc.

    Give mthe rhythm and the exact code where Ihave tio get implemented.

    in the code, replace change

    channelName var = channel ['name'];

    TO

    channelName var = channel ['name'];

  • Dynamic Image in the XML editor problem

    Hi all

    I was working with a dynamic image in the Xml editor with the reference of this link, step-3

    http://www.erpschools.com/articles/display-and-change-images-dynamically-in-XML-Publisher

    I have three Logo saved in OA_MEDIA with the name as 80.gif, 81.gif, 82.gif.

    I created a formula column outside the Group of data and given the link in the RTF, inside the url of the Image Alt text: {//CF_LOGO1} and his works fine.

    But when I created the formula column in the dataset, how do I give the path inside the image.

    I tried with this url: {...} CF_LOGO1} but his does not work. Could all help with that.

    Thanks and greetings

    Srikkanth M

    Please check if you placed the logo with the Group and the image is called correctly.

  • Adobe AIR 22 beta (April 6, 2016), 'Download AIR SDK &amp; compile for Windows' file does not? After I download and visualize the 'air - SDK - description.xml', the version is 21?

    Adobe AIR 22 beta (April 6, 2016), 'Download AIR SDK & compile for Windows' file does not? After that I have download and view the 'air - SDK - description.xml',

    < name > AIR 21.0.0 < / name >

    < version > 21.0.0 < / version >

    Hello

    We have fixed this problem. Please download a second time to get 22 AIR beta build.

    Thank you

    Krati

    Adobe AIR Team

  • Create an image slider using the XML file photo gallery

    Hello!

    I have created a photo gallery and generated an xml file.  I want to implement a cursor image on the home page that performs a simple fade from one image to the other.

    I'm not an expert on jQuery. The BC help section says to add code that retrieves in the XML file and THEN add another code query j who would style images and transitions.

    I don't know how to do this.  Here is my code and it does not work.

    If you have a simple solution, it would be great.

    There is a script called JSSOR

    "< script type =" text/javascript"src ="... / js/jquery-1.9.1.min.js "> < / script >"

    <!-use jssor.slider.mini.js (40 KB) instead for immediate release->

    <!-jssor.slider.mini.js = (jssor.js + jssor.slider.js)->

    < script type = "text/javascript" src = "javascripts/jssor.js" > < / script >

    "< script type =" text/javascript"src="javascripts/jssor.slider.js "> < / script >

    This is the beginning of the code BC gives to pull from the xml file into a div called "Gallery".

    < div id = 'Gallery' > < / div >

    < script type = "text/javascript" >

    {$(function()}

    $.ajax({)

    type: 'GET ',.

          url: " http://www.performanceaire.com/Fahrenheit-images/BannerGallery/Photogallery.XML ", / / replace with an absolute URL of the XML of your gallery of .

    data type: "xml."

    success: {function (xml)}

    {$(xml).find('img').each (function ()}

    location var = ' http://www.performanceaire.com/Fahrenheit-Images/BannerGallery/'; / / Replace with the absolute path to the directory that contains your images

    var url = $(this) .attr ('src');

    var alt = $(this) .attr ('alt');

    $('<li></li>').html (' < a href = "' + place +" + url + ' "> < img src ="' + place + "+ url + '" alt = "' + alt + '" / > < / a > ').appendTo('#gallery');

    });

    }

    });

    });

    This is the code taken from JSSOR to transitions occur, and it does not work... any ideas?

    jQuery (document) .ready (function ($) {}

    var options = {}

    $AutoPlay: true, / / [optional] If auto play, to activate the slide show, this option must be set to true, the default value is false

    $DragOrientation: 1 / / orientation [optional] to drag the slide, 0. drag, 1 horizental, 2 3 vertical or, default value is 1 (note that the $DragOrientation must be the same as $PlayOrientation when $DisplayPieces is more than 1, or in the parking position is not 0)

    };

    var jssor_slider1 = new $JssorSlider$ ("Gallery", options);

    });

    < /script >

    www.performanceaire.com/index-FS.html

    It is perhaps a bit much if you do not top:

    Developers

    http://www.BusinessCatalyst.com/BC-blog/BC-next-liquid-rendering-JSON-new-editing-capabili links-increased-performance

Maybe you are looking for

  • The interface of the AVI with the PC using LabWindows/CVI

    Hi friends, I have a vector Network Analyzer Keysight Technologies / Agilent Technologies N5230A. I want to run with the LabWindows/CVI to measure channel 40 GHz. I want to interface the AVI with the PC using LabWindows/CVI. It is really essential fo

  • Swing cut into reason NI 9263 map

    I have a NI Compact RIO Setup with the analog output NI 9263 card. I generated Pulse Width Modulation (VLOW = 0v, VHIGH = 10 v) frequency 100 HZ using LabVIEW 2012. I have verfied the signal with the reach of agilent. IAM see exactly 100 HZ (VLOW = 0

  • MY LAPTOP HP 15-D017TU IS NOT ABLE TO INSTALL HIS OWN CARD PRELOADED WIFI...

    I brought this laptop HP, d017tu, a few days ago. It has been preloaded with windows 8.1.I he downgraded to windows 7 essential home. Now, he is not yet able to detect the card wifi inside. There F12 key to power wifi but it always shows orange light

  • Cannot download updates after reinstalling XP Home SP2 and IE8

    I used XP at home for a long time. But, I have to reinstall XP Home from my original CD. Now, I find that it does not install the automatic updates. Somehow, I was able to install IE8 and Media Player11. The possibilities offered by your sites explor

  • Change the background color of line indicator

    I'm doing an indicator of string with a black background or make it to which the channel indicator is transparent Thank you