Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Submenu In Flash...


Help needed again...

I want to make this thing work... its a submenu issue... jus chk this link : http://www.cactimedia.com/infiniti/

in the ABOUT and SERVICES section... there are submenus.. i want to have links for the submenu bu when i make them buttons it doesnt work...
anyones got a ez solution for makin this work..plz...

MUHSIN




Ultrashock Forums > Flash > Flash Professional
Posted on: 2005-07-23


View Complete Forum Thread with Replies

Sponsored Links:

Buttons To Create Submenu - Must Animate W/AS - Submenu Must Change
Hi there.

I am trying to create a movie which has several different buttons (main menu). When each of these buttons is clicked, I'd like to have a movie clip move (lets call it "shirts") up to a certain point from the bottom of the screen. This movie clip "shirts" will load a remote swf (lets call it "Jim") which must be defined by the user's main menu click of the Jim button.

All of the above is easy enough, but when a user clicks a new option from the main menu (lets use "Dean"), I'd like for the existing movieclip "shirts" to move down off of the screen, then load up a different swf "Dean", then move back up on the screen.

Thanks in advance.

View Replies !    View Related
Flash Submenu
i've got a problematic submenu here (at least, it's problematic for stupid ol me).
I've got a menu in flash, and clicking on one link "menu items" is supposed to bring up a submenu. What I did was make the submenu a movie clip ("submenu"). Through the Library I chose the Export with ActionScript option for it. Then, for the link on the main menu ("menu items"), I put this for Actions:

on (release) {
_root.attachMovie(submenu,submenu,100);
_root.submenu._x = 11.3;
_root.submenu._y = 180;
_root.submenu.gotoAndPlay("startMovie");
}

Didn't work. So I tried putting the movie clip in a separate layer that stays there throughout the timeline. Then, on the first frame of the whole movie, I put an action:

_root.submenu._visible = false;

and on "menu items":

on (release){
_root.submenu._visible = true;
}

No good. (well, i knew it was a lame try...) What happened instead was that the submenu was just visible all the time.

So then I tried playing around with _alpha.

But no matter what I do it doesn't work.

I figured one definite way out would be to just make a duplicate of the current frame, but with the submenu turned visible. But I'd rather not do that and do it using ActionScript instead, coz I've got a trillion different frames.

What's the most normal approach used for submenus, and what am I doing wrong in my code?

View Replies !    View Related
Flash 6 | Submenu's Going Away...?
Hey, I've been working at this and i can't figure it out...

Go to:
http://polixo.home.mchsi.com/lower-bg.swf
and roll over the navigation button, notice how the submenu shows up, how do i get it to stay up so people can select things from that menu?

Thanks for the halp

