1 Reply Latest reply on Jul 10, 2009 8:04 AM by SalvationD

    Help with Flash & XML URL in Menu?

    SalvationD Level 1

      The XML looks like



           <menu_item name="Contact Me">
                <img filename="contact.swf" title="Contact" thumbnail="sample_th.jpg" or_w="500" or_h="550"><![CDATA[This is a <font color='#999999'>TEST</font> get use to it.]]></img>


      and the actionscript in flash looks like :


      //Load the images in XML file
      //Create arrays to receive values
      image_filename=new Array();
      image_thumbnail=new Array();
      image_description=new Array();
      image_category = new Array();
      image_or_w=new Array();
      image_or_h=new Array();
      image_title=new Array();
      filepath="items/";//Place here the relative path directory to your images
      var xml_file = new XML();
      xml_file.ignoreWhite = true;
      xml_file.onLoad = function()
           var categories = xml_file.firstChild.childNodes;
           k=0;//Variable to control categories
           l=0;//Variable to control first position of each category
           for (var j=0; j<categories.length; j++)
           {//Each category
                var nodes:Array=categories[j].childNodes;
                if (j==0){_global.category=categories[j].attributes.name;}
                for(var i=0;i<nodes.length;i++)//Retrieve picture information
                     k+=1;//Increase k value



      ------ Other code OMITTED (for space) ------


                mov_top_menu["mov_button"+j].but_category.onRelease = function() //Click button event
                {//User clicks button
                     if (_global.category!=this._parent.txt_cat && this._parent._parent._parent._currentframe==5)
                          position=this._parent.f_pos;//Change image position to the first of selected set
                          _global.category=this._parent.txt_cat;//Change selected category
                          image.alphaTo(0,0.6,"linear",0,function(){this._parent.gotoAndPlay(3)});//Recreate thumbs




      I'm wanting to make 1 or 2 menu items be a link, 1 to the forum part of the website (~/forum/) and the other part to (~/family/)


      I know I need to add something in the actionscript.. just not sure HOW.. since this is all an array.. would I need to just add..


      image_URL=new Array(); // in arrays







      or what?  Seems so complicated to just add a single link.. argh.. help?