A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Another XML/Hyperlink Question

  1. #1
    Senior Member
    Join Date
    Jul 2003

    Another XML/Hyperlink Question


    I download a navigation bar that will allow me to update all the items in the dropdown through XML but I can't figure out how to make one of the dropdowns link to a web page. Here is the code:

    	<item name="File is a big label">
    		<item name="New">
    			<item name="Window" />
    			<sep />
    			<item name="Message" />
    			<item name="Post" />
    			<item name="Contact" />
    			<item name="Internet Call" />
    Lets just say I would like to linke the word "Window" to a relative URL and open in the same window. How would that code be written?

  2. #2
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    That would be handled on the frontend (the flash) using whatever attribute or node you decide. It's either coded manually or part of an onClick handler if using a component.

  3. #3
    Senior Member
    Join Date
    Jul 2003
    Rats, now I'm really confused. I am using a component and I did not see any onClick handler in the components settings (sorry, I'm a bit of a neophyte when it comes to this). I found the component here:


    Type "menu" in the search and it will be about the third one down (it's free) called Hirearcal Menu 1.6. I tried contacting the person who designed it but response is very slow. Perhaps you could tell me if it is simply misssing something and if there is something I can do about it.

    The broader problem: The reason I selected this menu was because it works with XML (potentually I can have a client change add and subtract menu items on their own) and it works in layers, and it's free (although one might question the amount of time I've spent researching and trying to get it to work). So basically what I'm looking for is a menu that has flyouts, uses xml and works in divs. If you know of something that fits that bill, perhaps that would be the shorter route to my quest.

  4. #4
    Senior Member
    Join Date
    Jul 2003
    I got back in touch with the programmer. As a means to close out this discussion here is the code that goes into frame one (as you mentioned):

    // This anonymous function will be invoked as soon as an item of the hierarchical menu has been clicked

    my_hm.onReleaseItem = function(item) {

    // We'll check if the the attribute 'action' is set to 'getURL'

    if(item.data.action == "getURL") {

    // If the above condition is true, then we will "get" the url specified in the 'url' attribute in a new window

    getURL( item.data.url , "_blank" );



    Here is the XML that it works with:

    <hiermenu method="1">
    <item name="Links" sub="1" />

    <item name="Inspiration" sub="1" />
    <item name="Resources" sub="1" />
    <item name="Blogs" sub="1" />
    <sep />
    <item name="hamza.fawzi (me!)" action="getURL" url="http://www22.brinkster.com/hamzaf" />

    <item name="Bit-101" action="getURL" url="http://www.bit-101.com" />
    <item name="Levitated" action="getURL" url="http://www.levitated.net" />
    <item name="Flight 404" action="getURL" url="http://www.flight404.com" />
    <item name="Yugop" action="getURL" url="http://www.yugop.com" />
    <item name="Illogicz" action="getURL" url="http://www.illogicz.com" />

    <item name="Flashkit" action="getURL" url="http://www.flashkit.com" />
    <item name="Ultrashock" action="getURL" url="http://www.ultrashock.com" />
    <item name="Were-Here" action="getURL" url="http://www.were-here.com" />
    <item name="Actionscript.org" action="getURL" url="http://www.actionscript.org" />
    <item name="Actionscript Toolbox" action="getURL" url="http://www.actionscript-toolbox.com" />

    <item name="Andre-michelle" action="getURL" url="http://www.andre-michelle.com" />
    <item name="Peter Joel" action="getURL" url="http://www.peterjoel.com" />
    <item name="onrelease" action="getURL" url="http://www.onrelease.org" />


    It is different from the previous XML in several ways. If anyone else would like to use this, it is available as a component from Hamza's website:


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