Submenu ?
I like the submenu of http://www.hummer.com !Somebody can tell me how can I do that ? Thanks a lot !
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 01-06-2005, 03:27 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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.
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
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.
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.
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.
[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)
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>
Submenu ?
I like the submenu of http://www.hummer.com !
Somebody can tell me how can I do that ? Thanks a lot !
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
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)
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!
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
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
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?
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??
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...)
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.
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.
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?
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
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.
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
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 )
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
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);
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
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!
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!
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!
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!
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
[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.
[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.
Submenu Problems
hello people, I wonder if anyone can help me?
I'm using flash MX...yeah, a little old but no money!! anyway....I'm doing a website and its submenu's buttons doesn't follow the action.
What I want to do is that when the pointer goes over the main menu, another submenu appears and when you rollout from the submenu it'll desappear.
I know it's better to have all the actions in one layer but it's kind of difficult (for me at least) maybe that's part of the problem.
here they are( basic actionS. and problelm)
I have 5 MC(boxMolde,photo,hist,arch,design).These are the submenu buttons, each MC has this ActionS.(with different names of course):
on (rollOver) {
_root.design.gotoAndPlay("btngd");
}
on (rollOut) {
_root.design._visible = 0;
}
"design" has 4 buttons(gd1...gd4)
I also have five buttons in the main menu(buttonOne,buttonTwo...buttonFive)
inside of each button:
(in "buttonfive"):
on (rollOver) {
_root.photo._visible = 0;
_root.hist._visible = 0;
_root._root.boxMolde._visible = 0;
_root.arch._visible = 0;
_root.design._visible = 100;
_root.design.gotoAndPlay("desStrt");
}
Now, the problem is that when pointer goes over the buttons inside the submenu (specifically inside the MC:"design") the OVER state of button "gd1" doesn't play. The button should turn white.
Submenu Madness
this is driving me mad
i have a movie clip menu
in that menu there are individual movie clip options ie about, contact etc.
one of those movie clips "services" has a submenu listing those services
the action on the frame for services is as follows:
Code:
stop(); // stop the movie clip from playing (stop button
from growing, we want that when the mouse rolls
over only
this.onEnterFrame = function()[
if(rewind == true){ //if rewind switch is set to true play
backwards
prevFrame(); // play backwards
]
]
this.onRollOver = function()[
rewind = false; //set variable (or switch) that decides
whether or not to play backwards...
play(); // play this movie clip.. (grow the button(tween));
]
this.onRollOut = function()[
rewind = true; //set or rewind switch to true so it will
play backwards...
]
this.onRelease = function()[
_parent._parent._parent.collector_mc.loadMovie("our_approach.swf");
]
so that when on scrolls over "services" the submenu appears
the issue is... none of the options in the submenu will work with the
following script
Code:
on (release) [
this._root.loadMovie("test.swf",collector_mc);
]
i either want to link them to load in an empty root movie clip or or load a frame in another scene..
any assistance will be greatly appreciated.
[CS3] Rollover Submenu
Hi all can anyone help me with a button issue I have. I have built a site using flash CS3 I have a button that I would like to have a movie play once when rolled over. The problem I am having is the movie that I want to have play is looping and it also has buttons on it that I would like to be able to use. I am new to flash sites and actionscript please forgive me
Vertical XML Submenu Help
Its an screen shot of : http://www.frunder.com/products/flash/menu/demos.htm
Hi friend
I am not that gud in xml and AS but my client require to have a dynamic website with xml menu , so that whenever he require he can update the site.
What i was looking for xml menu something like the picture above but not so complicated, Basically i need xml menu and vertical sublinks (exartly as the picture above).
On click the menu, will load external.swf in main.swf .
I dont want you spend time on collapsing menu.
Please help... Will be really appriciated.
Load .swf From .xml Submenu
Looking for assistance on actionscript and .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 name is: hornetMenu2
my submenu label is "Game Day"
//****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.
Submenu Problem
hello!
I'm a beginner in Flash. I decided to make a portfolio site because I lost my job recently and I thought this would be a good way to present my work.
I have the main navigation links (Portfolio, About, Contact, and Links) and When you click on them, an external swf opens in the Holder_mc area below the navigation. Those all work fine. However, I want a submenu to open to the right of my main nav links when you click on the Portfolio link. That part works as well. But when you click on the links, they dont open my swf files into holder_mc. I have no idea how to go about fixing this.
I've tried searching the on internet 'submenu tutorials', 'loading external swf' , read through my book. tried other ways around it. No luck.
I appreciate your time and anyone's help on this. Hopefully I'll get a job out of all this mess!
Here is the link to download the files:
http://www.sendspace.com/file/gcbars
thank you!
Submenu Script?
Ok so a question
I have a site that has a button which has a submenu in it... I was wondering what code I can use to control the main timeline with the submenu?
thanks
mark
My Submenu's Don't Work
I'm making my own drop down menu's, but it's not working they way I wanted it to. I origanaly wanted my main buttons and submenu buttons to have dynamic text for, but I've had many problems. Now I don't have any dynamic text for my submenu's and it sill doesn't work. The submenu's go away as soon as you roll over them. I havn't been using ActionScript too long, so it may be a simple error. Here's a URL:
www.mariovasquez.com/cvb/index.php
I'm also attaching the file so you can see what's going on. If anyone has any suggestions or ideas to get this to work or knows of a better way of doing it, please post suggestions. Thanks!
SubMenu Class
Hey guys. Me again....
I've written my class and have it properly adding the text with the buttons. I created the following class function to create my event handlers for each button. The problem I'm having is that no matter what button I am clicking on, they all try to load the file with the name of the last button. I need it to create individual handlers that load the proper file. button 1 should load one.txt and button 2 should load two.txt etc etc. Where am I going wrong?
Attach Code
public function createHandlers(mItems:Array, target_mc:MovieClip) {
for( var i = 0; i < mItems.length; i++) {
var theFile:String = mItems[i];
// trace("File Name: "+theFile);
target_mc[mItems[i]+"_btn"].onRelease = function() {
target_mc.loadVariables(theFile+".txt");
}
}
}
ActionScript SubMenu
Hello-
I have received a Flash file that contains some ActionScript I cannot decipher. In a nutshell, there is a navigation menu whose content and links are loaded via an XML document. To see the menu in question, view this link: Portfolio
You can see the menu I am referring to on the left. Essentially, I am trying to add another link below the ones that are currently there. But, whenever I add the new link into the XML file, the Flash movie does not display it. I am at a loss on how to fix this... Could anyone suggest what could be going on?
For reference, the following is both the XML code and the code that is in the Flash file for loading the XML. Thanks in advance.
XML:
<?xml version="1.0"?>
<menu>
<item name="identities">
<sub name="/brand" action="brand.swf">
</sub>
<sub name="/event" action="event.swf">
</sub>
</item>
<item name="print ads" action="print_ads.swf">
</item>
<item name="collateral" action="collateral.swf">
</item>
<item name="direct mail" action="direct_mail.swf">
</item>
<item name="web/interactive" action="web.swf"/>
</item>
<item name="integrated branding" action="integrated_branding.swf"/>
</item>
</menu>
Actionscript:
stop();
var contentFile = "xmlFiles/menuContent.xml";
var configFile = "xmlFiles/menuConfig.xml";
contentXML = new XML();
configXML = new XML();
contentXML.varTarget = this;
configXML.ignoreWhite = contentXML.ignoreWhite = true;
contentXML.onLoad = function (success)
{
if (success)
{
var vt = this.varTarget;
var root = this.firstChild;
vt.menuObj = new Object();
var i, j, k, m, h, a;
(i = root.lastChild, j = 1);
while (i != null)
{
vt.menuObj["item" + j] = new Object();
vt.menuObj["item" + j].name = i.attributes.name;
vt.menuObj["item" + j].age = i.attributes.age;
vt.menuObj["item" + j].location = i.attributes.location;
vt.menuObj["item" + j].action = typeof(i.attributes.action) == "undefined" ? null : i.attributes.action;
vt.menuObj["item" + j].sub = false;
if (i.hasChildNodes())
{
vt.menuObj["item" + j].sub = true;
(k = i.lastChild, m = 1);
while (k != null)
{
vt.menuObj["item" + j]["sub" + m] = new Object();
vt.menuObj["item" + j]["sub" + m].name = k.attributes.name;
vt.menuObj["item" + j]["sub" + m].age = k.attributes.age;
vt.menuObj["item" + j]["sub" + m].location = k.attributes.location;
vt.menuObj["item" + j]["sub" + m].action = typeof(k.attributes.action) == "undefined" ? null : k.attributes.action;
vt.menuObj["item" + j]["sub" + m].subsub = false;
if (k.hasChildNodes())
{
vt.menuObj["item" + j]["sub" + m].subsub = true;
(h = k.lastChild, a = 1);
while (h != null)
{
vt.menuObj["item" + j]["sub" + m]["subsub" + a] = new Object();
vt.menuObj["item" + j]["sub" + m]["subsub" + a].name = h.attributes.name;
vt.menuObj["item" + j]["sub" + m]["subsub" + a].age = h.attributes.age;
vt.menuObj["item" + j]["sub" + m]["subsub" + a].location = h.attributes.location;
vt.menuObj["item" + j]["sub" + m]["subsub" + a].action = h.attributes.action;
(h = h.previousSibling);
a++;
}
vt.menuObj["item" + j]["sub" + m].Number_SubSubs = a - 1;
}
(k = k.previousSibling);
m++;
}
vt.menuObj["item" + j].Number_Subs = m - 1;
}
(i = i.previousSibling);
j++;
}
_global.Number_Items = j - 1;
vt.play();
}
else
{
trace("ERROR PARSING XML");
}
};
function loadContent()
{
contentXML.load(contentFile);
}
configXML.onLoad = function (success)
{
if (success)
{
var root = this.firstChild;
configObj = new Object();
configObj.menuSpeed = root.attributes.menuSpeed;
configObj.menuSpacer = root.attributes.menuSpacer;
configObj.colorSpeed = root.attributes.colorSpeed;
allLevels = root.childNodes;
for(var i=0; i<allLevels.length; i++)
{
configObj[allLevels.nodeName] = new Object;
configObj[allLevels.nodeName].overColor = allLevels.attributes.overColor;
configObj[allLevels.nodeName].outColor = allLevels.attributes.outColor;
configObj[allLevels.nodeName].delay = allLevels.attributes.delay;
}
loadContent();
}
else
{
trace("ERROR PARSING XML");
}
}
configXML.load(configFile);
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
Problem With Submenu
Hi
I have a menu called 'mENU' but 2 items called 'iTEM2' and 'iTEM3' in this menu have a submenu called 'iTEM2sUB' (for 'iTEM2') and 'iTEM3sUB' (for 'iTEM3')
I want the submenu's appear on roll over of the right item but it won't work
this is the code i use:
Code:
_root.mENU.iTEM2.onRollOver = function() {
this.gotoAndPlay('on'); // the animation of 'iTEM2'
_root.mENU.iTEM2sUb.gotoAndStop('on'); // to activate 'iTEM2sUB'
}
_root.mENU.iTEM3.onRollOver = function() {
this.gotoAndPlay('on'); // the animation of iTEM3
_root.mENU.iTEM3sUb.gotoAndStop('on'); // to activate 'iTEM3sUB'
}
Submenu Won't Stay Put
Just want to start off by saying this is an excellent forum and thanks for all the information, now here's my problem.
I've been messing around with smooth rollover effects for buttons and I've finally gotten it the way I like it. My only problem is I want the effect, which happens to be a submenu, to stay in place when it reaches the end. When the user rolls out on the button the effect reverses. Is there something in the effect I need to set code wise or in the main code itself. I'm not the greatest with AS so any help would be greatly appreciated.
Code:
effect.onEnterFrame = function() {
(animation) ? effect.nextFrame() : effect.prevFrame();
};
button.onRollOver = function() {
animation = true;
};
button.onRollOut = function() {
animation = false;
};
button.onRelease = function(){
getURL("http://www.blabhbalhbalh.com");
}
P.S. Thanks to all the posters in this thread, it helped me out a ton. http://www.kirupa.com/forum/showthre...tton+animation
Help With XML Menu / Submenu
Hi all, I'm new to Kirupa and XML on Flash. Could anyone help me?
I'm trying to make a gallery based on AS + XML. In the XML file I've years, and inside each year expos wich contains pictures. I've started from a Kirupa example, but I can't make it work right now.
The idea is to get a menu listing years at the left and when you pick a button a submenu appears with the expos for that year.
Something like:
The problem is the buttons for expos are already visible when the movie loads. I'm using an "onRelease" trying to call the Expo buttons, but they're already open.
This is the XML
Code:
<vc>
<2000 type="year">
<expo type="expo">
<name>Expo 1</name>
<picture type="picture">
...
</picture>
<picture type="picture">
...
</picture>
</expo>
<expo type="expo">
<name>Expo 2</name>
...
</expo>
</2000>
<2001 type="year">
<expo type="expo">
<name>Expo 1 2001</name>
...
</expo>
</2001>
</vc>
And the AS:
Code:
function CreateMenu(menu_xml) {
var items = menu_xml.firstChild.childNodes;
for (var i = 0; i<items.length; i++) {
if (items[i].attributes.type == "year") {
var year = items[i].childNodes[0].parentNode;
var item_mc = menu_mc.attachMovie("menu_item", "item"+item_count, item_count);
item_count++;
item_mc.textButton_txt.text = year.nodeName;
item_mc.onRelease = CreateMenuExpos(year); // Here I try to create the Expos menu.
}
}
}
function CreateMenuExpos(menuExpos_xml) {
var expos = menuExpos_xml.childNodes;
for (var i = 0; i<expos.length; i++) {
var expo = expos[i].childNodes[0].parentNode;
var expo_mc = menu_mc.attachMovie("menu_item", "expo"+item_count, item_count);
item_count++;
expo_mc. textButton_txt.text = expo.firstChild.firstChild;
}
}
var vc_xml = new XML();
vc_xml.ignoreWhite = true;
vc_xml.onLoad = function(success) {
if (success) {
CreateMenu(this);
} else {
trace("Error");
}
};
vc_xml.load("vc.xml");
Thanx in advance!
Navigation With Submenu
Hello everyone!
I am trying to make a naviation like this:
www.oz.com
anyone can help me pls pls pls ???
thx in advance
Set Another Url Link For My Submenu?
ActionScript Code:
function generateMenu() { // setup the clips in array for (var i = 0; i<=numClips; i++) { // get reference to clip var clip = this["menuItem"+i]; switch (i) { .... case 3 : ... break; case 4 : clip.th = 100; clip.nav.menuText.text = "Nav 4"; clip.gotoURL = "4"; clip.menuItem1sub0.menuText.text = "Nav 4 A"; clip.menuItem1sub0.gotoURL = "/4a"; clip.menuItem1sub1.menuText.text = "Nav 4 B"; clip.menuItem1sub1.gotoURL = "/4b"; break;etc.clip.onRelease = goto; clip.onRollOver = over;}}function goto() {trace(this.gotoURL);}
Now it only traces 4 and not /4a or /4b???
How can i fix this?
|