Hi -
Starting to feel like I'm wasting away after 24 hours of Googling something that I'm guessing a flash developer would probably just "know".
Quick background: I downloaded a template (go figure), but seriously - I've used other Flash templates with great success in building simple sites for family. This template is kicking my butt in getting the menus to work and I really need help figuring it out. -NOTE: The Menu never worked - even download; the developer of the template did not include the 'right' script from what I can understand at this point.
The Flash portion is for the header of the site with a dynamic menu for navigating the site.
I have the .fla file, and have identified (with some strain) the 'button' area where the script is located; I have a Separate Action Script file called 'menu.as'; and I have the .xml file, called 'menu.xml'.
The menu.xml file script (simple):
**************************
<menu>
<entry label="HOME" url="http://www.helenajuhasz.com"/>
<entry label="PORTFOLIO" url="/index_sub3.html"/>
<entry label="ABOUT US" url="/index_sub.html"/>
<entry label="SOLUTION" url="/index_sub4.html"/>
<entry label="NEWS" url="/index_sub4.html"/>
<entry label="CONTACT" url="/index_sub2.html"/>
</menu>
**************************
The menu.as file script:
**************************
var feed_xml:XML = new XML();
feed_xml.ignoreWhite = true;
xml_loader._xscale = 0;
feed_xml.load("menu.xml");
feed_xml.onLoad = function(success) {
import mx.xpath.XPathAPI;
_global.menu_array = XPathAPI.selectNodeList(feed_xml.firstChild, "/menu/entry");
for (i=0; i<menu_array.length; i++) {
_global.menu_array[i].label = menu_array[i].attributes.label;
_global.menu_array[i].url = menu_array[i].attributes.url;
}
_root.movie_loading();
};
**************************
The .fla script - where I believe I'm missing the necessary pieces:
**************************
on (release) {
if (this._parent.sel != this)
{
gotoAndStop ("s3");
this._parent.rel();
this._parent.sel = this;
getURL("","_blank", "GET")
};
**************************
I contacted the company that hosted the template, and their suggestion was to just type in the URL like this:
getURL("http://www.mysite.com","_blank","GET")
While - yes this is functional - it destroys the purpose of a menu, as it limits all the buttons to one link, rather than dynamic links that are derived from the .xml file.
I've tinkered for days, but without true understanding of what I'm doing (self-taught - so I get some stuff, but am missing huge amounts of knowledge still), I don't want to just dive in and tear through the code.
Can you help at all?
Thanks!!!
Jen



), I don't want to just dive in and tear through the code.

first, when posting code, wrap it in code tags ( [ code] stuff here [ /code] ) makes it easier to read. Second, when code is all over an fla file, we probably need to see the fla file. You can zip it and add it to your post if it is too big to post by itself.

Bookmarks