all groups > flash actionscript > march 2008 >
You're in the

flash actionscript

group:

Help with simple xml menu


Help with simple xml menu Presto-X
12/5/2006 5:56:45 PM
flash actionscript:
Hello guys,

I?m new to xml in flash so bare with me here. I?m using the XML Menu that came
bundle with Flash 8. I want the menu to go to frames in my movie not web links.
I tried changing out the code getURL(this.data.href, "_blank"); with
gotoAndPlay( ); from the XmlMenu.as file but it did not like that at all. I?m
guessing its something really easy that I?m missing.

Any help would be great thanks guys.
Re: Help with simple xml menu Bob Robertson
12/5/2006 6:07:19 PM
I'm likewise new to XML, but I'll try to help with principles until someone better comes along.
Re: Help with simple xml menu Presto-X
12/5/2006 6:39:17 PM
well right now gotoAndPlay( ); is located in the XmlMenu.as file, I'm not sure
but I'm guessing I'm going to need to add some code inside the gotoAndPaly
action. I'm not sure if that is what "this.data" does or not lol I'm a newb
Re: Help with simple xml menu Bob Robertson
12/5/2006 7:56:20 PM
After looking through the code, it appears that the Flash 8 demo is designed
simply to call up a web page. What you're after is going to require some
tinkering. The onRelease handlers for the relevant movieClips are defined in
initMenu; you'll have to modify that loop to change the getURL to a
gotoAndPlay(). The XML document only provides information that was relevant to
the menu system's intended purpose. Probably, you want to include a tag saying
targetFrame=xx, and make the onRelease handler say something like
_root.gotoAndPlay(targetFrame). I don't know how you'd get the info from XML to
a useful state in your movie.
Re: Help with simple xml menu Presto-X
12/5/2006 8:21:18 PM
ahhh... yes this gives me something to think about, do I want to sink a lot of
time in trying to find out how to make this work or find another menu system
for my project. All I really need is a simple menu " Home | Services |
Portfolio | Information" each one of these will have a subcategory with 4 - 8
links going to frames in my project.
Re: Help with simple xml menu P_Jim
12/5/2006 9:06:45 PM
Presto-X,
It would seem that AS is requesting a browser action (relating to href) based
on your XML data and not a GoToFrame as Bob Robertson stated. This has been
problematic for me as well. Someone told me there was a complete forum within
Adobe that covers Flash interaction with XML. I remember starting a topic along
those lines which has been taken down due to a space problem here... I have
even been looking for books on understanding the structure, limitations, and
interaction between XML and AS but none seem to exist just cookbooks. I would
assume that a comprehensive book like that would have to be about 2000 pages.
If you guys hear of any please let me know.
RE: Help with simple xml menu Biz_jetter
3/20/2008 10:24:42 AM
I have recently just finished a project with and this is really a simple change.
Start by changing your xml attribute "href" to something like "goTo".
You will need to change all the references to your xml attributes to replace the "href" with "goTo".
The next step, within the linkMC onRelease function just change the getURL function to gotoAndStop(this.date.goTo);

Hope this helps anyone wanting to use this menu system.

From http://developmentnow.com/g/69_2006_12_0_0_862834/Help-with-simple-xml-menu.htm

Posted via DevelopmentNow.com Groups
AddThis Social Bookmark Button