List Component Links

I have created AS3 script for loading and parsing an RSS
feed. I have successfully displayed the "title" node on the stage
in a List Component with the instance name "blogList". Now I wish
to use the corresponding "Link" node so that each item in the list
will open a web page to the link for that story. I have been able
to get each title to link to the last URL link in the RSS feed. I
am stumped. Help :)

Answer from the boys at actionscript.org.
Works like a charm. The function for click is outside of the
function blogLoaded and most importantly used the data property on
the object in order to pass the correct reference.
var blogLoader:URLLoader = new URLLoader();
var blogURL:URLRequest = new URLRequest("
http://www.canada.com/calgaryherald/topstories.rss");
blogLoader.addEventListener(Event.COMPLETE, blogLoaded);
blogLoader.load(blogURL);
var blogXML:XML = new XML();
blogXML.ignoreWhitespace = true;
function blogLoaded(evt:Event):void {
blogXML = XML(blogLoader.data);
//trace(blogXML);
for(var item:String in blogXML.channel.item) {
blogList.addItem({label:blogXML.channel.item[item].title,data:blogXML.channel.item[item]} );
blogList.addEventListener(MouseEvent.CLICK, blogClick);
function blogClick(e:MouseEvent):void {
navigateToURL(new
URLRequest(e.currentTarget.selectedItem.data.link));

Similar Messages

  • Duplicate custom component link when used in panelPage

    Hi Guys,
    I created a custom component, pretty simple component, just to create a list of links, something like :
    Community Discussion Forums » Developer Tools » JDeveloper
    It works fine in other pages, but when I use it with panelPage, panelPage automatically adds another link on the bottom of the page, and each time I refresh the page, the links keep repeating itself ... (behaviors kind of like the facet nemu1 links being added in the bottom)
    How can I avoid this behavior? (maybe set some attribute in panelPage?)
    Would really appreciate any help!

    Hi,
    how does the page source look ?
    Frank

  • List component question

    Hello,
    I have flash cs4, and I am using a list component. I know how to open swf when somebody clicks on the list, but is there any way to tell the component to open a .pdf file on  a new window using the list component?
    thanks for your guidance
    Cheers.

    You just need to link to the pdf like you would link to any web page.  The code you use depends on the version of actionscript you are using...
    AS2:  getURL("http://www.yourdomain.com/your.pdf", "_blank");
    AS3: navigateToURL(new URLRequest("http://www.yourdomain.com/your.pdf"), "_blank");

  • Why doesn't  list component identify grid component

    Hi,
    I have couple of doubts.
    1. I put <grid> component inside of <List>
    component . Surprise! The <List> component is not identifying
    the <Grid> component. Is this bug of Flex Or it's property of
    Flex <List> component.
    What I have to do to make <Grid> visible even I put
    inside of <List> component.
    2. what is an equilanat of <Table> in Flex. Ofcourse it
    may be DataGrid. Suppose If I use DataGrid I have lot of
    restrictions.
    These are the problems I am facing with <DataGrid>
    ( i ) Is this possible to put radio button / link bar as one
    of column in a row. I mean how to put radio button / link bar as
    row in array
    ( ii ) Is it possible to make columns in a row as variable
    sizes i.e. suppose if DataGrid header has size=100. Is it possible
    to make column of next row size as 200.
    anybody help me in this regard. I am eagarly waiting for
    reply.Because I have been strugling to solve this problem for last
    4 days.
    Regards,
    Siva Kumar

    A custom itemRenderer will be the solution to several of your
    issues(1,i).
    For 2., there is no exact equivalent of an html table. Look
    at Grid, TileList, or consider making your own component.
    for ii), no, all cells in a columns must be the same size.
    Tracy

  • PM:Task list Component addition

    Hello Guys,
    We are facing below issue.
    1. In task list component screen, if we add a component via Direct entry, system create Standard BOM.
    2. If we add the component via component selection from BOM, it creates the material BOM.
    The second method is preferable as changes in BOM is reflected in task list as the link is maintained. This is not an issue if we are creating task list manually as we can select the component manually. But however, if we create task list via LSMW or load program, the issue arises.
    When contacted SAP on OSS, SAP advised to use BADI IMRM_COMP_PROCESSING, method SET_COMP_PROCESSING with
    E_CORRECTION_ACTIVE = ' '. This seems to resolve the issue. But I am not sure of the side effects.
    Has any one implemented this BADI earlier and can share the experience?
    Thanks
    Ashish Barsagade

    hi,
    U can assign material BOM in Tasklist header... there is a Assembly field... just enter the name of Material BOM. and Material BOM would be attatched to task list.
    it will solve ur problem
    Regards,
    Amit kushwaha
    Edited by: amit kushwaha on Feb 25, 2008 10:45 AM

  • Making xml list with links

    I was able to create a list component in Flash 8 and load the
    items from an
    xml file, but I can't figure out how to make each line
    clickable in order to
    work as a link. The code used to populate the list is:
    form = new Object();
    form.load=xmlConn.trigger();
    The xml file is something like:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <articles>
    <articles_items>
    <title>Link text 2
    </title>
    <urlstring>article2.htm
    </urlstring>
    </articles_items>
    <articles_items>
    <title>Link text 1
    </title>
    <urlstring>article1.htm
    </urlstring>
    </articles_items>
    </articles>
    I intended to use the second field of each "articles_items",
    the "urlstring"
    field, to associate with each "title" listing on the list
    component, so that
    when "Link text 1" gets clicked it takes to "article1.htm".
    The instances
    created are named articlesList, xmlConn, articles_ds.

    Here is xml code
    <catalogue>
    <sconces>
    <images>
    <image_chemin href="pt/ref115.png"/>
    <image_gd href="gd/ref115.png"/>
    <image_reference>ref : 115</image_reference>
    <image_size>H: 25 in, W: 27 in</image_size>
    </images>
    <images>

  • List of Links, opening new window on click

    Dear developers,
    I'm Developing a solution in which I need to show a list of links and when you click opens a new window . Every name of the list have different link.
    In conclusion, I want to show a list of links that when you click to open in a new window.
    My solution:
    1. I've implemented a Select One List associated with a valueChangeListener.
    2. ValueChangeListener call ManageBean method, and in the method I calcule link
    3. Using JavaScript inside ManageBeanMethod I open the new window.
    It works well, but when I click on the same value valueChangeListener not call the method. As the value doesn't change, doesn't activate the valueChangeListener. I need to always call ManageBean method.
    They know how you fix it from my implementation?+
    There is a better solution? there is an especific component?+
    Edited by: 966474 on 19-oct-2012 1:31

    Hi,
    check this thread {thread:id=2452884}

  • How to Open a New window from a List region Link, Please help

    I am trying to get a new full window( Not popup window) open from a list region link. The list region entry is an Image. I get the new page open, but it is not in new window, it is in the same window.
    I know I have to give the target = "_blank" somewhere. But In List region, I dont know where to add this.
    Please help
    George

    Yes, you are right Arun. That is more elegant way of
    doing it. Keep it up. thankx..
    Btw, why do you hate javascripts? Can you imagine the
    internet world without javascript (or ant scripting
    language)?yep i agree... but i try my best to avoid scripts.. as i had been workin around some japanese technologies... and there are three major mobile market players there... who has their own content type and all those devices never support javascript..
    more over i donno that... in all 3 yrs i have never used that ;-))

  • How do I add a link to the list of links under the "My Account Link"

    Q) How do I add a link to the list of links under the "My Account Link"?
    A) Edit any of your portlet web services and go to the "Advanced URL Settings" and then "User Configuration URL". If you type a path in this box, a link displays on the My Account page.
    You need to restart your portal web server to see results immediately because the display page is cached.

    What To Do If Your iDevice or Computer Is Lost Or Stolen
    If your Mac, iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should do in advance - before you lose it or it's stolen - and some things to do after the fact. Here are some suggestions:
    Reporting a lost or stolen Apple product
    AT&T, Sprint, and Verizon can block stolen phones/tablets
    What-To-Do-When-Iphone-Is-Stolen
    Lost or Stolen iPhone? Here’s What to do.
    6 Ways to Track and Recover Your Lost/Stolen iPhone
    Find My iPhone
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
    Find My iPhone
    Setup your iDevice on MobileMe
    OS X Lion- About Find My Mac
    How To Set Up Free Find Your iPhone (Even on Unsupported Devices)
    Third-party solutions for computers:
    VUWER 1.5.4
    Sneaky ******* 0.2.0
    Undercover 4.7
    LoJack for Laptops Premium Mac
    STEM 2.1
    MacPhoneHome 3.5

  • How can I select an item from a list component with a seperate button

    This is a repost, I decided it'd probably be better here than
    in the general discussion board. I will try to delete the other
    one.
    Hello Everyone,
    This is my first post here. I am trying to figure out how to
    select an item within a list component with a button. This button
    is calling a function. I have searched for the past 3 hours online
    and I can't find anything about it. I thought perhaps I could set
    the selectedItem parameter, but that is read only, and I believe it
    returns an object reference rather than something like a number so
    even if i could set it, it would be pointless. I also found a get
    focus button, thought that may lead me somewhere, but I think that
    is for setting which component has focus currently as far as typing
    in and things like that. I am lost.
    Basically I am looking for a way to type this
    myList.setSelected(5); where 5 is the 5th item in the list.
    Any help would be much appreciated.

    Never mind found it. It is the property called selectedIndex
    and it is writable

  • How to populate list component via xml file?

    There is a TextArea component that should show the name and
    the description of the item selected in the list component. But I
    dont know how to populate list with external XML and what should be
    the coding in flash as well as what should be written in the XML.
    Please help.

    Here's an xml file listing a couple of brother comedy teams:
    <?xml version="1.0" encoding="UTF-8"?>
    <team>
    <brothers>
    <Marx>
    <name>Groucho</name>
    <name>Chico</name>
    <name>Harpo</name>
    <name>Zeppo</name>
    <name>Gummo</name>
    </Marx>
    <Howard>
    <name>Moe</name>
    <name>Curly</name>
    <name>Shemp</name>
    </Howard>
    </brothers>
    </team>
    Open a new .fla and save it in the same folder as the .xml
    file. Place a List Component on the Stage and name it (in this
    case, "comicTeams_list"). In the first frame write the following
    ActionScript:
    //create XML object and load external xml file
    var broList:XML = new XML();
    broList.ignoreWhite = true;
    broList.onLoad = processList; // this is a function that will
    be written below
    broList.load("populateList.xml");
    function processList(success:Boolean):Void{
    if(success){
    loadList();
    }else{
    trace("Load failure");
    function loadList():Void{
    var broName:String;
    var listEntries =
    broList.firstChild.childNodes[0].childNodes[0].childNodes.length;
    for(var i:Number = 0;i<listEntries;i++){
    broName =
    broList.firstChild.childNodes[0].childNodes[0].childNodes
    .childNodes[0].nodeValue;
    trace(broName);
    comicTeams_list.addItem(broName);
    //to make something happen when you click on a name in the
    List, create a Listener and function
    var broListListener:Object = new Object();
    broListListener.change = someAction; //"someAction" is a
    function to be written shortly
    //add the Listener to the List
    comicTeams_list.addEventListener("change", broListListener);
    function someAction(evtObj:Object):Void{
    var pickedBrother:String = evtObj.target.selectedItem.label;
    //write actions here, referencing pickedBrother variable
    The names of the Marx Brothers will appear in the box.
    This is written in AS2. When you post a question, it's a good
    idea include which version of ActionScript you're using.

  • Count the rows in a list-component

    Hi,
    How can I count the rows with a value in a list component?
    I thought it would be RowCount but as I figured out that shows the number of shown rows, not the number of rows with a value.

    Hi,
    Try list.dataProvider.length

  • List component row manipulation

    I have two questions regarding as3 list component:
    - I'd like to highlight and keep selected the item a user last selected from my list component. I've combed the live reference as well as google and must be typing the wrong search words. I can tell what label and index an item was that was selected but am not finding a way to highlight and keep highlighted the user's choice in the list component.
    - Also, I'm exploring the notion of inline buttons within a list's rows. If a user hovers their mouse over a row, a set of small buttons come up the user can click on for further functionality. This may be more of a make your own component answer but I'm exploring it nonetheless. Any thoughts or comments on this?
    Thanks!

    no something else is going on. Or perhaps you didn't explain your problem clearly.
    After servlet b calls getList() you have two servlets each having a reference to the same list
    A------\
    List
    B------/

  • Select a link from list of links in web page

    I'm new to OATS. Please help me. I want to click a link from a list of links. I'm testing a web page and try to create a functional test script.

    you can also use regular expression. For example if you know a keyword (unique) in your link, the try with follows:
    String linkText = "myLink";
    web.link("/web:window[@index='0' ]/web:document[@index='0']/web:a[@text='*"+ linkText +"*']").click();
    Regards,
    Deepu M

  • Adding Images to the List component

    Adding Images to the List component while using the FLV
    PLayback
    All, ( i can send you my source files if it would help)
    I'm using the FLV Playback component and loading videos into
    it from an external xml file. I also have a list component tied to
    the FLV playback that when you click on one of the elements in the
    list, it plays that movie.
    QUESTION:
    My question is how do I add an image to the list component?
    Below is the xml file and the actionscript. I've added the image
    attribute to the XML file as img="time_square.jpg" and added the
    element of the array when calling/creating the list. Did I do this
    right?
    Any direction would be very much appreciated.

    Adding Images to the List component while using the FLV
    PLayback
    All, ( i can send you my source files if it would help)
    I'm using the FLV Playback component and loading videos into
    it from an external xml file. I also have a list component tied to
    the FLV playback that when you click on one of the elements in the
    list, it plays that movie.
    QUESTION:
    My question is how do I add an image to the list component?
    Below is the xml file and the actionscript. I've added the image
    attribute to the XML file as img="time_square.jpg" and added the
    element of the array when calling/creating the list. Did I do this
    right?
    Any direction would be very much appreciated.

Maybe you are looking for

  • I'm getting Error 4280 when trying to burn a CD

    Hi, I hope someone can help me. I have never had issues before but in the last few days it has been HORRIBLE. I have brand new CDs to burn to and sometimes I get an error to insert a blank disc(how can it not be it is brand new) Other times I try to

  • How can I get a 90sec video to loop in iTunes 10.5/Mac?

    I created a 90 sec video in iMovie. I imported it to iMovie so I could play it on a loop on my MBP (OS 10.5.8) during an open house, but iTunes won't repeat the video, no matter what settings I use from the menu or the (repeat) buttons...I tried copy

  • Timeline Tab active, but items grayed out.

    When I try to customize the Timeline webpart, I see the TIMELINE Tab. However, all of the boxes are grayed out. I have tried selecting the timeline while editing the page and not...

  • Best mouse for G5

    hi, I have a Logitech-MX518 corded mouse which I use with my g5. It works pretty well but much better when I plug it into a PC Is there a good mouse for mac? I find the apple ones a bit cumbersome thanks

  • Big issues with Leopard and writing to NAS units or Windows servers

    Quick run down of the issues 1st client has a number of G5's all running 10.5.2 NAS units running embedded Windows SBS 2003 or Windows Storage . All shares have worked fine before the macs were upgraded to Leopard. Now the macs can see the shares, mo