Sorci
Sorci

Reputation: 3

Opening URL in new tab using XML

I have an xml document that holds the navigation structure for an swf file. I need to have one of the URL's open in a new tab. All of the urls are held in the xml file, the swf file references everything from the xml.

The link that I want to open in a new tab is the last one, "www.iwantthisinanewtab.com"

<item>
        <itemID>RESOURCES</itemID>
        <itemPageTitle>Resources</itemPageTitle>
        <itemPageURL>resources.html</itemPageURL>
        <submenuitemS active="true">
            <!--New SubMenu Item-->
            <submenuitem>
                <submenuitemID>OVERVIEW</submenuitemID>
                <submenuitemPageTitle>Resources</submenuitemPageTitle>
                <submenuitemPageURL>resources.html</submenuitemPageURL>
            </submenuitem>

            <!--New SubMenu Item-->
            <submenuitem>
                <submenuitemID>FLOWERS & GIFTS</submenuitemID>
                <submenuitemPageTitle>Flowers & Gifts</submenuitemPageTitle>
                <submenuitemPageURL>http://www.iwantthisinanewtab.com</submenuitemPageURL>
            </submenuitem>

Any help would be extremely appreciated.

Upvotes: 0

Views: 3758

Answers (1)

robertp
robertp

Reputation: 3652

in AS use navigateToURL and its target parameter to set the URL target: http://cookbooks.adobe.com/post_Using_navigateToURL_to_open_a_new_window__send_e_m-18770.html

for instance:

navigateToURL (new URLRequest ("mailto: [email protected]"), "_blank");

In modern browsers it will open in a new tab.

I hope it helps, Rob

Upvotes: 1

Related Questions