Search  

ADDING TARGET TO XML MENU

HomeForumsHelp NeededAdding Target to xml menu
Default-profile zer0k_03
1 post
Bought between 1 and 9 items

Hi, I recently bought the Powerful XML menu 7 (http://www.flashden.net/item/powerful-menu-xml-7/16413) And I wanted to add a target to the links,

i.e. be able to say in the xml file:

item name = “about1” color = “ffffff” link = “main.html” target = “mainFrame”

or something similar so that the link will target an iframe.

my problem is, i’m not an expert at AS coding. my guess is that I need to add a line of code or two to the action script. I found this line that calls the “link” from the xml file from the mcMenu.

// Sets the link

itemList[i].link = xmlItems[i].attributes.link

and from mcButton

// On press goes to the link setted in the xml

area.onPress=function(){

getURL(link)
current=true
_parent._parent.current.current=false
_parent._parent.current=item
_parent._parent.current.current=true
_parent._parent.changeBarColor(_parent._parent.current.c, _parent._parent.s_bar)

}

any idea how to add a “target”?

Posted 3 months ago
51614 LGLab
154 posts
Exclusive author Referred at least one person Sold between 1 000 and 5 000 dollars Bought between 10 and 49 items

Hi,

Do you mean the target method for opening a new widow?

If so, you should use _self, _blank etc as follow:

item name = “about1” color = “ffffff” link = “main.html” target = “_top”

AS:

itemList[i].target = xmlItems[i].attributes.target;

area.onPress=function(){

getURL(link, target)

current=true _parent._parent.current.current=false _parent._parent.current=item _parent._parent.current.current=true _parent._parent.changeBarColor(_parent._parent.current.c, _parent._parent.s_bar)

}

Hope this helps…BTW, you should use the internal flash help in the software, highlight the term you want to know about e.g. getURL, and click on the question mark icon on the top right hand side of the actionscript panel…

Note: Don’t use quotation marks in your code if you are using variables as parameters

Posted 3 months ago