Dynamic Link Buttons & xml file

Hi All
I'm calling an external XML File with a structure of ;
<papers>
<paper id="1">
<name>Net Paper One</name>
<description>
~~~~~~~~~~
</description>
</paper>
</papers>
which i'm calling using
<mx:HTTPService id="myNetPapers"
url="xml/newearthpapers.xml" result="netPapersResultHandler(event)"
resultFormat="e4x"/>
and
private function
netPapersResultHandler(event:ResultEvent):void {
xmlNetPapers = event.result.paper as XMLList;
Initially i wanted to use a combobox for the name and display
the description in a textbox.
How can i dynamically disply a Link Button for each name of
the xml document and still display the description as normal. The
link buttons i want to display horizontally across the top of the
page.
Any suggesttions
Whitetimer

Hi Leotemp
I managed to sort it out with this ;
<mx:Script>
<![CDATA[
import mx.controls.LinkButton;
import mx.controls.Button;
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
private var xmlNetPapers:XMLList = new XMLList();
private function
netPapersResultHandler(event:ResultEvent):void
xmlNetPapers = event.result.paper as XMLList;
/* resultCombo.dataProvider = xmlNetPapers.name; */
createButtons();
private function createButtons():void
for each(var name:String in xmlNetPapers.name)
var myButton:Button = new LinkButton();
myButton.label = name;
myButton.addEventListener("buttonDown", buttonClick);
resultBox.addChild(myButton);
/* private function comboChanged(eventObj:Event):void
textOutput.text = xmlNetPapers.(name ==
eventObj.target.selectedItem).description;
private function buttonClick(eventObj:Event):void
textOutput.text = xmlNetPapers.(name ==
eventObj.target.label).description;
]]>
</mx:Script>
Many thanks
Whitetimer

Similar Messages

  • Create controls dynamically based on XML file

    Hi All,
    I am very new to Flex environment. I am trying to integrate FLEX with ASP.net for better UI interfacing.
    May I know if is it possible to draw fields (Text boxes, option buttons, etc) on the Flex dynamically using a XML file at runtime.
    What my expectation is, if I have an XML file with the filed names and type, can the Flex draw them on the front end UI?
    Please  let me know your thoughts.
    Naveen

    Is there possible to have an portlet that can be enlarged?Yes. You can maximise a portlet
    And is there possible if I have a .php file, and then I want to create a portlet based on that .php fileNot directly.
    If you are going to run the PHP file in its own machine then you could use a browser or clipper portlet. If you want to run the PHP file on the JVM itself, I believe there are some commercial products that let you do this (then its equivalent to a JavaServlet). This could then be included by any dummy JSP and you could use a plain jsp portlet . however you wqould have to be careful how you generate links within the PHP file (because you'd have to mimic the way BEA tags behave) .
    never tried this and if you have few PHP pages then you could probably rewrite to java.

  • How Can I Attach and Link an XML file to a 3D Model in a PDF?

    How Can I Attach and Link an XML file to a 3D Model in a PDF?
    What I am trying to do is find out how to have a 3D model and a parts list linked to it within the PDF file.  I would also like to be able to add to the parts list if at all possible once the pdf has been created.  A template to create future PDF's with the 3D model and list might also be useful.
    I am not entirely sure if this is all possible within a PDF file, but I have viewed a PDF (Adidas Trainer) example which has a Excel file attached to it which links to the 3D model.  I have also had a look at partner products such as Lattice, Tetra4D, Anark, which can do animations and all sorts, but frankly it seems a bit overkill for what I am looking to do.
    Please, any help would be appreciated.  Thanks

    AlliCT59 wrote:
    > Shared Object sounds like it would work, but hten agian,
    I'm really stuck!
    >
    > Thanks for any help.
    >
    > Allison
    I wrote about it while ago, let me paste the whole thing.
    This example has simple
    buttons which upon click go to new sites and in the same time
    place record in form
    of *.SOL file on user drive. That record is read when you hit
    the next button and
    based on that the button will be selected as the one last
    clicked.
    You could use the very same thing just instead of suppressing
    button simply gotoAndPlay frame
    to continue the part you need.
    http://groups.google.com/group/macromedia.flash.actionscript/browse_thread/thread/36649453 1f4fd02d/245a57d0cdaa1d29?lnk=st&q=&rnum=3&hl=en#245a57d0cdaa1d29
    The source is in a different place, i re-upload for you :
    http://www.flashfugitive.com/stuff/SharedObj_urlcheck/
    fla file
    http://www.flashfugitive.com/stuff/SharedObj_urlcheck/beentourl.fla
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Link multiple  XML files  stored in oracle database

    Link multiple XML files
    Can any one give some code example regarding my issue:
    If I have for example file1.xml stored in one relational table and another file2.xml stored in another table ….etc
    And I want to put link and reference which will make me able to link these files and make query or insert…etc
    May be I need to use Xlink, Xpoiner or Xinclude . But if this is the solution to this problem please can you give a simple example that will help to understand the solution especially that I want to develop my project in oracle and I will register xml schema to insert the xml files in the database
    Thanks lots and I am waiting for your solution

    no answer for my question
    is this thread is a write place or I have to move my query to another part of the forum
    thanks

  • Dynamic link button from speed grade to premiere is grey.

    Dynamic Link button from Speedgrade to Premier is grey. No problems Linking from Premier to SG, but no way to send the project back to Premier. The project is in Apple ProRes 4444. I have a Mac Pro last generation. Thanks for an urgent help!

    Well... I have done everything you advice first SG, but it didn't work, so I have cleaned the whole CC, erasing any possible trace of it from my computer, then I have gone through the Cleaner Tool and reinstalled brand new the whole thing.
    My builds now:
    PrPro: 8.2.0(65)
    SpeedGrade: 8.2x51
    Exactly the same. Obviously, troubleshooting.
    For what I understand, according to your comment, is that I ave to match the builds, which would mean either to low down PP to 51 or up SG to 65... Is ti that or am I getting crazy?
    But how the hell to do it?
    I have a 2 hours film with a 1 month grading work on it stuck in SG... Aaaaahhhhh!
    (Oh, the good old times of FCP 7 and Color... NEVER A PROBLEM)
    Best,
    Luis

  • Dynamic linked buttons

    I have a horizontal image scroller that has dynamically
    linked graphics and text underneath - I would like to also make a
    button that is linked dynamically to a text file so that my web guy
    can change the url on the fly - any ideas.

    Should this be on the Flash forum?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "allprnt" <[email protected]> wrote in
    message
    news:frs2p2$gbl$[email protected]..
    > Hey,
    > I'm creating a website for a client that has a component
    scroll on the
    > main
    > stage linked to a dynamic text box with some buttons
    that when clicked
    > will
    > load an external file on Layer 1 of the main timeline in
    Flash. When I
    > tested
    > it in Flash it worked, when I previewed it in
    Dreamweaver it worked but
    > when I
    > uploaded it to the server. The main swf loads but the
    files that are
    > linked to
    > the main .swf don't
    >
    > On the first frame of the main time line I have the code
    below
    > loadMovieNum("movies/Thumbnail1_mc.swf",1);
    >
    >
    >
    > On each of th buttons I have the code below
    > on (release) {
    > loadMovieNum("Movies/Thumbnail1_mc.swf", 1);
    > }
    >
    > I have read some of the posts here but my main .swf file
    plays so its not
    > the
    > "scripts" folder in the wrong place.
    > and I'm pretty sure that it can't find the files due to
    my path to the
    > file,
    > but I'm not sure how to get the main .swf file to look
    for the Thumbnail
    > .swf
    > files on the server. Please help.
    >
    > Thank you
    >
    >
    >

  • Creating a Link with XML Files

    Hi,
    I am trying to import a XML file in a table structure following instructions from the Adobe help file (could only find a CS3 one, I am using CS4, the link to it: http://www.adobe.com/designcenter/indesign/articles/indcs3ip_xmlrules.pdf). Now the import works fine and my table is displayed correctly. My plan for this is to have XML files created from a database so when they get overwritten it will automatically update the tables in the file. While importing it I chose the "Create Link" option and I can see it in the links panel. All that seems fine. My problem is from this point if I do any changes to this file it gets added into my template along with the original with no formatting. So normally imported it looks like:
    code
    description
    unit
    price
    10000
    Product A
    Each
    5.00
    and if I edit it it then looks like this:
    5.00
    Each
    Product A
    10001
    PRICE
    UNIT
    DESCRIPTION
    CODE
    code
    description
    unit
    price
    10000
    Product A
    Each
    5.00
    And all I edited was the code value to be 10001 on the link yet it makes all these changes. Now if I edit the original XML file again it will crash Adobe CS4 and it freezes and says encountered error and closes. Does anyone have any advice on this situation? Is there a simple way to get XML tables inserted into a document that will change in the document if I edit the original file. If I have to change the XML that is fine as I can output it from the database pretty much whichever way I want.
    Here is the code for the XML file:
    <Table xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" aid:table="table" aid:trows="2" aid:tcols="4">
    <Cell aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="130">CODE</Cell>
    <Cell aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="59">DESCRIPTION</Cell>
    <Cell aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="130">UNIT</Cell>
    <Cell aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="130">PRICE</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="130">10000</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="130">Product A</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="130">Each</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="130">5.00</Cell>
    </Table>
    Any help would be appreciated.

    I wasn't using "Edit Original" before, but now that I do, I'm still unable to duplicate your result. When I edit and save, the results are just as one would expect. What application are you using to edit the XML? I am using Text Wrangler. What platform are you one? I've been testing this on a Mac, but could try it on Windows of that's what you are using. Also, out of curiosity, what does your XML structure look like? Here's mine:
    <Root>
      <Article>
        <Story>
          <Table xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" aid:table="table" aid:trows="2" aid:tcols="4">
            <Cell ..... (your cell nodes here)
          </Table>
        </Story>
      </Article>
    </Root>    

  • How to add URL links in XML file?

    Hi,
    I'm having problem with adding the URL links to the flash output. I'm using the XML file to call images and then the corrsponding links. Images are called correctly but when I try to add a link I'm not getting the links, but instead getting the HTML anchor tags as texts. I'm using the XML escape characters to escape the HTML tags but the results are not what I need.
    I'm using the following code:
    <thumbnail preview="large.jpg" thumb="thumb.jpg">
                <title><![CDATA[Finance Services]]></title>
                <discription><![CDATA[&lt;a href=&quot;http://www.google.ca">Google</a>]]></discription>
    </thumbnail>
    Output:
    Images are displayed correctly, but instead of getting the links, I'm getting following text message:
    <a href="http://www.google.ca">Google</a>
    I need to find out what I'm doing wrong. Am I using the correct way to add the links or not?
    Thanks for your time.

    I'm using following code for the Description part, where I need to place the HTML tags:
    var _discription:TextField = previewHolder.discriptionText.discriptionText;
    _discription.htmlText = _xml.thumbnails.thumbnail[photoNum].discription.toString()
    I'm using the htmlText, I tried replacing htmlText with tf.htmlText, but it didn't work. I'm importing the text field using import flash.text.TextField; do I need to import something for HTML tags to work?

  • Dynamic number of xml files with a specified max size

    Hi all,
    I'm using a custom report to generate xml files (via a ST program and a call transformation) containing
    data belonging to is-u invoices (some are much more complex and rich of data than other ones).
    I'm asked to generate the minimun number of xml files, the only limit is their maximum size (40 MB).
    How can I dynamically understand when I need to save an xml file and generate the next one if the
    size is only readable after the transformation,as far as I know?
    Thanks a lot in advance for your ideas.
    Angelo

    My problem is that different users may be loading different files.
    As there may be many simultaneous users and the xml document nodes do not get edited in any way, I only want to have one copy of each file in memory .... hence the application scope.
    If I make the var name fixed then a user loading xml2.xml would overwrite any previous file xml1.xml or whatever.
    I could switch to session scope but that would load possibly hundreds of copies of any given file at any given time and the files are not small :-(
    Keith

  • Dynamic link to external files

    Is there a way to dynamically link to an external file?
    Currently, when you link to a file, RH puts a copy of it in its
    working directory and lists it as a Baggage File. Once that's done,
    that file's dead; if the original file gets updated, I have to
    manually re-link to that file so that it can update its Baggage
    File version of the file. If the original file gets updated 30
    times per week, that's 30 manual udpates I would have to do. (Or
    once at compile time, but even that's a stretch to have to
    remember!)
    Is there a way to link to that always-evolving file and so
    that it only grabs a copy of it at compile time?

    I don't think this is built in to RoboHelp - I don't have the
    latest version, though. I take it this file is not HTML. What type
    of file might make a difference in how any workaround is
    implemeted.
    My first thought would be to make it always external but then
    it has to be shipped with the CHM file. To link to an external
    file, Micosoft has a javascript function called parser which will
    find the correct path if it is installed in the same directory as
    the .chm. This is explained in HelpWorkshop's help file. I could
    send you the code if you'd like.
    In using this, I have found that every file type responds
    differently - some open directly in help viewer, some open their
    own application, and some throw up a dialog that it might be
    unsafe.
    Another option would be to have it edited while in your
    RoboHelp project directory. i.e. consider that file the "original."
    Unfortunately, I think you'd have to share the entire project to
    allow someone to do this and that might open another can of worms.
    Good luck,
    John

  • Dynamic linking of external file

    I try to link to an external file, and display it as the text file from oracle report. The path is determined at runtime. I searched on the Oracle Report's Help and found a hint on SRW.SET_HYPERLINK(...), but I couldn't get it work. Please help.
    Thanks, in advance, for your help.
    Regards,
    TD

    To link to a file dynamically, you need to use the "read from file" property against a column in the data-model.
    If the filenames are stored in the database, you can use a simple query to create the column to return the filenames. Otherwise, you can use a PL/SQL formula column of type "char" to return the names.
    Once you've created the column, set the "read from file" property to "yes" and set the format to "text". You can then create a field in the layout based on this column value.
    The above, is the typical way of handling this. You can also use srw.set_field() to change the value of a field in a format trigger. This is less efficient but useful for some cases of dynamic values.

  • URL link inside XML file

    Hi, does anyone know how if its possible to create a link
    inside XML description. The script like this:
    <a href="
    http://yoursite.com"target="_blank"> did not
    work.
    Thanks,

    Thanks, I tried the code which made the whole existing script
    fall apart. I got the file from FlashDen and to do the change will
    require an advanced programming in which I am absolute 0. Here is
    the template
    http://www.flashden.net/files/16781/index.html
    I am trying to create URL inside the image description.
    I feel absolutely helpless.
    Thanks again for your effort.

  • PPro Dynamic Link To Encore (File Allocation)

    Hello all,
    First, I've just started using PPro CS5 and what a treat it's been.  Thanks to the Adobe team and to the regulars in the Hardware Forum for all the help.
    If my work flow is:  Assets > Edit In PPro > Dynamic Link to Encore > build IMG... then what would be the best way to spread the files across a 4-drive system?
    System
    -  W7-64 bit, Prod Prem with PPro 5.0.1 (and now 5.0.2 as of last night)
    -  i7930 OC 3.4GHz (water cooled)
    -  Asus P6T SE
    -  12GB RAM
    -  GTX470 (with hack, but no longer needed after last night )
    -  Coolermaster Haf X
    -  Antec 1000W power
    -  C:  OS and programs (150 GB Velociraptor)
    -  F:  PPro project and source files (captured videos and music) (F3)
    -  G:  PPro media cache, preview files (F3)
    -  H:  "masters", page file (18 GB) (F3)
    -  no option to Raid (will most likely happen in the distant future)
    -  DVD-R, BD-R
    -  so far this system is "fast" and stable for me.  Loving it!
    Project
    -  DV > DVD (basic editing with no files or apps applying out-of-the-ordinary tasks)
    -  Future Use:  HDV > BDR (basic editing with no files or apps applying out-of-the-ordinary tasks)
    Thoughts
    -  I'm fairly confident in my PPro allocations after reading Generic Guidline For Disk Setup (http://forums.adobe.com/thread/662972) but always looking to tweak and improve.  This is more with the addition of Encore to the mix.
    -  I'm thinking the Encore files would go on G and the IMG file would be kicked out to H.  But if Encore makes heavy use of the media cache and previews on G, then maybe the Encore files and IMG should go on H.  Opinions?
    -  Any better way to allocate the files?
    -  Any suggestions on my page file size/location?
    These initial projects are also my way of fine-tuning my new work flow, computer configurations/settings,
    Thanks,
    Erik (Pyramid Pyro)

    When you dynamic link to Encore, you send it nothing really: it opens an instance of the pproheadless which gives Encore what it wants until it is time to transcode it, and then it compresses the PR sequence using the Encore settings you set for the project and for that sequence (ones like the ones Encore tells you it can't load). So yes, it matters.
    Has Encore CS5.1 (the version that is part of PR CS5.5) worked for you before?

  • I want to add an tag dynamically into an xml file

    i have created an xml file and parsed it after parsing if a parameter is passed i have to dyna mically create an element and add that child node to the xml file can anyone help me

    You can add nodes to a DOM (Document object model). There are appropriate create methods in the Document object.
    And, if you want to, you can turn the modified DOM back into XML using java.xml.transform classes.

  • Dynamic url to XML file url in jstl

    Hi!
    What i need to do:
    1. I get some parameters when entering a jsp page
    2. I use these parameters to get an xml file from a server
    3. I get a url to a picture from the xml file and load it
    The problem is when i need to create the url to that xml file.
    1. I read the parameters
    String x = request.getParameter("X");
    String y= request.getParameter("Y");
    2. forming the url to xml file
    this doesnt work:
    <c:import url="http://www.website.com/something/something.jsp?xcoord=x&ycoord=y" var="xml">
    <x:parse...
    this works, but it is static...
    <c:import url="http://www.website.com/something/something.jsp?xcoord=5&ycoord=6" var="xml">
    <x:parse...
    It is propable that i read the parameters in a wrong way... what is the right way? Heh, i hope u understood what i tried to tell. :)

    This is maybe because you are using a String and an Integer.
    Try this:
    int x = Integer.parseInt(request.getParameter("X"));
    int y = Integer.parseInt(request.getParameter("Y"));Happy Coding! :-)
    bye ki

Maybe you are looking for

  • I keep getting a message that reads Introduction: A security and stability update for Firefox is available - 3.6.15 and when I click to update it can't connect to the server. What's wrong?

    I'm using Mac OS X version 10.6.6. The message strongly recommends that I apply this update for Firefox as soon as possible but when I click Update Firefox, it seems to try and update but never really gets started.

  • Sudden strange message

    I'm running Photoshop CS3 on a 3.06 GHz Intel Core 2 Duo Imac with 4GB of memory. I am suddenly getting this message every time I try to save a change to an image: "Could not save (image name) because the file is already in use or was left open." I h

  • Selective copying from iTunes to iPod?

    The music in my iTunes library exceeds the capacity (30GB) of my iPod. Is there a way that I can keep all the music in my iTunes library but copy only those songs I currently want on my iPod (and will fit)? I'm hoping I don't have to go the the troub

  • Database error when generating reports.

    When I try to generate a report I get this error message: A​ ​d​a​t​a​b​a​s​e​ ​e​r​r​o​r​ ​o​c​c​u​r​e​d​.​ ​T​h​e​ ​d​a​t​a​b​a​s​e​ ​e​r​r​o​r​ ​t​e​x​t​ ​i​s​:​ ​(​C​S​)​ ​"​D​B​D​r​i​v​e​r​ ​f​a​i​l​e​d​ ​t​o​ ​l​o​a​d​ ​:​ ​/​o​p​t​/​n​o​v​e​l​

  • Import 1080p h.264 mov to editi with premiere pro?

    i am a nikon d800 user , and i like to use adobe premiere pro to edit the 1080p video clips for sharing with my friends, but the compressed H.264 MOV videos from D800 can not be playbacked or edited smoothly on many editing softwares such as Adobe Pr