(the .fla is at http://polixo.home.mchsi.com/lower-bg.fla )

View Replies !    View Related
Flash Submenu Please Help
Hey guys i'm new but needed a hand with this **** flash i've been struggling on for a week now. Take a look over at http://nrpromotions.com/index2/4247-4b.swf This is a section of my promotional company page flash. It gets embedded into a background template flash to complete the page effect. The problem i'm having right now is that the 9 products featured in that block need to change when different menu buttons are hit. Unfortunately I don't know how to do that. The menu (number bar on the right) and the 9 products in that block are 2 different objects ("products" and "menu" to make it easier.) I have attempted to apply actionscript to the buttons on the menu bar such as button #2 was:
on (release) {
gotoAndStop("scene 1", "page2");
}
Whereas "page 2" represents the correct frame for the products within the "products" object.
This didn't work at all, nor did go to and get frame # go to and stop frame # and now i'm about to start pulling my hair out if i can't get this figured out!
There is only one scene in this movie but these two objects are having the hardest time linking...please help? Basically what i need to do is link the button 1 on "menu" to frame "45" of "products" and button 2 on "menu" to frame "46" of "products" and so on.

Hit me on ICQ/Yahoo or any other messenger if you can help someone who is not as well versed in Flash as she might be lol
Also I have no problem providing this fla file to someone who could help me!
Thanks guys! Angel

View Replies !    View Related
Flash And DMX Submenu
Please help.
www.rivercityflats.com/gallery-test.html.
As you can see, the submenu on the left is behind the Flash animation on the right. How do I make the submenu on top of the Flash animation. Thank you very much in advance.

MasterJ

View Replies !    View Related
Flash And DMX Submenu
Please help.
www.rivercityflats.com/gallery-test.html.
As you can see, the submenu on the left is behind the Flash animation on the right. How do I make the submenu on top of the Flash animation. Thank you very much in advance.

MasterJ

View Replies !    View Related
Flash Menubar With Submenu
i have created a flash menubar with submenu items. on "over" of mainmenu button, my submenu will load. however once my mousecursor leaves the mainmenu item, the submenu will unload. i cannot click on the submenu item. what can i do to keep the submenu on screen when i move my mouse from mainmenu to submenu?

View Replies !    View Related
Flash Submenu Help With Rollovers
i need help getting the submenu's button to rollover and make the text turn black. for some reason everything else works except for that. help would be appreciated thanks.

here is a link to get the fla file

http://jegg.org/jegg/alge12/images/f...nsreworked.fla

btw i am using flash mx

View Replies !    View Related
How To Build A Submenu In Flash
Hi:

I hope I'm posting this in the correct section.

Can anyone give me a link to a tutorial that explains how to make a submenu in Flash MX. You mouseover a button and a submenu with more buttons appears.

I have looked through the tutorials section but can't seem to find any.

Thanks,

SP

View Replies !    View Related
XML Menu With Submenu (Flash 8 Pro)
So far I have the first part of this menu working (the "main links"/"top links") but the second part is a submenu that pulls from the child nodes of the main links.

What it's suppose to do is: When you roll over the "main links"/"top links" it opens the "submenu" for each of the "main links" appear at the bottom and when you roll out it makes it go away.
...but I can only get the first child nodes of the first submenu to work, and it automatically comes up when it is loaded...the roll over and roll out don't work.

Here's my XML:
Code:

<?xml version="1.0" encoding="iso-8859-1"?>
<menu>
   <page title="What We Do" linkurl="http://www.mackdesignsonline.com">
      <link title="Bikes" linkurl="#"/>
      <link title="Parts" linkurl="#"/>
   </page>
   <page title="The Shop" linkurl="#"/>
   <page title="Our Gallery" linkurl="#"/>
   <page title="Friends" linkurl="http://www.mackdesignsonline.com">
      <link title="FBikes" linkurl="#"/>
      <link title="FParts" linkurl="#"/>
      <link title="FBikes" linkurl="#"/>
   </page>
   <page title="Specials" linkurl="http://www.mackdesignsonline.com"/>
   <page title="Contact" linkurl="#"/>   
</menu>

Here's my ActionScript:
Code:

var titles:Array = new Array();
var linkurls:Array = new Array()

var currentOpened:Number;
var itemSpacing = 112;
var itemCount = 0;
var itemCountblack = 0;


function GenerateMenu(xmlTemplate) {
   var startNodes = xmlTemplate.firstChild;
   var nodes = startNodes.childNodes;
   
   var total = nodes.length;
   for(var i=0; i<total; i++) {
      var titles = nodes[i].attributes.title;
      
      var CurrentItem = nodes[i];
      
      //Buttons
      var currentThumbMenu = menu_holder.attachMovie("Itembutton","item"+itemCount, itemCount);
      currentThumbMenu._x = itemCount * itemSpacing;
      itemCount++;
      currentThumbMenu.linkurl = CurrentItem.attributes.linkurl;
      currentThumbMenu.buttonText.titleshere.text = titles;
      currentThumbMenu.name.text = CurrentItem.attributes.name;
      currentThumbMenu.onRelease = openThis;
      currentThumbMenu.onRollOver = ShowSub;
      currentThumbMenu.onRollOut = HideSub;
   }
}

//SubMenu
function ShowSub(xmlTemplate){
      menu_holderblack._visible = true;
      var startSubNodes = xmlTemplate.firstChild.firstChild;
      var Subnodes = startSubNodes.childNodes;
   
      var Subtotal = Subnodes.length;
      for(var k=0; k<Subtotal; k++) {
         var CurrentItemblack = Subnodes[k];
         var currentThumbMenublack = menu_holderblack.attachMovie("Itembuttonblack","itemblack"+itemCountblack, itemCountblack);
         currentThumbMenublack._x = itemCountblack * 100;
         itemCountblack++;
         var titlessub = CurrentItemblack.attributes.title;
         currentThumbMenublack.buttonTextblack.titleshereblack.text = titlessub;
      }
}

function HideSub(){
   menu_holderblack._visible = false;
}
menu_holderblack._visible = false;


//Buttons Actions
function openThis() {
   getURL(this.linkurl);

}

var xmlTemplate = new XML();
xmlTemplate.ignoreWhite = true;
xmlTemplate.onLoad = function(success){
   if (success) GenerateMenu(this);
   if (success) ShowSub(this);
   else trace("Error");
}

xmlTemplate.load("nav_x.xml");

Here's a link to download a zip of the fla:
http://mackdesignsonline.com/xxx/Help.zip

View Replies !    View Related
Flash Menu With Submenu's
I'm trying to find a vertical flash menu that has sub-menu's, or even sub-sub-menu's. I have come across www.ghostwire.com, but the cost the component 3 is a little pricey & dont really want to pay that much for a menu that I may only use once.

Is anyone able to help?

Cheers,

View Replies !    View Related
Dropdown Submenu Over A Flash Movie?
Hello all,

With the help of Fireworks, I have a JavaScript navigation bar across the top of my site in one table and a FlashMX movie (.swf file) directly below it in another table. The nav bar has dropdown menus on mouse over and these are the problem...

I want the dropdown submenus to drop OVER my .swf movie and they're consistently dropping down behind the Flash movie thereby hiding the menu choices.

Is it at all possible to force my submenus to drop down over the top of my FlashMX movie? How would I accomplish this little miracle? Modification of the JavaScript or the Flash movie?

TIA!!

View Replies !    View Related
XML/Flash Menu - Placement Of Submenu
Hey everyone,
I've been using sen's flash/xml drop-down menu tutorial, and I have been able to create the following for (mt): http://www.kirupa.com/temp/mt_menu3.html

If you rollover the first item, you will notice that the submenu loads to the right side. What I would like to have is something similar to the following attached image. Also, the code I am using can be found in the attached FLA.

I know how to make the menu appear directly below the parent node, but the problem is that I am unable to shift the menu items down so that the menu items don't overlap over the existing menu items. You can see an example of what I am trying to do in the attached image.

Does anybody have any insight on how to accomplish that. I tried finding the name of each movie clip and shifting them downward, but it seems that none of the movie clip names correlate to the actual menu item - therefore, I am unable to shift them downwards in order to make a space for them.

Thanks!
Kirupa

View Replies !    View Related
Fireworks Submenu Over The Flash Movie
I am developing a site using Dreamweaver MX 2004 and Fireworks MX 2004. I have a menu bar with drop down submenu's - all made using Fireworks.

In the layout of the pages right under the menu bar, I have a flash movie (swf) which diplays a few images with a next and previous buttons. I made this Flash movie after reading/playing with/using the "Photo Gallery using XML and Flash" tutorial found here at KIRUPA.COM.

Everything works well as far as displaying images and captions.

However, the flash movie seems to be displayed on top of the Javascript layers (from the Fireworks submenus). So, when the image is displayed inside the flash movie, if i try to use the menu, the drop down submenu items are hidden behind the flash movie!

Could someone point me to what I am doing incorrectly?
How do I make the menu system to be on top of all the other items - such as the flash movie?

Thanks in advance.

View Replies !    View Related
Fireworks Submenu Over The Flash Movie
I am developing a site using Dreamweaver MX 2004 and Fireworks MX 2004. I have a menu bar with drop down submenu's - all made using Fireworks.

In the layout of the pages right under the menu bar, I have a flash movie (swf) which diplays a few images with a next and previous buttons. I made this Flash movie after reading/playing with/using the "Photo Gallery using XML and Flash" tutorial found here at KIRUPA.COM.

Everything works well as far as displaying images and captions.

However, the flash movie seems to be displayed on top of the Javascript layers (from the Fireworks submenus). So, when the image is displayed inside the flash movie, if i try to use the menu, the drop down submenu items are hidden behind the flash movie!

Could someone point me to what I am doing incorrectly?
How do I make the menu system to be on top of all the other items - such as the flash movie?

Thanks in advance.

View Replies !    View Related
Flash Menu Fails To Hide Submenu
Hello All -

I have Flash 5. I have built a file with 8 NAV buttons. Each NAV button will have the abaility to show a submenu, and each submenu will have 3-7 buttons used to launch a URL.

(** right now all of the submens are the same - I'll change these when I get the code right)

I can get the main NAVs to show the submenu ok, and I have found a way to make each submenu show up highlight too. BUT ----

The submenus fail to hide when you mouse off them. What am I missing?

In my submenu I have frame one called 'hide' and frame two called - show; this is where the buttons/submenu is.

I can email the FLA if needed.

Thanks

RB

View Replies !    View Related
Flash Menu/submenu And Html Targeting
Here's what I'm trying to do. I have a menu I'm building in flash, and each main menu item has a submenu bar underneath. What I want to do is just include the swf file in my html on different pages, but let's say if I go to the "about" section, how do I get my flash menu to be the submenu of the "about" section instead of reloading and the wrong submenu is revealed.

Hopefully that makes sense. What I want to do is target labels inside of flash from my html, or is there an easier way?

I'm in Flash MX 2004.

Thanks!

View Replies !    View Related
Flash/XML Menu/submenu Optimization Question
Hi all, first of all, I'm not sure if this is an ActionScript 2.0 or just regular ActionScript question, so I apologize in advance if I'm posting in the wrong forum.

Another couple of things that I should mention is that what I want to do is to be able to just update my XML file, so that I'll never have to touch my Flash file again. Also, I HAVE figured out a solution to my problem, but the solution requires me creating 3 different XML files, which I wasn't sure was optimal, or if that's even the "right" way of doing it. So I basically have 2 questions that are semi-related, and I'll separate them with a dashed line down below.

Okay, so I've taken a look at all the XML tutorials from this site, and I'm having a bit of problem figuring something out. I have a Flash file, which has a menu for my photo gallery: family, bw, vacations. In each of my photo gallery, I have a submenu for each photo. So, if "family" has 17 photos that I need to show, then I have a submenu of 17 items marked "01 02 03" etc. I hope you're with me so far.

So, in my XML file, this is what I THOUGHT I should do:

<family>
<id>
<number>01</number>
<title>blablabla</title>
<date>some date</date>
<info>some information</info>

<number>02</number>
<title>blablabla</title>
<date>some date</date>
<info>some information</info>

<number>03</number>
<title>blablabla</title>
<date>some date</date>
<info>some information</info>
</id>
</family>

<bw>
<id>
<number>01</number>
<title>blablabla</title>
<date>some date</date>
<info>some information</info>

<number>02</number>
<title>blablabla</title>
<date>some date</date>
<info>some information</info>
</id>
</bw>

<vacations>
<id>
<number>01</number>
<title>blablabla</title>
<date>some date</date>
<info>some information</info>

<number>02</number>
<title>blablabla</title>
<date>some date</date>
<info>some information</info>

<number>03</number>
<title>blablabla</title>
<date>some date</date>
<info>some information</info>

<number>04</number>
<title>blablabla</title>
<date>some date</date>
<info>some information</info>
</id>
</vacations>

Okay, so here's what I want to do:
When I press any of the buttons ("family", "bw", "vacations"), I want to be able to know how many total entries there are. In this case, in "family", there are 3. So, how can I get this "3" number through my Flash file? If I update it and there are then 20, I want to be able to get this number without having to touch the Flash file. What can I do to do this? I thought maybe by putting "id" tags in there, it might help for some reason. But maybe that's just redundant. Either way, I can't figure out how to do this.

-----------------------------------------------------------------------
I mentioned up above that I did figure out how to do this by separating each menu into its own XML file. This works fine, but I do have a minor question. Here's what I have written on the first frame of my Flash file:

familyContent = new XML();
familyContent.ignoreWhite = true;
familyContent.load("family.xml");
familyContent.onLoad = function(success) {
if(success) {
trace ("family loaded!");
}
}

bwContent = new XML();
bwContent.ignoreWhite = true;
bwContent.load("bw.xml");
bwContent.onLoad = function(success) {
if(success) {
trace ("bw loaded!");
}
}

vacationsContent = new XML();
vacationsContent.ignoreWhite = true;
vacationsContent.load("vacations.xml");
vacationsContent.onLoad = function(success) {
if(success) {
trace ("vacations loaded!");
}
}

So my questions for doing it this way are:
1. Is this the most efficient way of loading them, or is there a way to load them all at once that's better than this? It just seems so clunky to me to do it that way.
2. Is there a way to tell Flash to loop itself until the XML file IS loaded? If so, how?
3. Do you think I should put all these in the first frame? Or do you think that I should do it once they press the menu item? For instance, I wouldn't load the XML for "vacations" until the user presses the "vacations" button. If you think I should do this, does that mean that I should put the following code in the "vacations" button (I'm afraid of what would happen if the XML isn't loaded quick enough):
vacationsContent = new XML();
vacationsContent.ignoreWhite = true;
vacationsContent.load("vacations.xml");
vacationsContent.onLoad = function(success) {
if(success) {
trace ("vacations loaded!");
}
}

Sorry for the long post, I hope someone can help me out.

View Replies !    View Related
Submenu-works Fine In Flash-doesnt When Published....
i have a menu system in which i have 3 sub buttons, coming out on rolling over the main button, i have script like on click gotoandplay, my different links of buttons are different scenes...all over i have a movie with main button and sub buttons.......when i play the movie with control-enable simple buttons,,,,it works well..everything runs smooth....but the problem comes when i publish the movie...the sub buttons........stop to respond....all effects do show....but on clicking nothing happens ever.....

PLEASE HELP.........

View Replies !    View Related
Flash Movie In My Html Site Hides Submenu
Hi people, I have a problem, I have got a flash movie playing in my site, however the horizontal menu's submenu that I have is now hidden, is there a way I can resolve this?





























Edited: 06/25/2007 at 03:42:58 PM by FLASH_NEWBIE27

View Replies !    View Related
Create Menu And Submenu In Flash File Using XML File
Hello sir,

I want to know what will be the actionscript for creating menu and submenu in a flash file using XML file and .

Sir , really i am very thankful to you causes of your help in getting text using XML file in a flash file and thanks for it but if you can help me creating menu in very detail and easy way it will be very helpful for me bcoz i am really beginner in flash . so whatever you tell me should be in easy language .please help me.

View Replies !    View Related
Submenu :(
I thought submenus was gonna be easy peasy, ok using mx, id like a button slides and grows with like a tree menu flying out of it made of other buttons say 5 or 6. Tried a thread with tell target but it gave me script errors, i know i need btns in movie clips so thats all good, just some simple actionscript?, but i got told i cant search for 15 seconds, so im writing this now, wheres the tute, i know ppl want to suss this. please get rid of my amiturish flickering, this makin me feel dumb for something so small, plz plz

View Replies !    View Related
My Submenu
ok, i cant make it work, i didnt get a soloution on the other board so ill post it in here too. maybe i didnt explain fully enough before, so ill try better here...

i have a submenu, it comes out when i click a button, i do this by putting the button in a MC and having it stop on the first frame. then on the button in this movie clip i have...
on (release) {
gotoAndPlay(2);
}
it then plays the animation for the sub-menus scrolling out and they stop, at the end of the movie clip i have another stop command, and a new instance of the original button with the scripting on it of...
on (release) {
gotoAndPlay(1);
}
so that if you click it again it retracts the sub menu. now my problem lies in the fact that my buttons that scroll out as the sub-menu dont work in the way i want. i want the buttons in the sub-menu to navigate between scenes. on one of these buttons after it has finished tweening and come to the stop command at the end of the MC has the following action script...
on (release) {
_root.gotoAndPlay("scene name", 1);
}
now instead of, when you click the button, it taking you to the desired scene, the sub-menu stays there and the scene stays in the current one.
can anyone think of a reason why or see a problem with my action scripts?
please please please help me if you can.
and i appologise for being so stupid at this.

View Replies !    View Related
Submenu Help
I am trying to edit the .fla from:
http://www.flashkit.com/movies/Inter...dex.php?chk=no

I have gone in and updated the header names, and the submenu buttons. I just have no idea as to where I am supposed to include the urls or anything.

I know very little about actionscript. So please, if you do figure it out, and you want to help, please please be explicit as to the instructions, or upload a smaller version of the file so that I can go from there.

All I need is an example of how to get one of the links to work, from there I can finish my project.

Thanks again.

View Replies !    View Related
Add Submenu?
Hi, I'm pretty new to Flash, so I've used a template to make this site: http://spinstermusic.tk/

What I need to know is how I would go about adding another submenu to it. Two submenus isnt really enough. Thanks for any help.

View Replies !    View Related
[CS3] Submenu?
Hey all,

I've been working on a small "submenu", but got a problem. The hitareas block for each other. When I place the menu above the submenu, its hitarea blocks for the submenus (You can't click it now). When I place the submenu above the menu, its hitarea blocks for a part of the menus (It will roll in and the submenu will disappear). I'm out of ideas, on how I possible could fix this problem.

Current code:

Code:
import mx.transitions.Tween;
sub._visible = false;
men.hit._visible = false;
men.onRollOver = ro;
men.dragOver = ro;
men.onRollOut = ri;
men.releaseOutside = ri;

sub.onPress = function () {
trace ("I've been pressed.");
};

function ro () {
var myTween:Tween = new Tween (this, "_x", Strong.easeOut, this._x, 105, 3.5, false);
myTween.onMotionStopped = function () {
sub._visible = true;
men.hit._visible = true;
};
}

function ri () {
var myTween2:Tween = new Tween (this, "_x", Strong.easeOut, this._x, 82, 3.5, false);
myTween2.onMotionStopped = function () {
sub._visible = false;
men.hit._visible = false;
};

}
Thanks in advance for any help
(SWF preview: SWF
FLA download: FLA)

View Replies !    View Related
Xml Submenu Help
Hi xml expert out there. I need help.
please help.

1. I dont want them to be hidden.
2. Onclicking the button it should load external swf in main.swf ,_target container.

Please please help.........please

Flash Code:

PHP Code:



// universal XML parser, please do not distribute this.
XMLNode.prototype.toObject = function ()
{
  var obj = new Object();
  var i;
  var t;

  for (i = 0; i < this.childNodes.length; i++) {

    if (this.childNodes[i].nodeType == 1) {
      if (this.childNodes[i].firstChild.nodeType == 3) {
    t = new Object();

    t.value = this.childNodes[i].firstChild.nodeValue;
      } else {
    t = this.childNodes[i].toObject();
      }

      t.attributes = this.childNodes[i].attributes;

      if (obj[this.childNodes[i].nodeName] == undefined) {
    obj[this.childNodes[i].nodeName] = t;
      } else {
    if (!(obj[this.childNodes[i].nodeName] instanceof Array)) {
      obj[this.childNodes[i].nodeName] = [ obj[this.childNodes[i].nodeName] ];
    }
    obj[this.childNodes[i].nodeName].push(t);
      }
    } else {
      ;
    }
  }

  return obj;
};

ASSetPropFlags(XMLnode, [ "toObject" ], 1);
//

_global.buildMain = function()
{
    _global.main_mc = _level0.createEmptyMovieClip("menu_mc",2);
    
    var $i;
    for($i=0;$i<xml.menu.main.length;$i++)
    {
        var $main_btn = main_mc.attachMovie("main","main_"+$i,100+$i); // attach the main menu button...
        $main_btn.number = $i; // remember what number button this is...
        $main_btn.title.text = xml.menu.main[$i].attributes.name; // grab the name of this button from the XML file...
        $main_btn._y = $main_btn._height * $i;    // space accordingly.
        $main_btn.original_y = $main_btn._y // remember this y coordinate now...
        
        // create some simple mouse states...
        $main_btn.onRollOver = function()
        {
            this.gotoAndStop(2);
        };
        
        $main_btn.turnOn = $main_btn.onRollOut = function()
        {
            this.enabled = 1;
            this.gotoAndStop(1)
        };
        
        $main_btn.onRelease = function()
        {
            this.enabled = 0;
            this._parent.last_mc.turnOn(); // tell the last btn to play its rollOut state.
            this._parent.last_mc = this; // and now remember this as the last_mc pushed.
            buildSubNav(this.number); // go to the buildSubNav function with this number and generate the subnav from there.            
        };
    }
};

_global.buildSubNav = function($subnav)
{
    var $i;
    for($i=0;$i<xml.menu.main.length;$i++)
    {
        main_mc["main_"+$i]._y = main_mc["main_"+$i].original_y // reset the position of the main menu buttons.
    }
    
    var $sub_mc = main_mc.createEmptyMovieClip("subnav",3);
    $sub_mc._y = main_mc["main_"+$subnav]._y + main_mc["main_"+$subnav]._height; // position the subnav container below its corresponding button.

    var $j;
    for($j=0;$j<xml.menu.main[$subnav].sub.length;$j++)
    {
        var $sub_btn = $sub_mc.attachMovie("subnav","sub_"+$j,200+$j); // attach the sub button...
        $sub_btn._y =  $sub_btn._height * $j;    // space accordingly.
        $sub_btn.number = $j // the submenu number...

        $sub_btn.title.text = xml.menu.main[$subnav].sub[$j].attributes.name;
        
        // and now similar button functionaly to the main menu above...
        $sub_btn.onRollOver = function()
        {
            this.gotoAndStop(2);
        };
        
        $sub_btn.turnOn = $sub_btn.onRollOut = function()
        {
            this.enabled = 1;
            this.gotoAndStop(1)
        };    
        
        $sub_btn.onRelease = function()
        {
            this.enabled = 0;
            this._parent.last_mc.turnOn(); // tell the last btn to play its rollOut state.
            this._parent.last_mc = this; // and now remember this as the last_mc pushed.
            // here you can have a getURL or whatever.
        };
    }
    
    // and finally, we space the main menu buttons below the subnav.
    if($subnav < xml.menu.main.length-1 && $sub_mc._height > 1)
    {
        var $k;
        for($k=$subnav+1;$k<xml.menu.main.length;$k++)
        {
            main_mc["main_"+$k]._y += $sub_mc._height;
        }
    }
    
    
};


// this function loads our XML file and when finished loading converts it to an object (via the XML prototype above).
// that object is then send off to buildMain().
_global.initMenu = function()
{
    var $xml = new XML();
    $xml.ignoreWhite = 1;
    $xml.onLoad = function()
    {
        _global.xml = $xml.toObject();
        buildMain();
    };
    $xml.load("menu.xml");    
};

initMenu(); // launch the program. 





xml code:

PHP Code:



<?xml version="1.0" ?>

<menu>
    <main name="Button 1">
        <sub name="Sub 1a" />
        <sub name="Sub 2a" />
    </main>
    <main name="Button 2" />
    <main name="Button 3">
        <sub name="Sub 1b" />
        <sub name="Sub 2b" />
    </main>
    <main name="Button 4">
        <sub name="Sub 1c" />
        <sub name="Sub 2c" />
    </main>
    <main name="Button 5" />
</menu>

View Replies !    View Related
Submenu ?
I like the submenu of http://www.hummer.com !
Somebody can tell me how can I do that ? Thanks a lot !

View Replies !    View Related
If Want Second Submenu?
http://chfansite.altervista.org/Home.fla

ok the buttons are working well, but BIOGRAPHY has a submenu with a new mc with buttons inside. BUT if i want another button to do the same thing what code should i add?

ps. if the link doesnt work just copy paste it in ur adress bar

thanks for your attention

View Replies !    View Related
Submenu?
Hey all,

I've been working on a small "submenu", but got a problem. The hitareas block for each other. When I place the menu above the submenu, its hitarea blocks for the submenus (You can't click it now). When I place the submenu above the menu, its hitarea blocks for a part of the menus (It will roll in and the submenu will disappear). I'm out of ideas, on how I possible could fix this problem.

Current code:

Code:
import mx.transitions.Tween;
sub._visible = false;
men.hit._visible = false;
men.onRollOver = ro;
men.dragOver = ro;
men.onRollOut = ri;
men.releaseOutside = ri;

sub.onPress = function () {
trace ("I've been pressed.");
};

function ro () {
var myTween:Tween = new Tween (this, "_x", Strong.easeOut, this._x, 105, 3.5, false);
myTween.onMotionStopped = function () {
sub._visible = true;
men.hit._visible = true;
};
}

function ri () {
var myTween2:Tween = new Tween (this, "_x", Strong.easeOut, this._x, 82, 3.5, false);
myTween2.onMotionStopped = function () {
sub._visible = false;
men.hit._visible = false;
};

}
Thanks in advance for any help
(SWF preview: SWF
FLA download: FLA)

View Replies !    View Related
Submenu Help
I need some help here. I'm working on a Flash site for a client and have a menu that shows a submenu on mouseover.

I want the submenu to disappear when the mouse moves out of it. Right now you have to click it away, which is one step too much for the visitor.

I've got a sample of the menu here:


Hope anyone can point me in the right direction. Thanks!

View Replies !    View Related
Submenu ?
I like the submenu of http://www.hummer.com !
Somebody can tell me how can I do that ? Thanks a lot !

View Replies !    View Related
If Want Second Submenu?
http://chfansite.altervista.org/Home.fla

ok the buttons are working well, but BIOGRAPHY has a submenu with a new mc with buttons inside. BUT if i want another button to do the same thing what code should i add?

ps. if the link doesnt work just copy paste it in ur adress bar

thanks for your attention

View Replies !    View Related
Menu And Submenu
Hi,
i tried to do a menu. When you roll over the first point (Mainmenu) the three points of the submenu appears. That's no problem so. But how do i do that i can click now one of the points of the submenu?? Is there an easy way or have i to direct them to a new site with the first menu and then again with the submenu?? I hope you understand what i'm trying to explain, cause my english is horrible, sorry!
cu, Spaceflash

View Replies !    View Related
Creating A Submenu
Need help!

I'm creating a navigation bar (horizontal) that has a submenu launch below it depending on the button rolled over.

This is what I'm trying to do:

I want the submenu to stay active even if a user rolls out of the submenu area, but once a user rolls over another one of the main navigation buttons, I need the current submenu to collapse and the new one launch.

Now....I have created a MC that controlls the expanding/collapsing animation. I am able to control that with a tellTarget. My problem is trying to figure out a way to tell the current MC (regardless of which one is active at the time) to deactivate.

Any help?

View Replies !    View Related
Scrolling Submenu
pleas take a look at the following site:
http://www.anovadesign.com/
you can see that each button on the main menu activates
the scrolling submenu.
this is done by "on rollover+goto" i presume.
what riddled me was the "rollout" effect, since rollout accures whenever leaving the buttons surface, EXCEP for the
submenu field. allowing the user to hit the submenu buttons without them 'slipping' away the minute the mouse leaves the main menu button. how is this done??

View Replies !    View Related
Submenu's On Button's
I am working on a flashsite with a menu just like the windows thingie. I was wondering if anyone could help me with the submenu's.
I displayed the submenu at the 'over' frame in the button edit screen
Now it does display the menu but when I roll over it with my mouse it starts flashing and the animations of this submenu don't work either. I wrapped it up as a movie clip, with the buttons inside it...
Hope u understand me, cuz I think it's hard explaining this based on my Flash knowledge...

A picture of this is attached. (if this workz...)

View Replies !    View Related
How Can I Add A Link To This Submenu?
Please someone help me
there is a simple drop down menu movie at:
http://www.flashkit.com/movies/Inter...7816/index.php
...but I cant make the submenu work.
It should go to a url or a specific frame to the main movie..
How can I add a link or make the timeline jump to a specific frame???
scripting people...plz help me...
g.

View Replies !    View Related
How Can I Add A Link To This Submenu?
Please someone help me
there is a simple drop down menu movie at:
http://www.flashkit.com/movies/Inte...-7816/index.php
...but I cant make the submenu work.
It should go to a url or a specific frame to the main movie..
How can I add a link or make the timeline jump to a specific frame???
scripting people...plz help me...
g.

View Replies !    View Related
Expand Submenu
Hi...

Somebody knows how can i make a menu that when i put the cursor over the buttom (an item) expands othe itens (submenus)

Thanx

View Replies !    View Related
Menu And Submenu
Hey all,
I'm trying to make amenu that opens up with an "onRollOver" event-handler, and will close with an "onRollOut" - meaning, once the mouse is on the MC it will open and once it has left it, the menu will shut. the thing is, due to the fact that "onRollOver/Out" preform as long as the mouse is on it, i get the effect of the menu always trying to open it self. is there a way of making it work well?
thank you.

View Replies !    View Related
Add Link To Submenu
i need to add link to a submneu...i when i roll over a menu a submnu apears..and when i press on one of the item in the submenu i want to go to desired url but i can't do it..if i change this submenu to a button than it want work..the submenu is writen in actionscript so i can't see that submenu until i test the movie...

example of flash file:

when i roll over a menu "picture" a submenu apears with 4 items...and i want to go to desired url when i press any of the submneu item...let say on "More" but don't know how..

here i have add a file

please can you help me...

tnx

View Replies !    View Related
Dynamic Submenu Help
Hello, I need some help with this code I wrote. I am trying to make dynamic submenus so I can just edit some array fields and the function will create submenus based on a few parameters.

Anyone care to help?


Code:
var subNav = new Array();
subNav[0] = ["subOne","subTwo"];
subNav[1] = ["Test 1", "Test 2"];
subNav[1].linkText = ["test.html", "test2.html"];

function createMenu(a,b,trX,trY) {
for(i=0; i<=(subNav[b].length - 1); i++) {
tr = _root.attachMovie("submenuItem",subNav[0][a] + i,i);
tr.linkText.text = subNav[b][i];
tr._x = trX;
tr._y = trY + (100 * i);
}
}

createMenu(0,1,0,99);
createMenu(1,1,173,99);

View Replies !    View Related
ActionScripting A SubMenu...
Hey people,
Ok I am working on a menu system for my site and it contains one subMenu. It will have more later. I have used a MC to achieve the revealing of the sub menu, but as you can see in my .fla it is flawed. In example 1, once you roll of the button the sub menu dissappears before you have time to press anything. In exapmle 2 I made the hit stae bigger but the subMenu woprks on all 3 buttons...hope someone can help me...
thanks in advance,
Tom

View Replies !    View Related
Submenu Problem
I've download the following fla file and I try to use it but I dont know how to set submenus active!
http://www.flashkit.com/movies/Inter...7816/index.php

I dont know where to put action get.url or something like that. Please help!

View Replies !    View Related
Help Submenu Problems
hey there!

i've made this menu that uses roll-overs to get to the submenu right next to it. so when you roll-out of the button, the submenu also dissappears.

my question for you is:

can you, in one way or another, also keep the submenu visible if you roll onto the submenu? and preferably WITHOUT CLICKING?!

cause if i put it in the "hit-section" the roll-over starts to work if you go over the empty area where the submenu needs to appear. i've included the fla-file if that helps you (and me) out.

thanks a million, billion, kazzilion!

View Replies !    View Related
Help Submenu Problems
hey there!

i've made this menu that uses roll-overs to get to the submenu right next to it. so when you roll-out of the button, the submenu also dissappears.

my question for you is:

can you, in one way or another, also keep the submenu visible if you roll onto the submenu? and preferably WITHOUT CLICKING?!

cause if i put it in the "hit-section" the roll-over starts to work if you go over the empty area where the submenu needs to appear. i've included the fla-file if that helps you (and me) out.

thanks a million, billion, kazzilion!

View Replies !    View Related
Help Submenu Problems
hey there!

i've made this menu that uses roll-overs to get to the submenu right next to it. so when you roll-out of the button, the submenu also dissappears.

my question for you is:

can you, in one way or another, also keep the submenu visible if you roll onto the submenu? and preferably WITHOUT CLICKING?!

cause if i put it in the "hit-section" the roll-over starts to work if you go over the empty area where the submenu needs to appear. i've included the fla-file if that helps you (and me) out.

thanks a million, billion, kazzilion!

View Replies !    View Related
Xml Vertical Submenu Help
Hi xml expert out there. I need help.
please help.

1.I have a got xml menu but in this submenus are hidden. I dont want them to be hidden.
2. Onclicking the button it should load external swf in main.swf ,_target container.


PHP Code:



// universal XML parser, please do not distribute this.
XMLNode.prototype.toObject = function ()
{
  var obj = new Object();
  var i;
  var t;

  for (i = 0; i < this.childNodes.length; i++) {

    if (this.childNodes[i].nodeType == 1) {
      if (this.childNodes[i].firstChild.nodeType == 3) {
    t = new Object();

    t.value = this.childNodes[i].firstChild.nodeValue;
      } else {
    t = this.childNodes[i].toObject();
      }

      t.attributes = this.childNodes[i].attributes;

      if (obj[this.childNodes[i].nodeName] == undefined) {
    obj[this.childNodes[i].nodeName] = t;
      } else {
    if (!(obj[this.childNodes[i].nodeName] instanceof Array)) {
      obj[this.childNodes[i].nodeName] = [ obj[this.childNodes[i].nodeName] ];
    }
    obj[this.childNodes[i].nodeName].push(t);
      }
    } else {
      ;
    }
  }

  return obj;
};

ASSetPropFlags(XMLnode, [ "toObject" ], 1);
//

_global.buildMain = function()
{
    _global.main_mc = _level0.createEmptyMovieClip("menu_mc",2);
    
    var $i;
    for($i=0;$i<xml.menu.main.length;$i++)
    {
        var $main_btn = main_mc.attachMovie("main","main_"+$i,100+$i); // attach the main menu button...
        $main_btn.number = $i; // remember what number button this is...
        $main_btn.title.text = xml.menu.main[$i].attributes.name; // grab the name of this button from the XML file...
        $main_btn._y = $main_btn._height * $i;    // space accordingly.
        $main_btn.original_y = $main_btn._y // remember this y coordinate now...
        
        // create some simple mouse states...
        $main_btn.onRollOver = function()
        {
            this.gotoAndStop(2);
        };
        
        $main_btn.turnOn = $main_btn.onRollOut = function()
        {
            this.enabled = 1;
            this.gotoAndStop(1)
        };
        
        $main_btn.onRelease = function()
        {
            this.enabled = 0;
            this._parent.last_mc.turnOn(); // tell the last btn to play its rollOut state.
            this._parent.last_mc = this; // and now remember this as the last_mc pushed.
            buildSubNav(this.number); // go to the buildSubNav function with this number and generate the subnav from there.            
        };
    }
};

_global.buildSubNav = function($subnav)
{
    var $i;
    for($i=0;$i<xml.menu.main.length;$i++)
    {
        main_mc["main_"+$i]._y = main_mc["main_"+$i].original_y // reset the position of the main menu buttons.
    }
    
    var $sub_mc = main_mc.createEmptyMovieClip("subnav",3);
    $sub_mc._y = main_mc["main_"+$subnav]._y + main_mc["main_"+$subnav]._height; // position the subnav container below its corresponding button.

    var $j;
    for($j=0;$j<xml.menu.main[$subnav].sub.length;$j++)
    {
        var $sub_btn = $sub_mc.attachMovie("subnav","sub_"+$j,200+$j); // attach the sub button...
        $sub_btn._y =  $sub_btn._height * $j;    // space accordingly.
        $sub_btn.number = $j // the submenu number...

        $sub_btn.title.text = xml.menu.main[$subnav].sub[$j].attributes.name;
        
        // and now similar button functionaly to the main menu above...
        $sub_btn.onRollOver = function()
        {
            this.gotoAndStop(2);
        };
        
        $sub_btn.turnOn = $sub_btn.onRollOut = function()
        {
            this.enabled = 1;
            this.gotoAndStop(1)
        };    
        
        $sub_btn.onRelease = function()
        {
            this.enabled = 0;
            this._parent.last_mc.turnOn(); // tell the last btn to play its rollOut state.
            this._parent.last_mc = this; // and now remember this as the last_mc pushed.
            // here you can have a getURL or whatever.
        };
    }
    
    // and finally, we space the main menu buttons below the subnav.
    if($subnav < xml.menu.main.length-1 && $sub_mc._height > 1)
    {
        var $k;
        for($k=$subnav+1;$k<xml.menu.main.length;$k++)
        {
            main_mc["main_"+$k]._y += $sub_mc._height;
        }
    }
    
    
};


// this function loads our XML file and when finished loading converts it to an object (via the XML prototype above).
// that object is then send off to buildMain().
_global.initMenu = function()
{
    var $xml = new XML();
    $xml.ignoreWhite = 1;
    $xml.onLoad = function()
    {
        _global.xml = $xml.toObject();
        buildMain();
    };
    $xml.load("menu.xml");    
};

initMenu(); // launch the program.




xml code:

PHP Code:



<?xml version="1.0" ?>

<menu>
    <main name="Button 1">
        <sub name="Sub 1a" />
        <sub name="Sub 2a" />
    </main>
    <main name="Button 2" />
    <main name="Button 3">
        <sub name="Sub 1b" />
        <sub name="Sub 2b" />
    </main>
    <main name="Button 4">
        <sub name="Sub 1c" />
        <sub name="Sub 2c" />
    </main>
    <main name="Button 5" />
</menu>



lease please help.........please

View Replies !    View Related
[F8] 2advanced Submenu
I'm trying to create a menu that looks like the new 2advanced submenu, i mean you can scroll the sublinks under a mask, I've been trying to do this with normal scrolling way but noting is working.
The problem is that i use a dragger(button or movie clip), the dragger is controlled by onRollOver, and here is the problem, when i rollover the Dragger, it over rides the buttons under the mask in the submenu.
any help would be great.

View Replies !    View Related
[F8] Load .swf With .xml Submenu
If my blank movie clip target instance name is: target
And my .swf file is "gameday.swf" on my domain insidehornetfootball.com
My .xml component instance name is: hornetMenu2

Is this the correct actionscript?

//****If you seta component’s instancename as“hornetMenu2”
this.onClickMenu=function(pObj){
var kLabel = pObj.label;
var kMode = pObj.menuMode;
fld.text = “You click “+kMode+” menu , and label is “+kLabel+”.”;
};
hornetMenu2.addEventListener(“onClickMenu”, this);

Is this how the .xml submenu should look?

<SubMenu label="Game Day" bgColor="0xffffff" bgAlpha="65" borderThick="" borderColor="0xffffff" borderRound="0" font="arial" fontSize="11" fontColor="0x000000" usingEmbedFont="false" bold="false" italic="false" link="http://www.insidehornetfootball.com/gameday.swf" targetWin="_target"/>

Thank you.

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved