Old 11-02-2009, 06:39 PM   #1 (permalink)
Junior Member
 
Join Date: Aug 2009
Posts: 9
Default links not working....no idea why.....

the two files on line
Link1

Link2

____________________-


the xml file is linked...i changed the xml file name within the As file.

however there is a line in the help file that i have no idea what I'm supposed to do with it


The Help file mentions this:


Quote:
First define the onItemClick function and then pass the data
i have no idea what that means…i did modify the link to the xml file…..outside of that i touched nothing within the coding of the flash.

Quote:
the first frame:

menu_mc.onItemClick = function(node:XMLNode, level:Number) {
res_txt.text = "Label> "+node.attributes.label+" | Menu item level> "+level;
};
// LOAD XML AND GENERATE MENU
var xob:XML = new XML();
xob.ignoreWhite = true;
xob.onLoad = function(s) {
if (!s) {
trace("Error loading xml file !");
return;
}
menu_mc.data = this.firstChild;
};
xob.load("accordion_menu.xml");
______________

Quote:
the xml file

<menu>
<item selected="true" label="Home" url="index.html" target="_self" />
<item label="LOW DESIRE" >
<subitem label="Low Desire" url="internal.com" target="_self" />
<subitem label="FAQ" url="internal.com" target="_self" />
</item>

<item label="PAINFUL" >
<subitem label="Painful Sex" url="internal.html" target="_self" />
<subitem label="Dyspareunia" url="internal.html" target="_self" />
<subitem label="Vaginismus" url="internal.html" target="_self" />
<subitem label="Vulvodynia" url="internal.html" target="_self" />
<subitem label="FAQ" url="internal.com" target="_self" />
</item>

<item label="ORGASM" >
<subitem label="Orgasim" url="internal.html" target="_self" />
<subitem label="New" url="internal.html" target="_self" />
<subitem label="Tips to Try" url="internal.html" target="_self" />
<subitem label="FAQ" url="internal.html" target="_self" />
</item>

<item label="AROUSAL DISORDERS" >
<subitem label="Arousal Disorders" url="internal.html" target="_self" />
<subitem label="Persistant Arousal" url="internal.html" target="_self" />
<subitem label="FAQ" url="internal.html" target="_self" />
</item>

<item label="HORMONE THERAPY" >
<subitem label="Female Hormones" url="internal.html" target="_self" />
<subitem label="FAQ Hormones" url="internal.html" target="_self" />
</item>

<item label="SEX THERAPY" url="index.html" target="_self" />

</menu>

i have went through the forum and can't seem to find a solution that works....
pelsar is offline   Reply With Quote
Old 11-02-2009, 06:42 PM   #2 (permalink)
OXYLUS Staff
 
Razvan's Avatar
 
Join Date: May 2008
Posts: 1,266
Send a message via Skype™ to Razvan
Default

Hi mate, I can help you on this one.

Instead of this
menu_mc.onItemClick = function(node:XMLNode, level:Number) {
res_txt.text = "Label> "+node.attributes.label+" | Menu item level> "+level;
};

please write this:

menu_mc.onItemClick = function(node:XMLNode, level:Number) {
getURL(node.attributes.url, node.attributes.target);
};

save and compile

Cheers !
__________________
- Custom work and support at: razvan@oxylus.ro
- Search before posting.
- POST A SAMPLE LINK of the problem.
- DO NOT post links to the source files!
- Forum comes first in solving your problems but if you need asap support post it on the forum and e-mail me with the link.
- Solutions within 48h, sometimes it could take longer.
- If your thread has not received an answer for a long time please renew it, with a new post, in friendly manner.
- BE POLITE !
Razvan is offline   Reply With Quote
Old 11-04-2009, 08:43 PM   #3 (permalink)
Junior Member
 
Join Date: Aug 2009
Posts: 9
Default not so fast....close but no cigar

i did the change...and now get this:

so now the top level buttons are links....even when i dont want them to be "links".

you notice that on mouse over on the menus on the left (only the home is a link), they are all now links and a click automatically goes to a blank page while it opens up the sub menu....(the links on the submenus now work which is great.

so how do I eliminate the top level links to those buttons that are just suppose to open up the accordian?

the xml has nothing for those upper links:

Quote:
<menu>
<item label="Home" url="index.html" target="_self" />
<item label="LOW DESIRE" >
<subitem label="Low Desire" url="internal.html" target="_self" />
<subitem label="FAQ" url="internal.html" target="_self" />
</item>

<item label="PAINFUL" >
<subitem label="Painful Sex" url="internal.html" target="_self" />
<subitem label="Dyspareunia" url="internal.html" target="_self" />
<subitem label="Vaginismus" url="internal.html" target="_self" />
<subitem label="Vulvodynia" url="internal.html" target="_self" />
<subitem label="FAQ" url="internal.html" target="_self" />
</item>

<item label="ORGASM" >
<subitem label="Orgasim" url="internal.html" target="_self" />
<subitem label="New" url="internal.html" target="_self" />
<subitem label="Tips to Try" url="internal.html" target="_self" />
<subitem label="FAQ" url="internal.html" target="_self" />
</item>

<item label="AROUSAL DISORDERS" >
<subitem label="Arousal Disorders" url="internal.html" target="_self" />
<subitem label="Persistant Arousal" url="internal.html" target="_self" />
<subitem label="FAQ" url="internal.html" target="_self" />
</item>

<item label="HORMONE THERAPY" >
<subitem label="Female Hormones" url="internal.html" target="_self" />
<subitem label="FAQ Hormones" url="internal.html" target="_self" />
</item>

<item label="SEX THERAPY" url="index.html" target="_self" />

</menu>

i appreciate the help...(btw i must have bought 10 of your flash programs so far....)

Last edited by pelsar; 11-04-2009 at 08:46 PM.
pelsar is offline   Reply With Quote
Old 11-05-2009, 07:41 AM   #4 (permalink)
OYXLUSFlash.com Staff Member
 
Adrian's Avatar
 
Join Date: May 2008
Posts: 1,981
Send a message via Yahoo to Adrian Send a message via Skype™ to Adrian
Default

Code:
menu_mc.onItemClick = function(node:XMLNode, level:Number) {
if(level == 2)
      getURL(node.attributes.url, node.attributes.target);
};
Adrian is offline   Reply With Quote
Old 11-06-2009, 09:29 AM   #5 (permalink)
Junior Member
 
Join Date: Aug 2009
Posts: 9
Default just to confirm...

the submenu links are now working

the top levels are not...if i understand correctly its an either or situation.

Either the top levels work and not the sub......or the subs work and not the top......the present situation is the better solution.

thanks

-next i try to tackle keeping the sub menus open when on that specific page-i noticed a thread already exists about that subject.
pelsar is offline   Reply With Quote
Old 01-28-2010, 08:30 PM   #6 (permalink)
Junior Member
 
Join Date: Jan 2010
Posts: 1
Default here is the solution

menu_mc.onItemClick = function(node:XMLNode, level:Number) {

if (node.attributes.url)
{
getURL(node.attributes.url, node.attributes.target);
}
bakirci is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:32 AM.