Loading URL from XML?

I have a movie clip in rectangle shape and need add link to that from XML.
How can I do that?
this my code
AS Code:var xmlLoader:URLLoader = new URLLoader();
xmlLoader.load(new URLRequest("linkNewD2.xml"));
xmlLoader.addEventListener(Event.COMPLETE, displayHTML);
function displayHTML(e:Event):void {
                var xmlData:XML = new XML(e.target.data);
                var tURL:String = xmlData.Header1.option;
                targetURL(tURL);
function targetURL(event:String):void
var valURL:String = event;
myMc1.addEventListener(MouseEvent.CLICK, gotoHome);
function gotoHome(evt:MouseEvent):void
                var myURL:URLRequest = new URLRequest(URL(valURL));
                navigateToURL(myURL);
XML Code:
<data>
<Header1>
<option> http://www.google.com </option>
</Header1>
</data>
Please help me!
Thanks,
jafy

First, never use nested functions - they bring in a lot of troubles.
Try this code (there are better ways but just to follow your initial approach). This code assumes that myMC1 is MovieClip:
var xmlLoader:URLLoader = new URLLoader();
// listeners should be added BEFORE load() is called
xmlLoader.addEventListener(Event.COMPLETE, displayHTML);
xmlLoader.load(new URLRequest("linkNewD2.xml"));
function displayHTML(e:Event):void {
     var xmlData:XML = new XML(e.target.data);
     targetURL(xmlData.Header1.option);
function targetURL(url:String):void
     myMc1.url = url;
     myMc1.addEventListener(MouseEvent.CLICK, gotoHome);
function gotoHome(e:MouseEvent):void
     navigateToURL(new URLRequest(MovieClip(e.currentTarget).url));

Similar Messages

  • Flash does not load information from xml on DMM system

    I have flash file load information from xml file. flash file and xml file i push on IIS server. In presentation i add URL of flash file but flash file not show information.
    I try run URL direct from DMP is ok.
    Flash file write for Flash litte 3.1 and use action script 2.0. DMS system test with DMM version is 5.3 and DMP 4310G.
    Please point where the error and the notes on  flash file use with DMM for my programmer.
    Thanks!

    Hi guy's
    I think I maybe faced with a similar issue.
    I've been working on a flash build that pulls in xml feeds. Everything I have works great so far but I've only been able to test as standalone(Desktop) and in the browser.
    When I tested standalone(Desktop) I did get the flash security popup but once I granted access it worked fine.
    I've never used DMP 4310 before. At this point in time I dont have access to it either. All I know is that my swf will be put on it.
    Can anyone tell me how the DMP 4310 will handle the flash security popup?

  • Load data from XML files into BI

    Hi All,
    Can any one guide me through the steps which involve in loading data from XML files into BI?
    Thanks
    Santosh

    Hi James,
    I have followed upto step No: 12 .
    Please could you let me know how to link the XML file on my local drive to BI,
    I am not able to find figure out where to specify the path of the XML file to be loaded into BI.
    Thanks In Advance
    Regards,
    San
    1. Create a Infosource(ZIS), with transfer structure in accordance with the structure in the XML file. (You can open the XML file with MS Excel.This way you can get to know the structure).
    2. Activate the transfer rules.
    3. After activation ;from the Menu Bar , Select Extras>Create BW Datasource with SOAP connection.
    4.Now Activate the Infosurce again, this creates an XML based Datasource(6AXXX...)
    5.These steps would create two sub nodes under the Infosource(ZIS).
    6.Select Myself system and create a data package and execute it run in Init mode(without Data Transfer).
    7. This would create an entry in RSA7(BW delta Queue)
    8. Again create another Delta Infopackage under it, and run it. Now the Datasource(6AXXXXXX..) would turn green in RSA7.
    9.In Function builder(SE37) select your FM( do a search ,F4, on the datasource 6AXXX....) .
    10.Inside this RFC based FM , from the Menu Bar select Utilities>more Utilities>Create Web services>From Function module.
    11.A wizard will guide you through the next steps .
    12.once this is done a Web serrvice would be enabled in WSADMIN. Select your FM and execute it.
    13.From here you can upload the data from XML file into BW delta queue.
    Edited by: Santosh on Nov 30, 2008 2:22 PM

  • Problem in load data from XML in Flex 4

    Hi Everyone,
    I tried all the possible ways which ever i know to load the data from XML to Flash Builder (Flex 4). Actually i want to load the data from XML to Datagrid. The project is executed without any error and warnings but the data is not loaded into datagrid. i will paste the coding below if anyone know the solution please let me know. Waiting for reply.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="userRequest.send(); ">
    <fx:Declarations>
         <s:HTTPService id="userRequest" url="xdata.xml" useProxy="false" resultFormat="e4x" />
    </fx:Declarations>
    <mx:DataGrid id="dgUserRequest" x="20" y="160" dataProvider="{userRequest.lastResult.user}" >
         <mx:columns>
              <mx:DataGridColumn headerText="User ID" dataField="id"/>
              <mx:DataGridColumn headerText="User Name" dataField="name"/>
         </mx:columns>
    </mx:DataGrid> 
    </s:Application>

    It is better to add result handler to the HttpService and debug to see the actual structure of the xml.

  • Load data from xml file in oracle data base

    Hi all,
    I'd like to know if is posible to load data from a file xml into a table of oracle data base through SQL*LOADER, loaded only in a normal column no with type XMLType , for example
    I have a xml file
    <person name="kate" surname="fari" city="new york" >
    <son name="faus" age="18"/>
    <son name="doly" age="10"/>
    </person>
    and I load in table :
    table :person
    column
    name surname city
    kate fari new york
    table : son
    name age
    doly 10
    faus 18
    thank you for your return !!!!!!!!!
    Ninova
    Edited by: user10474037 on 30 mai 2011 08:47
    Edited by: user10474037 on 30 mai 2011 08:48
    Edited by: user10474037 on 30 mai 2011 08:48
    Edited by: user10474037 on 30 mai 2011 08:49
    Edited by: user10474037 on 30 mai 2011 08:50

    Hi
    This May be found at
    SQL Loader to upload XML file

  • Loading data from XML hosted on a site accepted by Apple?

    I'm about to start working on an App that holds the template and code to build the stuff. It gets its level design, variables and other things from an XML hosted on a website/server. The app will also load pictures from the website/server to be displayed in the app. So, what people download is the "shell". Would Apple allow this app into the app store? Considering I've read how they don't allow external code to be loaded into the app, or is this only limited to code inside external swfs?

    I did search before I posted and read only the threads that seemed to cover what I wanted to know. As replies here are rare I decided to read ALL threads I got from my search and actually found one with the answer, sort of, as he doesn't say if he loads variables, which to me is like code , but I hope Apple will be ok with my app loading external stuff through an external xml aswell, like they were for this guy:
    http://forums.adobe.com/message/3868894#3868894
    * I'm loading xml-data and pictures (like icons for other apps) from an external server into the app, to promote our other apps. Works like a charm and apple had no problem with this.

  • Load object from xml

    Imagine if you can that I have a XmlLoader class for each object that can be loaded from xml.
    Before I had the xmlLoader code inside the objects but it's better to separate loading from actual object...
    these xmlLoaders needs to be able to set all vars for those objects. How would be the best way to do that?
    Atm I have made all vars with a package scope. but this really opens the object open to all other objects in that package...
    I don't know any other options. so how do you keep your vars safe, but still be able to load them from whatever source(xml, txt)...?

    Apache Digester is good for this sort of thing. It uses setter methods to populate your objects. You could also just use XML Serialization and deserialization. Or, you could go for something like JAXB or XMLBeans, whereby you actually will have classes generated for you from XML Schemas, and instances of those classes can marshall and unmarshall themselves quite easily

  • Loading settings from xml and applying

    Hi,
    I've got an xml where im writing certain settings of a application. This is what the xml looks like;
    <?xml version="1.0" encoding="UTF-8" ?>
    - <PTMViewProfile>
    - <viewProfile>
      <testSequences />
      <projectName tag="default" />
    - <tsFrames>
      <tsFrame tag="bvcbvc" maximised="true" />
      <tsFrame tag="bvbv" maximised="true" />
      </tsFrames><projectName tag="default" /> - This is the project name
    - <tsFrames> - These are the JInternalFrames (Instance of tsFrames) for that specific project.
    <tsFrame tag="bvcbvc" maximised="true" />
    <tsFrame tag="bvbv" maximised="true" />
    </tsFrames>
    The project is stored in a directory containing all the tsFrames.
    From the xml i have the code to read and write. But, i want to apply those settings so that when the application is reopened it looks at the xml and opens project and the tsFrames by looking at the xml.
    Can someone please help me with wrting a method that applies those settings and loads the application.

    Hi,
    Thanks for replying!
    I am new to java and i have created the read and write method by using examples from existing code.
    what i want to do is store the elements its reading into an array so that i can use it in another method to do things with it.
    The code below is reading element from xml
    List frame = XMLManager.getListOfNamedChildren(tsFrames, xmlFrameTag);
                   Iterator iterator = frame.iterator();
                   while (iterator.hasNext()) {
                        Element tsFrameElement = (Element) iterator.next();
                        String tag = XMLManager.getAttributeValue(tsFrameElement, "tag");
                        String maximised = XMLManager.getAttributeValue(tsFrameElement, "maximised");
                        storeTsFrame.add(new TSFrameSettings(tag, maximised));I want to use a for each loop to read each line in the xmlFrametag by replacing the while
    can someone help me with this please!

  • Error when loading data from xml file

    Hi,
    I'm trying to load data into a table from XML file using ApEx DATA UNLOAD/LOAD interfaces .
    ApEx version is 3.0.1 .
    I'm getting this error:
    ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00222: error received from SAX callback function
    How to find cause of the error ?
    Janus

    Tkank you for the simple but good advice :)
    unfortunately even google didn't find many answers :
    LPX-00222 + APEX ... NOTHING
    LPX-00222 + ORA- ... 2 pages of something like
    "Examine the additional error messages and take corrective action"

  • My_FLVPlybk.contentPath - Loading URL from DB with ASP

    Can someone point me in the right direction here? I am trying
    to use the FLV Playback component to load FLV's dynamiclly into the
    flash movie.
    What I have is a asp page with a Recordset pulling the URL
    from the DB into the page using Dreamweaver. This is all fine.
    Now I have one instance of the FLVPlayback on the stage with
    flash
    I am trying to load the url for the FLV file into the movie,
    via ASP, MsSQL and a url parameter. What I am trying to accomplish
    is to have a link on a page with a url that will open a popup
    window. In this window I will have the Flash file that will load
    the FLV based on the URL, and play it.
    Any help is appreciated.
    Thanks in advanced

    By popup you mean web document popup?
    You could use
    LocalConnection
    to pass the URL from the main Flash Movie to the Flash movie in the
    web document popup.

  • Load table from xml

    Hi all
    Please see attach that I send ,, this is vi that write and read from xml file ,, my problem is when I press on load ??
    If you can see that I saved a table data  , I want if I press on load bottom  all the data loaded on the screen  in table shape as table control
    Who can I do that
    Note : press on set limit to save into xml file
    Thanks
    Attachments:
    loadTable.vi ‏28 KB

    Hi elyan
    As i can see you still have problems with xml files
    The for loop is not neened. Just delete it.
    At write buid an array, so at read you can select 1st element.
    At Unflatten from xml, wire a 2D array at "type" input.
    You  must have a look at basic Labview tutorials...

  • Load class from XML (Dynamic Dispatch)

    I'm continuing my voyage into the realms of LVOOP.....
    I have encountered a new problem which I am sure there's a solution to.....
    I have a certain hierarchy and I want to implement a single save and load routine for all objects int he hierarchy (located int he parent class of course).
    Using the "flatten to XML" I'm able to create some nice XML files with all parent and sibling information saved (as long as the values are non-default of course).
    Where I am running into problems is the loading of the data within this XML file.  I want to be able to take an object and basically re-initialise it to the values within the file.  All fine and good I thought, but it doesn't work.
    The problem is that when using the VI with Dynamic dispatch inputs, the output of the "Unflatten from XML" is giving me a conflict with the Dynamic dispatch output saying the obejct types do not  necessarily match.  Is it not possible to match the object type on the input and output of the "Unflatten from XML" primitive?
    If I try removing the "Dynamic Dispatch" input to a static input, then it only loads the data for the parent class regardless of the actual input class.
    Am I doing something silly here or is there no other way to properly load a sibling class from a file using only a method residing within the parent class?  I was hoping I could have a single "Save-Restore" function residing within my parent class to make life easier for me.
    Shane.
    Message Edited by Intaris on 06-17-2009 05:24 AM
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

    Hi Tst,
    Problem is that in order for the cast to yield any useful results, I have to make the inputs and outputs non-Dynamic which results in ONLY the data for the parent class being loaded.
    If the inputs and outputs are Dynamic, then a cast will not solve the problem (It could be a grandchild class being cast as a child, thus breaking the dynamic dispatch tables).
    The only solution I see is for the "UnFlatten from XML" to RETAIN the true object type.
    Either that or use my beautiful solution 
    Shane.
    Ps I just did a bit of a test of the race condition probabilities.  I ran 100000 tests (100k) with a program stressing both cores AND ram of my machine in parallel and all 100k of 100k iterations worked out OK.  I suppose that lets me think I should be in the range of at least 99.99%....... 
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

  • Load variables from XML into Flash

    I was wondering how to load variables from an XML document to
    a Flash file? I am familiar with the code to do it for a text file,
    but was wondering how to do it for XML.
    Many thanks in advance!
    JJ

    Thanks for the recommendation on the site. What I am trying
    to do is load varaibles from an XML file into text boxes in my
    flash movie.
    Here is my loading:
    var my_xml = new XML();
    my_xml.ignoreWhite = true;
    my_xml.onLoad = function(success){
    if (success) {
    gotoAndStop("slide01");
    my_xml.load("narration.xml");
    this is what I have on my frame with the text boxes (the text
    boxes are also have the variable name in the variable area)
    var narration = my_xml.picture01;
    var my_title = my_xml.my_title;
    var my_date = my_xml.my_date;
    should I do my_date.text = my_xml.my_date; instead?
    my xml doc looks like this
    <?xml version="1.0" encoding="iso-8859-1"?>
    <picture01>This is the text for picture
    01</picture01>
    <picture02>This is the text for picture
    02</picture02>
    <my_title>Las Vegas</my_title>
    <my_date>October</my_date>
    Any help on this would be GREATLY appreciated!
    Text
    my_date.text = my_xml.my_date;

  • Web.xml - can't get the url from xml file..

    Hi all,
    Im a beginner @ jsp =)
    My question is as follow..I cant get base from the web.xml file.
    This is a shorten version of my web.xml..
    <web-app>
         <welcome-file-list>
    <welcome-file>Default.jsp</welcome-file>
    </welcome-file-list>
         <!-- Define the controller servlet -->
         <servlet>
              <servlet-name>ControllerServlet</servlet-name>
              <servlet-class>ControllerServlet</servlet-class>
              <!-- Define initial parameters that will be loaded into
              the ServletContext object in the controller servlet -->
         <init-param>
                   <param-name>base</param-name>
                   <param-value>http://localhost:8080/burnaby/ControllerServlet</param-value>
              </init-param>
    </servlet>
         <servlet-mapping>
    <servlet-name>ControllerServlet</servlet-name>
    <url-pattern>/ControllerServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    And my jsp file:
    <%
         String base = (String) application.getAttribute("base");
         String imageUrl = (String) application.getAttribute("imageUrl");
    %>
    <table width="740" cellpading="0" height="75" cellspacing="0" border="0">
         <tr>
              <td align="left" bgcolor="#F6F6F6">
                   <font face="Verdana" size="3">Sky's E-mall!</font>
              </td>
              <td align="right" bgcolor="#F6F6F6">
                   <a href="<%=base%>?action=displayShoppingCart"><img border="0" src="<%=(imageUrl + "cart.gif" )%>"></a>
                   ���
              </td>
         </tr>
    </table>
    I have written it of a book im reading and i cant get it to work. Base and imageUrl always become null.
    thank you
    /Robert

    I'm a little new to JSPs and servlets too, but I'll give this one a shot. I think since your variables like 'base' are servlet initial parameters, they don't get initialized until you actually call the servlet ( I'm not 100% on this, though). Try calling the servlet and having it forward the response back to your original JSP and see if you get values then.

  • How to load data from XML DOM into tables using Business Components

    <p>
    Hi,
    </p>
    <p>
    I need to upload XML file (it&#39;s not a problem) an load data (DOM tree) from this file into relationan tables. This filelooks like this:
    </p>
    <p>
    <font face="courier new,courier" size="2">&lt;Departments&gt;
       &lt;Department&gt;
          &lt;DepartmentName&gt;OPERATIONS&lt;/DepartmentName&gt;
          &lt;Localization&gt;BOSTON&lt;/Localization&gt;
          &lt;Employees&gt;
             &lt;Employee&gt;
                &lt;LastName&gt;TURNER&lt;/LastName&gt;
                &lt;Job&gt;SALESMAN&lt;/Job&gt;
                &lt;Manager&gt;7698&lt;/Manager&gt;
                &lt;HireDate&gt;1981-09-08&lt;/HireDate&gt;
                &lt;Salary&gt;1500&lt;/Salary&gt;
                &lt;Commerce&gt;0&lt;/Commerce&gt;
             &lt;/Employee&gt;
          &lt;/Employees&gt;
       &lt;/Department&gt;
    &lt;/Departments&gt;</font>
    </p>
    <p>
    Is there any Business Components support to obtain this ? What about primary and foreign keys values (there is no in XML file). How to place this XML data in appropriate tables ?
    </p>
    <p>
    Kuba 
    </p>

    Pl post details of exact OS and database versions, along with a sample of the XML file and description of the tables. What have you tried so far ?
    http://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_control_file.htm#i1005614
    HTH
    Srini

Maybe you are looking for

  • Idoc not Trigerring for Change Pointers in CREMAS only for 2 fields

    Hi All, I am trying to trigger the Idoc for 2 fields ( Contact Person First Name & last Name) KNVK-NAMEV and KNVK-NAME1. I have maintained the fields in BD52. Whenever I change the fields, entries get created in CDHDR, CDPOS and BDCP. But the Idloc d

  • Frame state

    Hi, How can I open frame with maximize and minimize buttons not active. It's in applet with AWT. Thanks,

  • Hide the default page (index.jsp) from the url

    I have configured weblogic to make certain pages such as index.jsp to           be a default page so that I can type in www.mydomain.com and it takes           me to www.mydomain.com/index.jsp. However, I would like for this page           to be hidd

  • Error validating PTO configuration invoice qty

    When we run Receivable Interface from Order Entry to create the receivable invoice, we face the error which states that " Error validating PTO configuration invoice quantity". Can any please suggest as how to fix this problem.

  • HELP!! Can't calculate date fields

    I have a cript that calculates between 2 date fields. They have a date format of: DDMMYYYY In an other form with a different date format it works, but here it doesn't What am i doeing wrong? var dateOfPensioen = formulier1.Formulier.Vraag2.Retirement