A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: XML, Opening URL link in new window

  1. #1
    Junior Member
    Join Date
    Aug 2007
    Location
    Virginia
    Posts
    9

    XML, Opening URL link in new window

    Is there a way to change the XML code of a template I am using to open a URL link in a new window? Currently, when I test my links, the link opens in the same window. Here is the XML code I am using:

    <?xml version="1.0" encoding="utf-8"?>
    <thumbnails>
    <thumbnail filename="banderas.jpg" url="banderas/banderas.html" target="_blank" title="Antonio Banderas Movie" description="Actor" />
    </thumbnails>

    I have tested it in IE and Firefox and in both browsers, the new window opens in the same window. I have also tried to use the target="_top" and it isn't opening in a new window, either. Thanks! Amber

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    can you make use of this method ?
    PHP Code:
    url = new Array();
    tgt = new Array();

    var 
    _xml = new XML();
    _xml.ignoreWhite true;
    _xml.load("test.xml");

    _xml.onLoad = function(){
    var 
    nodes:Array = this.firstChild.childNodes;
    for(var 
    i=0;i<nodes.length;i++){
    url.push(nodes[i].attributes.url);
    tgt.push(nodes[i].attributes.target);
    }
    };

    // usage with getURL
    // getURL(url[0],tgt[0]); 

  3. #3
    Junior Member
    Join Date
    Aug 2007
    Location
    Virginia
    Posts
    9

    where to put code

    Hi! Thank you so much for the response. My next question is: where can I put this code? Can it go in the same xml doc that my other code was in? Or, do I create a separate php file? Amber

  4. #4
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    the code snippet posted above is for Flash.
    the code goes on the main timeline of a .fla file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center