LostInBeta, or Senocular need some help

Ok, I am using your submenu system that has your names in the as code, so I fig ure i shoulda ask you. I implmented the menu on a new site I am designing, the only problem is the URL will not work, and how would I make them load into a iframe? The iframe name is set to main.

In the XML file would I do:

<ITEM NAME=“Leagues”>
<SUBITEM NAME=“CAL-IM” URL=“link.html” TARGET=“main” />
</ITEM>

Any help from any1 would be great right now. To see the culprut that I am talking about check, www.evilattitude.com/vexed and you will see the menu. Thxs.

lol great song!

There are two instance of this line in the script…

[AS]myButton.onRelease = function() {
// getURL(this.myUrl);
trace(this.buttonLabel.text+" : "+this.myURL);
};[/AS]

The getURL was commented out (via //) for testing purposes. You can instead uncomment the getURL and write it like this…
[AS]getURL(this.myUrl, “iframeName”);[/AS]
Where iframeName is of course the name of your iframe.

Be sure to update both instances of the code in the script.

thanks beta, I was a lil tired when I was looking at the code. One more, now that the iframe works, there are about 2-3 links I need to load in a _blank window. I kno I am being a pain in the arse, but this would be done, beats me.

Also maybe you could anwser my other post on the board about a menu question for the music.

http://www.kirupaforum.com/forums/showthread.php?s=&threadid=23243

Thanks again.

I didn’t test it but try this…

There are two instances of this line in the script (both are slighly different due to being button and submenu button, but you get the point)…
[AS]myButton.myUrl = this.menuItem*.attributes.URL;[/AS]

What you need to do is right under that line add this line…
[AS]myButton.myTarget = this.menuItem*.attributes.TARGET;[/AS]

So for the main buttons you will have…
[AS]myButton.myUrl = menuItem*.attributes.URL;
myButton.myTarget = menuItem*.attributes.TARGET;[/AS]

And for the subMenu buttons you will have
[AS]mySubButton.myUrl = this.subMenuItem[j].attributes.URL;
mySubButton.myTarget = this.subMenuItem[j].attributes.TARGET;[/AS]

Now remember those getURLS? Change them to look like this…
[AS]getURL(this.myUrl, this.myTarget);[/AS]

Alright so we got the AS fixed. Now lets edit the XML file to incorporate this. You had it right the first time you posted the XML code (although you didn’t use the PHP vbCode tags so it didn’t show)

Just edit your XML tags to have a TARGET attribute…

<ITEM NAME="Leagues">
<SUBITEM NAME="CAL-IM" URL="link.html" TARGET="main" />
</ITEM>

Then you change the target to _blank to open in a new window.

Note: I did NOT test this, so I don’t know if it will work, but I think it will.

wow, we must think alike right b4 I check this I was adding target to the as code…weird?

Ok for the main buttons is it?

[AS]
myButton.myUrl = this.menuItem*.attributes.URL;
myButton.myTarget = this.menuItem*.attributes.TARGET;[/AS]

or

[AS]
myButton.myUrl = menuItem*.attributes.URL;
myButton.myTarget = menuItem*.attributes.TARGET;[/AS]

Oh…lol. Sorry. It will work either way, but for good coding practice (which I apparently did not use) you should use this.menuItem* :wink:

thanks, lol ya I was like hmmmmm

www.evilattitude.com/vexed

Under the leagues submenu, it loads in a seperate window. Thanks again.

Cool, glad to see it worked.