# Xml menu DONE :)

**URL:** <https://forum.kirupa.com/t/xml-menu-done/38934>\
**Category:** Uncategorized\
**Created:** [January 1, 2004, 4:03am UTC](https://forum.kirupa.com/t/xml-menu-done/38934 "2004-01-01T04:03:11Z")\
**Posts on this page:** 20\
**Page:** 6

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 28, 2004, 1:43pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/101 "2004-08-28T13:43:25Z")

</div>

Fabulous piece of work hga77.

I would like to bring into the thread the idea of transitions in the external swf files that the xml menu loads in. at the moment it loads in my externals but i cant figure out how to make transitions work. I cant get a fade out animation - it just dissapears.

I will not go into any further details because in my zip i have included a more detailed info text file that explains things in more detail. In there also is a traditional fla/swf file so you can see how i want the transitions to work.

I hope you can find time to look into this problem hga77, if not perhaps someone like scotty might look into it?

Thanks for the thread,

Cheers guys.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 12:27am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/102 "2004-08-29T00:27:18Z")

</div>

Salvador,  
If I understand you correctly, check out this tutorial:  
[http://www.kirupa.com/developer/mx2004/transitions.htm](http://www.kirupa.com/developer/mx2004/transitions.htm)

-Joshua

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 12:56pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/103 "2004-08-29T12:56:45Z")

</div>

sticmann,

Yeah i can do that already - but it doesnt seem possible in the xml version because actionscript can’t be placed on individual buttons which seems to be a major problem with it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 12:16am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/104 "2004-08-30T00:16:11Z")

</div>

if its not possible to do this, it would be nice just to know that and then i can forget it and use normal buttons

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 1:30am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/105 "2004-08-30T01:30:54Z")

</div>

hga77,

How would I code the menu so that the text color of the current menu item the user is on is different from the rest.

Thanx,  
russ

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 7:15pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/106 "2004-08-30T19:15:11Z")

</div>

Hi hga77,

Thanks for the amazing menu!  
If I were to have a really long name for a button, is it possible to have the text wrap to a second or third line, and the button grown in height to accommodate it?

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 8:20pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/107 "2004-08-30T20:20:30Z")

</div>

Marley,  
Find the place in the menu code that tells flash what to do when you push the button and rework it with the code from the transition tutorial. I don’t have it in front of me right now, so I don’t know exactly where it is in the code. It will take a little tweaking, but since it is the same action each time (all that changes is the currMovie value which you already have as the action in the xml), it shouldn’t be too bad.  
-Joshua

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 8:55pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/108 "2004-08-30T20:55:48Z")

</div>

Sticmann, there is so much code here and its very advanced. I looked through it all and can’t see anything that looks like button code - on release, on press type of code that I am used to. Its just too complex for me and needs an expert to look at it really.

I have contacted quite a lot of people who are quite advanced programmers and no one can work it out - i dont think it can be done, but what do I know 🙂

Cheers, if you get a chance and can look at it, that would be great.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 31, 2004, 12:08am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/109 "2004-08-31T00:08:35Z")

</div>

I know hga would be able to do this much quicker and better than I would. I’m sure it can be done and it is a function I will need on the next site I’m building, so if hga doesn’t get to it, I will try.  
-Joshua

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 31, 2004, 12:16am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/110 "2004-08-31T00:16:50Z")

</div>

thanks sticmann, thats very kind of you.

Perhaps hga has retired from the thread - i bet he’s sick of it by now 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 1, 2004, 10:19am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/111 "2004-09-01T10:19:51Z")

</div>

im not retired just yet people 😉

Just very busy…i’ll make sure all is solved within this week 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 1, 2004, 11:11am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/112 "2004-09-01T11:11:36Z")

</div>

thats great hga77 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 1, 2004, 12:35pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/113 "2004-09-01T12:35:41Z")

</div>

**xml menu\_v2\_fading\_loading**

- added code for preloading external files that are loaded in, along with a preloader.

- added fading effect.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 1, 2004, 1:42pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/114 "2004-09-01T13:42:46Z")

</div>

fleuron, That is possible but not simple to do! And it means changing he menu functionality. Sorry mate

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 1, 2004, 4:01pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/115 "2004-09-01T16:01:59Z")

</div>

Thanks for the help hga77. Do you think you can point me in the right direction? I only need to worry about long names under the submenu. I suppose I need to check for text wrap, then depending on how many lines of text there are, change the graphic height of the button? Sounds way simpler then it is, am I missing anything? Would I be able to put this in the code in frame 1 or would it have to go elsewhere? Or do I need to keep your basic concepts and dramatically change the code to make this happen?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 1, 2004, 4:12pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/116 "2004-09-01T16:12:45Z")

</div>

fleuron, i dont know what the maximium text length you need! Cant you just strech the menu horizontally and keep the text on a single line? If not then upload a sample xml file so that I can see how big you need the text to be.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 1, 2004, 4:17pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/117 "2004-09-01T16:17:15Z")

</div>

The problem here is that if you dynamically change the height of various buttons, then the menu animation/motion algorithum has to change. This is because at the moment all buttons have the same height and hence the code can calculate where the items destinations/targets are. Having different buttons with different heights adds a great deal of work…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 1, 2004, 4:22pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/118 "2004-09-01T16:22:33Z")

</div>

With regards to my fade in and fade out problem. fabulous !!!

And an extra bonus of the loaded in swf files not dissapearing when when one of the main buttons that have submenus is pressed

Much respect.

Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 1, 2004, 4:36pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/119 "2004-09-01T16:36:42Z")

</div>

no problem 😉

> And an extra bonus of the loaded in swf files not dissapearing when when one of the main buttons that have submenus is pressed

The reason why that happened was becuase you had an “action” attribute in the xml file for items that did not need an action passed for them.

For example, look at the following xml:

```auto
<menu>
	<item name="Home" action="Home.swf">
	</item>
	<item name="Products & Services" action="link 1">
		<sub name="Production" action="production.swf"/>
		<sub name="Customer focused" action="Customer.swf"/>
		<sub name="Services" action="services.swf"/>
	</item>
<menu>

```

Now if you look at the first item with the name “home”, we also have an action “Home.swf”. This is valid since we actually need to load in a home page.

But if you look at the second item with the name “Products & Services”, we also have an action “link 1”. This is not valid, since the menu will attempt to load in a file that doesnt even have an extenstion (eg. .swf, .jpg, etc). Plus we dont need to load in anything for this item (unless you need to that is, by specifying a correct swf, jpg, etc). So thats why if you click on the second item, you get a blank responce. So, it should be like this:

```auto
]<menu>
	<item name="Home" action="Home.swf">
	</item>
	<item name="Products & Services">
		<sub name="Production" action="production.swf"/>
		<sub name="Customer focused" action="Customer.swf"/>
		<sub name="Services" action="services.swf"/>
	</item>
<menu>

```

🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 1, 2004, 5:36pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/120 "2004-09-01T17:36:05Z")

</div>

makes sense hga77 :beam:

Thank you

[Previous page](https://forum.kirupa.com/t/xml-menu-done/38934.md?page=5)

[Next page](https://forum.kirupa.com/t/xml-menu-done/38934.md?page=7)
