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




Having Trouble With A Menu...



Hey,
i'm trying to make a popup menu the Davy-Paycheck way (see previous posts..). I can get the popup action to work, but my trouble is that the buttons in the popup dont respond to rollOVers. They are supposed to hightlight on rollover.. The buttons are embedded in a moviceClip.
FLA is attached..
what am i doing wrong?
just rollOVer the red button, and the 4-button submenu should appear...

thanks,
-myk



FlashKit > Flash Help > Flash MX
Posted on: 04-01-2003, 02:10 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Menu Trouble...
I'm having trouble with a menu. i created a new symbol (a button) and made a small rectangle. I then added a keyframe to the Over part of the button and put a few rectqangles stacked on each other. Next, I added it to scene to my scene. It worked great until i put the button under it. When u roll over the top menu and then over to the top rectangle it works great. Then when u move down it switched to the next menu. If you give me your email i can send the .fla to u. Then you can make it work and i can figure it out. any help would be most appreciated.

Trouble With Menu
Wonder if anyone can help me with my menu. Ive just started to uplaod a new website. www.signandlight.com The menu works fine when you test the movie however when loaded into level three of a movie embedded in HTML it does function properly?

The menu's appear when you roll over the buttons and disapear when you click anywhere on the screen. Each menu is a MC with an onclip event attached to it with action script to make any clip disappear when clicked anywhere on screen. The problem is that if you click outside the mc on certain parts of the screen they don't disappear. Insted the whole screen goes blue as if it is selected. However it works fine in the swf alone? Ive uplaoded the menu.fla for anyone who can help?

Many thanks in advance

Menu Trouble
This is gonna be hard to explain....

I got a menu with 5 buttons.Lets call them button 1,2,3,4 and 5. These button has its own layer. When pressint button 5 first it starts playing is it should. The problem is when pressing button 1-4 after I have pressed 5 they play under the button 5 layer. I understand why this happen but is there a way to reset the position of the button 5?

Nav Menu Trouble
Hello everyone,

I'm relatively new to Flash and I've tried to make a go at it myself. I'm in the process of generating a menu system and I've hit a snag. During the mouseover state, each button sets the variable menu_txt to something different. What I would like to do is to have the menu text slide in, then out. My current (non-working) scheme is to have each button populate the dynamic text box(named menu_text), which is in a movie clip (named menu_txt_mc). I've posted both the nav_bar.v3.fla and nav_bar.v3.swf at www.zabaronick.com/design/flash

thanks for any help,
bill

[F8] Menu Bar Trouble
I found this tutorial for the menu bar at ultraschock.
code:
var helpMenu = myMenuBar.addMenu("Help");
helpMenu.addMenuItem({label:"About", instanceName:"aboutMenuItem"});
helpMenu.addMenuItem({label:"Ultrashock", instanceName:"aboutUltrashock"});

This wont work right in my flash 8.It shows the "about" and the "ultrashcok" but the main meu named "help" aint there test it for me and see if you get the same results.Or if anyone has an answer.Thanks

Jamesloacher

Xml Menu Trouble...
im trying to create a menu from xml data. i created an empty movie clip that will house each menu item as a dynamic text field. Im using a for loop to do this, and for some reason i'm overwriting my menu items... I know im getting all the data because i can trace it successfully... does anyone have any ideas? this is driving me nuts

PHP Code:



var charData:XML = new XML();
charData.ignoreWhite = true;
var xPos:Number = 0;
var yPos:Number = -200;
charData.onLoad = function(success) {
    if (success) {
        var numOfChars:Number = charData.firstChild.childNodes.length;
        for (var i:Number = 0; i<numOfChars; i++) {
            var newName:String = charData.firstChild.childNodes[i].attributes.charName;
            var newDepth:Number = this.getNextHighestDepth();
            var txtWidth:Number = 100;
            //var txtHeight:Number = 20;
            characters.menuContainer.createTextField(newName, newDepth, xPos, yPos, txtWidth, txtHeight);
            characters.menuContainer[newName].text = newName;
            yPos += 10;
        }
    } else {
        trace("::error loading::");
    }
};
charData.load("charList.xml"); 

Menu Trouble..
hey there guys ! ok.. i have this box that has the word "menu" in it.. this is what i want to happen : when you roll ur mouse over it, the menu just slides down from behind it.. and when you roll out, it slides back up...

any of you guys know how i can do that? heh.. here's my menu.

please help me out ! ive been trying to figure this out and mixing all sorts of codes for the past two hours. rofl

Trouble With Menu Txt
Hi!
I'm needing some guidance, please. (Using MX2004)
I'm not the best at coding yet...so simple is good!!

Here's my problem:
I have a dynamic txt menu, but I can't figure how to make it change colors when tabbed on (has to be tab only, no mouse).

When I've used this code for a drop-down type menu, it's perfect! This time I need my menu items to be in a row, and something somewhere is being missed. But what? (This one problem will fix several of my movies.)

On some of the more difficult movies I've been working on, I have to use the Selection.setFocus. But as I said earlier, this has worked great for my drop-down menu movies.

Would someone be kind enough to explain to me what's wrong...please? I'm just not seeing it. I have tried all kinds of things...I'm just not seeing it!

THANK YOU! se

PS...how do you attach a file? Here's the code: (sorry)


//subscriberA 6-13-05


// note: unable to tab
//
//

//==========

menu = new Array("Add", "Done");

//==========

count = 0;
//=======

this.createEmptyMovieClip("mc",1);
this.mc._x=56;
this.mc._y=41;

//=======

myFormat = new TextFormat();
myFormat.bold = true;
myFormat.size = 12;
myFormat.font = "Arial";

//===========


for (i=0; i<menu.length; ++i) {
nt = "txt"+i;
ot = "txt"+(i-1);
this.mc.createTextField(nt,i+1,(this.mc[ot]._x+this.mc[ot]._width)+2,0,40,18);

this.mc[nt].autoSize = false;
this.mc[nt].selectable = false;
this.mc[nt].background = true;
this.mc[nt].backgroundColor = 0x0000ff;
this.mc[nt].html = true;
this.mc[nt].htmlText = menu[i];
this.mc[nt].textColor = 0xdfdfdf;
this.mc[nt].setTextFormat(myFormat);

}

//==================

colorChange = function (a) {
for (i=0; i<menu.length; ++i) {
nt = "txt"+i;
this.nt.backgroundColor = 0x0000ff;
this.nt.textColor = 0xdfdfdf;
}
nt = "txt"+a;
this.nt.backgroundColor = 0xdfdfdf;
this.nt.textColor = 0x0000ff;

};
//=============

keyListener = new Object();
keyListener.onKeyDown = function() {
switch (Key.getCode()) {
case Key.TAB :
trace("tab");
if (count>=1) {
count = 0;
} else {
++count;
}
colorChange(count);
break;
//case Key.ENTER :
//6-10 notes: will come back later to connect next mc
/*switch (count) {
case 0 :
_parent.attachMovie("date-time", "date-time", 1, {_x:0, _y:0});
break;

} */
break;
}
};
Key.addListener(keyListener);

//=============

stop();

Menu Trouble
OK. I tried to use the good old fashioned Track as Menu .fla for my site, only with some different changes. And when ever I try to make it so that it when the cursor moves over the button, it displays the part of the site, like Links, News, etc. But whenever I test out the site, this pops up:




Target not found: Target="../indicator" Base="_level0.instance7.instance9"

Thanks

Popup Menu Trouble
Hello,

I'm trying to make my popup menu hide. It appears in the RollOver, but it often delays in disappearing unless you roll over the menu button again.

The "reset" layer in the movie clip has the following action:

on (RollOver)> gotoAndStop ("Hidden")

and of course has the rectangle surrounding the entire menu to hide it. This rectangle does not appear until the keyframe in frame 6 of the timeline.

I can give more info if needed.

thx -

Drop Down Menu Trouble
I'm new to Flash, and am having trouble directing a dropdown button within a movie clip to a frame on the main timeline. I've got the basic 'On Release> GoTo Frame Label 'SpyCam' line, and have also tried a frame number. the buttons still do not work, but they will if they are on the main stage, outside a movie clip. Is there something I'm forgetting? Help please...=P

Menu Script Trouble
i want to have a menu like the one at the top of this site:
http://www.solidstaterecords.com

I have the easing down but I cant figure out how to make the objects stay with the mouse movements and change when i mouse-over the next menu item, instead it flys out and the next object flys in.

Trouble With A Sliding Menu
Hello everyone !

I'm currently experiencing problems while working on a sliding menu. Maybe one of you could help.

Here's how it works : the user moves its mouse on the left or right side of the screen in order to make the menu slide on the screen, and make appear different images. The movement of the sliding menu works properly in response to the movement of the mouse, but I just can't put more than 16 images, each 100 pixels wide. If I try to put 17 or + images, the 16 first images appear but not the other ones ... is it a size limitation (a movie clip couldn't be more than 1600 pixels wide ?) that prevents me from displaying the 56 images I want to put in my sliding menu ?

If anyone knows he/she would be of tremendous help to me.

Thanks

Bye ;-)

-> I'm working with Flash 5

Trouble With Popdown Menu
I am trying to create pop up/down menus like in the tutorial
http://www.flashkit.com/tutorials/Ac...-121/index.php
[url=http://www.flashkit.com/tutorials/Actionscripting/Creating-Brett_Ta-121/index.php[/URL]

i am using Flash MX and i can't get the onrollover command to work properly, no matter what script is used, the menu will only work with clicking the button.

Anyone have any suggestions?

Trouble With Drop Down Menu
Anyone help?

My drop down menu works fine except when you roll over two buttons or more quickly. Then two or more menus drop down and stay there?

Any ideas as how to prevent this?

Thanks


www.signandlight.com

Trouble With Dynamic Menu, Please Help
I am trying to make a dynamically loaded menu. I put together some code for it tonight, but it's just displaying a blank page. Anyone care to tell me what I'm doing wrong? Here's the code assigned to frame one of the main timeline, of which there is only one frame:
***********

//load menu names
loadVariablesNum ("menuNames.txt", 1);

//declaring variables
n = 1;
menuCount = menuNames.length + 1;
firstItemPos = 200;
menuSize = 200;

//set height of buttons
_root.buttonMovie._height = (menuSize - (1 * menuCount - 1)) / menuCount;

while (n <= menuCount) {

//position and resize menu graphic in container
this.createEmptyMovieClip ("menuContainer"+n, 1);
menuContainer[n]._x = 100;
menuContainer[n]._height = (menuSize - (1 * n +1)) / n;
menuContainer[n]._y = (1 * n - 1) + firstItemPos + _root.buttonMovie._height * n;
menuContainer[n].attachMovie("buttonMovie", "buttonMid"+n, 1);

//set the text and position of text part of menu
menuTextMovie.menuTextText._y = (1 * n - 1) + ((_root.buttonMovie._height / 2) * n);
this.createEmptyMovieClip ("textContainer"+n, 1);

//position the text container
textContainer[n]._x = 110;

//name this menu item based on the top array
textContent = [menu[n+1]];
textContainer[n].attachMovie("menuTextMovie", "menuTextMovie"+n, 3);

//position and name text in front of menu movie
menuContainer[n].attachMovie("textContainer"+n, "buttonFinal"+n, 5);
menuContainer[n].loadVariables("buttonVariables.txt");
n++;
};

***********
I also have the two text files mentioned above. They're saved in the same directory as the movie. One of them is a modified script from Moock's Actionscript Definitive Guide designed to make a movieclip function like a button. Here's buttonVariables.txt:
***********

onClipEvent (load) {
stop();
}

onClipEvent (mouseMove) {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && !buttonDown) {
this.gotoAndStop("over");
} else if (!hitTest(_root._xmouse, _root._ymouse, true) && !buttonDown) {
this.gotoAndStop("off");
}

updateAfterEvent();
}

onClipEvent (mouseUp) {
buttonDown = false;
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop("up");
unloadMovieNum (2);
loadMovieNum ([menu[n+1]]+"Movie.swf", 2);
} else {
this.gotoAndStop("over");
}

updateAfterEvent();
}


**********
And here's menuNames.txt:
**********


menu = new Array();
menu[0] = "home";
menu[1] = "featured creature";
menu[2] = "visitor info";
menu[3] = "map";
menu[4] = "games";
menu[5] = "guestbook";


***********
That's it! I have the right movie clips, one called buttonMovie and one called menuTextMovie, neither of which are nested in movie clips. The menuTextMovie has a dynamic text box inside called menuTextText, and the variable is set to textContent. What am I doing wrong?

Trouble With Draggable Menu
Hi - I've been working on a very cool menu bar that allows the user to not only drag it around as needed, but can also pull a menu down like a window shade.
I finally figured out how to put one together, alone on the screen. The first layer is the draggable bar (which is converted to a button, with start/stop drag actions - therefore with no reference to an Instance Name. The next layer is a rectangular mask and the third (masked layer) works like a window shade that you can pull down to reveal the copy or buttons, etc. This is a movie clip with a nested button - start/stop drag & constrain to rectangle actions are added.
When these elements are together alone on screen - they work fine when I test the movie. However, the big problem is, even when I recreate this menu window from scratch in another movie, it does not work on its own. When tested, the first layer (draggable bar) ends up being able to drag the entire content window.

Why is this happening? I would imagine it should retain its properties to work as it supposed to. I've tried turning the first layer's draggable bar into a movie clip, then nest the drag action in a button, but that only succeeds in liberating it from the window shade masked layer - which is now not draggable, but does go up & down.
HELP? Anyone? Thanks!

Trouble With Menu Item
OK. Below is the link to a .fla file of what I am working on. Once you get it, test the movie. The issue is with the group of links on the left side of the page. The bottom 3 links work just fine, but the top link (BIOGRAPHY) does not show up as a link, even thought I have the setting exactly the same as the other three links. Can anyone tell me why this is happening?

Thanks, in advance.

http://webpages.charter.net/dj_nrg/intro.zip

Silly Trouble With Xml Menu - Please Help
I am such a dork, I just can't get my head around this problem. I've spent countless hours trying to figure out what I've done wrong and am losing my mind.

I'm creating a menu from an xml doc and need to filter it based upon categories within each node. Unfortunatly when I filter down to specific categories it creates the menu with blank spaces for the filtered out nodes.

I've enclosed a stripped down file.

Please Help Me !!!!

Drop Down Menu Trouble
how do i create a drop down menu? is it an actionscript?

Please Help: Trouble With Sliding MENU Bar
Thanks for answering:


1)When I rollover my menu bar - it stutters as it slides out.
2) It sticks [meaning] for some reason it won't slide back in unless i rollover it again. It's not supposed to do that.

The site is available for viewing at http://www.roy-portfolio.com

Now here's the REALLY big problem...

My file is 18.7 MB so i cannot post it on this site. So what i can do is email it to you.

Thank You again.

-Royroytorres@msn.com

Trouble With Sliding Menu Bar
Hi - I sure could use your help.

Could you please take a look at my website, with particular attention to the MENU bar.

1) It stutters as it slides out.
2) sometimes it will not slide back in - unless i rollover it again.

I'm pretty sure it's an Action script problem, but i can't find the problem.

I welcome any Comments, Questions, or Suggestions you have to improve my site.

Warmest Regards.
-Roy roy-portfolio

[F8] Cascading Menu Trouble
i'm trying to use this - link to create a menu structure. I've managed to customise the look and the menu names, but I need the links to load various swf files.

here's the code


Code:
// Variables -----------------------------------------------------------------------
// Height of Mainmenu items
var homm = 20;
// Height of Submenu items
var hosm = 15;
// mm_array contains the main menu, sm#_array contains the sub menu items for menu #
var mm_array:Array = ["Printed Publications", "Web & Multimedia", "3D", "Exhibitions", "Maps & Plans", "Illustrations"];
var sm1_array:Array = ["Submenu 1", "Submenu 2", "Submenu 3", "Submenu 4"];
var sm2_array:Array = ["Submenu 1"];
var sm3_array:Array = ["Submenu 1", "Submenu 2", "Submenu 3", "Submenu 4", "Submenu 5"];
var sm4_array:Array = ["Submenu 1", "Submenu 2", "Submenu 3", "Submenu 4", "Submenu 5", "Submenu 2", "Submenu 3", "Submenu 4", "Submenu 2", "Submenu 3", "Submenu 4"];
var sm5_array:Array = ["Submenu 1", "Submenu 2", "Submenu 3", "Submenu 4", "Submenu 5"];
var sm6_array:Array = ["Submenu 1", "Submenu 2", "Submenu 3", "Submenu 4", "Submenu 5"];
var submenu_array:Array = [];
// Functions ------------------------------------------------------------------------
_global.$tweenManager.broadcastEvents = true;
// Main menu
function createMainMenu() {
var a = 1;
var total = mm_array.length;
while (a<=total) {
ypos = ((a-1)*homm)+1;
attachMovie("mainnav_mc", "mainnav"+a+"_mc", this.getNextHighestDepth()+100, {_x:0, _y:ypos});// attach the movieClip
var nc = this["mainnav"+a+"_mc"];
nc.menutext = mm_array[(a-1)];// set the title text for each button
nc.itemnum = a;// set the menu #
a++;
}
}
function moveMenu(num) {
if ((_root.collapsed == true) || (_root.selectedmenu != num)) {
var array = "sm"+num+"_array";
var totalsm = eval(array).length;
var totalmm = mm_array.length;
var a = 1;
while (a<=totalmm) {
mc = this["mainnav"+a+"_mc"];
if (a>num) {
var ypos = (((a-1)*homm)+1)+totalsm*(hosm+1);
mc.tween("_y", ypos, 0.5, "easeOutCubic");
} else {
var ypos = ((a-1)*homm)+1;
if (a == num) {
nypos = ypos;
mc.tween("_y", ypos, 0.5, "easeOutCubic", 0, onEnd(num, nypos));
} else {
mc.tween("_y", ypos, 0.5, "easeOutCubic");
}
}
a++;
}
_root.collapsed = false;
} else {
contractMenu()
_root.collapsed = true;
}
}
function onEnd(num, nypos) {
_root.num = num;
createSubMenu(num, nypos);
}
function contractMenu() {
var c = 1;
while (c<=submenu_array.length) {
removeMovieClip("subnav"+c+"_mc");
removeMovieClip("mask"+c+"_mc");
c++;
}
var g = 1;
while (g<=mm_array.length) {
ypos = ((g-1)*homm)+1;
this["mainnav"+g+"_mc"].tween("_y", ypos, 0.5, "easeOutCubic");
g++;
}
}
function createSubMenu(num, nypos) {
var array = "sm"+num+"_array";
var totalsm = eval(array).length;
var ypos = nypos+4;
var c = 1;
while (c<=submenu_array.length) {
removeMovieClip("subnav"+c+"_mc");
removeMovieClip("mask"+c+"_mc");
c++;
}
submenu_array = [];
var a = 1;
while (a<=totalsm) {
ypos = ypos+hosm+1;
attachMovie("subnav_mc", "subnav"+a+"_mc", a+30, {_x:0, _y:ypos});
if (num != mm_array.length) {
attachMovie("mask_mc", "mask"+a+"_mc", a+990, {_x:0, _y:0});
mask_mc = this["mask"+a+"_mc"];
mask_mc._alpha = 10;
mask_mc.onEnterFrame = function() {
this._height = _parent.container_mc["mainnav"+mm_array.length+"_mc"]._y;
};
this["subnav"+a+"_mc"].setMask(mask_mc);
}
nc = this["subnav"+a+"_mc"];
nc._alpha = 0;
nc.itemnum = a;
nc.menutext = eval(array)[(a-1)];
nc.alphaTo(100, 2);
trace ("main"+num+"_"+a+"sub.swf");
nc.onRelease = function() {// Function to get submenu actions needs to go here
var my_str:String = new String(this);

//_root.select = my_str.slice(18);
};
submenu_array.push("subnav"+a+"_mc");
a++;
}
}
// Build Menu -----------------------------------------------------------------------
_root.collapsed = true;
createMainMenu();

I'm tried putting
trace ("main"+num+"_"+[(a-1)]+".swf");
in the onRelease function at the end of the code, but it just returns the main menu number and the total number of sub menu items rather than the individual submenu number. if you put the trace function in before the onRelease command it returns all the submenu names...

i'm seriously confused, any help would be really appreciated!

Scrolling Menu Trouble
Hi all, i followed the following tutorial http://www.layoutgalaxy.com/html/htm...er49-page1.htm

but for some reason cannot get the buttons to work.

I can attach a http link to the individual buttons which work fine but if i attach;

on (release) {
gotoAndStop(5);
}


for some reason it doesnt work.


UPDATE:
ok i found out it might be better to have :
on (release) {
_root.gotoAndPlay("contact");
}

but the problem is when i link to a labelled frame the button, whenever i press the button more than once it jumps to the following frame? why would it do that if its linked to a particular frame?

also scroll is moved and one pressed it the scroll visibly jumps back to its starting scroll position. any ideas?




Can any one help me on this one??!!!!

thanks in advance

Rob

[F8] Animated Menu Trouble...
Hi.

I'm having a little trouble with an animated menu...

http://www.standardcraze.co.uk/flashmenu/

and here's the .fla file...

I need the submenu to animate out when the user either rolls above or below the menu area, or rolls over one of the other buttons.

Would it be easiest to do this using the y position of the cursor (i don't know how to do this).??

Anyway... if you could take a look and help me out in any way, it would be much appreciated.

Thanks

[F8] Rollover Menu Trouble
I'm working on a rollover menu with buttons. So far I have the buttons working and the rollover works, except I get a horrible hiccup in the rollover when the user maximizes the window and rollovers the menu beyond the stage.

I have it set up like this: I have a movieclip that is my slideout menu, inside it I have my buttons that will direct the user to various pages. I figured out how to get the buttons working by using onMouseMove for the slideout menu movieclip. The problem with this is that when the user rolls over the menu when it's outside the stage area ( to the right of the stage in the file), it still works. So I'm guessing I would need to come up with a way to restrict it to the stage area only, but I don't know if this is right or how to tell it to do this. I also thought that if there was a way to fix the window size so the user can't maximize the project would also be a solution, but again I don't know if this is possible or how to do so.

I've cut my project down to the bare bones to show you what's happening. There is the mainTest.swf which loads the menuTest.swf into it. Launch the mainTest.swf, maximize the file, and then rollover the area to the right of the stage to see what I'm talking about. If anyone could help me or point me in the right direciton, I would be very greatful.

Trouble With Drop Down Menu
hi, I need to make a drop down menu, and found a good one on flashkit
http://www.flashkit.com/movies/Inter...1763/index.php

the problem is, the buttons in it link to a url, what I would like to do is link to a frame in my flash document. so on for example About Us- Our history on that menu, I would put instead of the GetUrl command GotoandPlay (4).

Of course the problem is I want to root to a frame in my main flash timeline, whereas the buttons of this menu are inside of an mc thus rooting to the frame inside the MC.. so I would have to know the code to root to my main timeline
something like GotoandPlay ("maintimeline", 4) or whatever...

i recon I would have to give that frame a "frame label" for example call it history and then do Gotoandplay (history)??

any help would be great! thanks a lot guys!

Rotating Menu Trouble
I have one trouble with this FLA file. How to keep each button stay RIGHT SIDE UP while being rotated? Please enlighten me. I'm not sure what I miss something to keep buttons stay RIGHT SIDE UP.

here's the code for rotating menu:


Code:
//Global Variable
_global.Speed = 10;

//Main onEnterFrame event handler for Rotation_Holder
Rotation_Holder.onEnterFrame = function ()
{
var stageCentre = Rotation_Holder._x;
var acceleration = _root._xmouse - stageCentre;
var braking = 1;
if (this.hitTest (_root._xmouse, _root._ymouse, true))
{
braking = 5;
}
var rotation = Speed * acceleration / 100 / braking;
this._rotation += rotation;
};

//CACVRS Event Handlers
Rotation_Holder.vrs1.vrs.onRollOver = function ()
{
_root.optionvalue = "CACVRS website";
};
Rotation_Holder.vrs1.vrs.onPress = function ()
{
getURL ("http://www.cacvrs.org", "_self");
};

//COMM Event Handlers
Rotation_Holder.comm1.comm.onRollOver = function ()
{
_root.optionvalue = "Communication Programs";
};
Rotation_Holder.comm1.comm.onPress = function ()
{
getURL ("http://www.cacdhh.org/communication.html", "_self");
};

//MSDB Event Handlers
Rotation_Holder.msdb1.msdb.onRollOver = function ()
{
_root.optionvalue = "MSDB Programs";
};
Rotation_Holder.msdb1.msdb.onPress = function ()
{
getURL ("http://www.cacdhh.org/msdb.html", "_self");
};

//OLDSVC Event Handlers
Rotation_Holder.old1.old.onRollOver = function ()
{
_root.optionvalue = "Older Adult Services";
};
Rotation_Holder.old1.old.onPress = function ()
{
getURL ("http://www.cacdhh.org/olderadultsvc.html", "_self");
};

//REDSVC Event Handlers
Rotation_Holder.res1.res.onRollOver = function ()
{
_root.optionvalue = "Residential Services";
};
Rotation_Holder.res1.res.onPress = function ()
{
getURL ("http://www.cacdhh.org/residentalsvc.html", "_self");
};

//TERPSVC Event Handlers
Rotation_Holder.terp1.terp.onRollOver = function ()
{
_root.optionvalue = "Interpreting Services";
};
Rotation_Holder.terp1.terp.onPress = function ()
{
getURL ("http://www.cacdhh.org/terpsvcs.html", "_self");
};

// Button fading handler
function fadeButton ()
{
if (this.hitTest (_root._xmouse, _root._ymouse, true))
{
if (this._alpha > 50)
{
this._alpha -= 10;
}
}
else if (this._alpha < 100)
{
this._alpha += 10;
}
}
Rotation_Holder.old1.onEnterFrame = fadeButton;
Rotation_Holder.comm1.onEnterFrame = fadeButton;
Rotation_Holder.msdb1.onEnterFrame = fadeButton;
Rotation_Holder.vrs1.onEnterFrame = fadeButton;
Rotation_Holder.res1.onEnterFrame = fadeButton;
Rotation_Holder.terp1.onEnterFrame = fadeButton;

Trouble With XML-Driven Menu
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: http://www.itsonmessage.com/folio/portfolio.html

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);

Activated Menu Trouble
I was using the Activated Menu with MC Tween example as a base for the menu on a site I'm currently building. I had everything working fine in my test file, but when I brought the code over to my working file the menu broke. I was stumped as to why but after checking the publish settings I think I found the problem. The sample file I downloaded is setup for Flash Player 6 and ActionScript 1.0, while my working file is setup for Flash Player 9 and ActionScript 2.0. Anyone have any suggestion on what to change so that the code works in Flash Player 9 and AS 2.0? I'm also open to other suggestions on how to approach the menu.

For reference here's the code:

// Includes the tweening extensions.

#include "mc_tween2.as"


// Assigns each button its own functions.


// This is an array, a list of the buttons used.
var navButtons = [this.films_nav_mc, this.services_nav_mc, this.contact_nav_mc, this.flipstream_nav_mc];

// Loops on all buttons from the first to the last one
for (var i=0; i<navButtons.length; i++) {
// Sets its original X value. This will be used later for reference.
navButtons[i].originalX = navButtons[i]._x;


navButtons[i].onRollOver = function() {
this.tween("_x", this.originalX + 20, 1);
this.gotoAndStop("hover");
};
// When the mouse exits the menu option move back to Original X.
navButtons[i].onRollout = navButtons[i].onReleaseOutside = function() {
this.tween("_x", this.originalX, 0.5);
this.gotoAndStop("normal");
};
// When the mouse clicks.. activate it!
navButtons[i].onRelease = function() {
this._parent.activateItem (this);

this.gotoAndStop("active");
//trace ("Hey, button "+this+" was clicked.");
};
}

this.activateItem = function(item) {
// Function that activates a button.

// Checks if there's an activated item already; if so, deactivates it.
if (this.currentItem != false) this.deActivateItem();

// Activates it, finally
this.currentItem = item;
//this.currentItem.alphaTo (50, 1); // makes it 'disabled'
this.currentItem.gotoAndStop("active");
this.currentItem.enabled = false; // makes it a disabled button, so it won't receive mouse events
};

this.deActivateItem = function() {
// Deactivates the current activated menu item.
this.currentItem.enabled = true; // back to a normal button/movieclip
//this.currentItem.alphaTo (100, 0.5); // back to its original opacity
this.currentItem.tween("_x", this.currentItem.originalX, 0.5); // back to its original position
this.currentItem.gotoAndStop("normal");
this.currentItem = undefined;
};

this.stop();


Thanks!

Trouble With Menu...can't Figure This Out.
Hi guys,

I don't think I've posted this here before, If I have, I appologize. My memory is really bad...

Ok, here's a brief background on the project: I discovered this fla on a Flash resource site (maybe here, can't remember where I found it ). Its a dynamic menu system. I read the comments in the AS and learned how to customize it. I successfuly added links to the sub navigation, but I've run accross an issue I can't seem to figure out on my own.

Here's the Problem:
My issue is that several of my customized, top level buttons don't have sub catagories...I need to link these top level buttons to a html sub page. I'm having trouble figuring out how to create an array that will accomidate these buttons that need to be linked. Some of the vars are in Italian... Just thought I'd warn you. It really doesn't matter though..everything else is in English, for those of us who don't speak Italian.

I would really appreiate your help. I'm working in Flash MX , incase you need to know. I've attached the file if anyone feels like looking at it for me. The sub catagories are currently linked to the same page...I'm in the process of redesigning this site and needed to test the links to the old site.

I would GREATLY appreciate your help.

Masked Menu Trouble
I'm trying to create a menu like the one found on this site: Mountain Workshops only one that rolls up, not down.

I know it's masked, and on a sperate mc, but I can't for the life of me figure out how to get the mask to say moved down after i click on the menu.

I've looked all over the tutorials and downloaded the menu here. i just can't figure out how to make it roll up, not down.

It could be i'm just tired, but some of the script i'm not sure how to manipulate to get it to work if i try to recreate the menu else where to make it roll up, not down.

Thanks in advance

Rollover Menu Trouble
I'm a bit new to the whole rollover menu concept but I think I'm getting the hang of it. Now, on a website I'm designing for my own personal use, i have the main menu system in one movie clip. In that movie clip there are four other movie clips which contain the animation and scripting for the rollover parts. The rollover part works fine, when i roll my mouse over the movie clips they play an animation, and when i roll off they reverse the animation, but I'm having some difficulty linking the rollover buttons to play a certain frame in the timeline. for the first button that happened to be the "contact us" button, i used

on(release){
_root.play();
}

I used "_root." because when i just put "play()" it would just play the interior timeline (i couldn't think of anything else to call it) of the movie clip. **Remember that i'm adding actionscript to movieclips inside one big movie clip**. And "_root.play()" worked fine. It played the set of "contact us" frames and i added another script to the end frame so it would redirect me back to the main menu. the second rollover movieclip ("games") however, is giving me much more trouble. i added the actionscript

on(release){
_root.gotoAndPlay(284);
}

because theoretically, if the first one worked this one should work too. Except this is were it begins to get perplexing...whenever i publish or preview the movie to test the buttons, the first "contact us" button works fine, but when i get to the "games" button, instead of directing me to the 284th frame, it directed me to the 284th frame of a completely different scene. the scene where the intro to my site plays.
So forgive me for the long message but help would be much appreciated. I've been working with flash in my spare time for a little under a year now I can't help to shake the feeling that the problem is something obvious.







Attach Code

on(release){
_root.play();
}

Trouble With Tabbed Menu
I'm a Flash newbie. I'm trying to create a tabbed menu in Flash similar to this one. On mine however, when you click on the different buttons you go to another web page and that is working fine. Also the rollover text works fine too. However, I'm having trouble figuring out how to keep my tab in the "down" state. On the iTab example previously mentioned, the selected menu tab defaults to "Menus" and remains so until the user selects another tab. In the down state, a raised or slightly enlarged tab is shown. Thanks in advance.

Trouble With Pull Down Menu
Hi I'm new to this forum and relatively new to Flash (only had a couple Flash 8 classes) So I'm not positive that my problem is directly related to the action scripting but since I know next to nothing about action scripting, it probably is.
Here is my problem:
I'm trying to use a pulldown menu designed by Ken Brown (a copy of his method is at the bottom of my post). When I created it in a new flash file it works wonderfully, but when I placed it within another Flash scene it acts as though there is no defined "Hit area" for the button (the menu items stutter on and off as you roll the cursor over the button type). I've double checked the "hit zones" for the buttons, and even rebuilt this pulldown menu several times, but it acts the same every time. I'm at a loss as to how to fix it.
Here is a link to the Menu Buttons in a separate file (working properly): Working Pulldown Menu

and heres a link to the same buttons in my scene (they are the "men" and "women" buttons and you can skip the intro if you are in a hurry): Broken Pulldown Menu

and here is the description of Ken Brown's Pulldown Menu and the action scripting it uses:

( All right, start off making the title button of your menu, make it a button, and then put it in the first frame of a movie clip, label the first frame "off" (without quotations). After that, put the 'stop' action on the first frame. Make sure the "menu title" button you put in frame 1 is also in frame 2 (hit F6 to create the keyframe in frame 2 to copy the button from frame 1). Make the second frame consist of the title button and any buttons you want for that particular menu (to pull down), label that frame "on" (without quotations), and ad the 'stop' action to that second frame. Then go back to your scene, and attach this code to an instance of your movie clip:
onClipEvent(load){
//is the cursor over the movie clip
previouslyOver=false;
}
onClipEvent(enterFrame){
currentlyOver=this.hitTest(_root._xmouse,_root._ymouse,true);
//if there is a change, go to another frame
if(!previouslyOver and currentlyOver){
previouslyOver=true;
this.gotoAndStop("on");
} else if (previouslyOver and !currentlyOver){
previouslyOver=false;
this.gotoAndStop("off");
}
})

Oh, and thanks in advance for any help. It will be greatly appreciated.

Trouble With Two Tiered Menu
Hi there guys, I read with interest some of the tutorials on this site and am trying to an achieve a menu system where the reverse rollout script is used. This works fine, but the code from this seems to be stopping any other sub buttons I add from working.

Can anyone help?

I'll attach the fla if it helps.

Sorry If my explaination is a bit vague, I'm still struggling with actionscript.

Many thanks for any help.

Michael

Trouble With Slider Menu
Hey guys,

Im using the slider menu and my question is how do i activate the slider without actually rolling over or clicking the links?

Reason being is that i have shortcut links on other external swfs that i'm calling and i have no problem jumping frames into the appropriate links but slider stays in the original position/link and doesn't move to the appropriate link/page.

Thanks in advance for any help!

Trouble With Xml Drop Down Menu
I am using Flash CS3 Pro working with AS2.

i completed the tutorial here at kirupa on the XML drop down menu. It was fantastic. I was trying to alter it for what i need to do and i am running into some problems that i was hoping to get some help on.

I have been playing with the code and am having a hard time with the submenus. The sub items need to have a different background altogether. I basically need a menu bar background with labels. Then the background of the sib items need to be a different color. My client specifically requested a menu similar to this one:

http://www.thepecans.com

It, obviously doe not need to be exact, but the basic idea is what they are after. I can handle the alpha fades and the mask that gives the illusion of them dropping down. But i can't for the life of me get the sub item background to cooporate. I am having problems with the depth i think.

I did manage to alter the kirupa code (that i followed along with) to make a horizontal menu. can anyone please help me with this? I would be soo grateful. It is really beginning to rack my brain. I don't know if the best way is to attachMovie for the sub item backer or to populate an empty movie clip to help with the depth issue. I will keep trying variations, but any help would be greatly appreciated.

thanks alot!

Trouble With Menu Buttons...can Someone Help?
Hello,

I would say I am so-so with Flash. In redesigning the new web site for my band's CD release, I've hit a snag and I'm stumped to say the least. At URL I was able to conquer scrolling the web site. I was able to figure out quite a bit, but something this simple has tripped me. So here's the deal. I have a list of text words (News Bio Media Shows Pics Links Reviews) at the top of the new page I'm working on. Each is a button. When I click on say, News, I am wishing to open a separate movie file (named "Test" at this point). Each of these movie files will actually wind up being separate info pages for the band. What happens right now? Well, I've tried a few different script attempts, and one time actually had it open the first movie where I wanted it...but then the rest of the buttons were null and void. At that point, none of the buttons did anything. The movie played once (a simple fade in tween).
So, my question is...how can I make this menu work properly, where each button will freely open a separate movie below and to the left of the menu? Where did I go wrong?

Some of the scripts I've tried:

on (release) {
gotoAndPlay("Scene 1", "News");
}

on (release) {
gotoAndStop (2) < where it is in the frames
}

on (release) {
gotoAndStop ("Mains", "News", 2) <error given for the 2, Mains is the 2nd layer, News is the names 2nd frame.

Any help would be grealy appreciated!!

Thanks so much in advance!

Ace

Dynamic Menu Trouble
I have a dynamically generated menu that I have created. The menu will generate correctly, but I cannot get it to go to any frame other than 2. It is probally something stupid. Any help would be greatly appreciated.

images = new Array("test1.jpg", "test2.jpg");
imageCount=images.length;
offset=40;
for (i=1;i<=imageCount;i++){
_root.nav.buttons.createEmptyMovieClip("clip_"+i,i);
_root.nav.buttons["clip_"+i].createEmptyMovieClip("button_"+i,i);
_root.nav.buttons["clip_"+i]["button_"+i].loadMovie("images/"+images[i-1],i);
_root.nav.buttons["clip_"+i].onPress = function(){
_root.gotoAndStop(i-1);
}
if(i!=1){
_root.nav.buttons["clip_"+i]._y = _root.nav.buttons["clip_"+(i-1)]._y+_root.nav.buttons["clip_"+(i-1)]._height+offset;
}
}

Trouble Following Popup Menu Tutorial
I've been following the tutorial for building a pop up menu on this site at: http://www.flashkit.com/tutorials/Ac...-121/index.php but I keep running into problems at step 5. I believe I have followed the steps correctly and when, at the end of page 5, I try to test the movie I get the following message:

**Error** Symbol=PopMenu, layer=MenuButton, frame=1:Line 1: Syntax error.
On (RollOver) {

Total ActionScript Errors: 1 Reported Errors: 1

To put the code in I click on the MenuButton while in the PopMenu sub movieclip and just paste the text into the actionscript editor - is that right? I am using Flash MX 2004 and it looks like the tutorial is for an older version of Flash do I need to use some different code, if so could someone please let me know what I should use instead.

It's possible I've messed up following the instructions, I'm not brilliant at flash so I've included what I've got so far in case anyone can figure it out. The menu sort of appears when over the text of the menu so it sort of half works!!!

A Bit Of Trouble.. Root Menu Issue
Hey there,

I was wondering if I could get a hand with this.

I'm using this actionscript to run a retracting drop down menu.

set("_root.menu1.link1.theTitle", "Company Profile");
set("_root.menu1.link1.theLink", "http://www.link.com");

and everything is working fine.. but when I hit the link the information is loading into a blank window. Is there a way for me to have it load into the self target? I can't seem to figure it out..

Thanks in advance for any help.

PS
I'm running Flash 6.

Trouble Cusotmizing Bolitas_mx.fla Menu
hey there

I found a cool interface in the movies section. I want to replace the gfz and anim, no problem, but I can't seem to figure out how to customize the rollover text or links.

does anyone know how to do this with this file?

thanks for any help!

Steve

Trouble With Animated Button Menu
Hi,

I am trying to create an animated button menu much like the one on www.2advanced.com (at the top, the menu drops down on rollover).

My problem is that when the user rolls over a button in the menu, the menu closes because the focus is now on the button inside the menu. I would like the menu to remain open while the users mouse is "with-in" the menu area whether the mouse is over a button (inside the menu) or not.

This is real basic and simple. The method I used probably didn't work because I placed a button inside a button. So I guess my question is, what method do I use to make this menu work properly. I haven't used Flash in about a year, and I was never really that good with it. Can anyone point me in the right direction or know of a tutorial that will help me out?

Thanks!

Trouble With Easing Menu Concept
hi,

i have been trying to create something more original out of the overly-used 'easing menu' and resizing images effect. following is my code:


PHP Code:



onClipEvent (load) {
    _root.targetx = 0;
    _root.targety = 240;
    speed = 4;
    _root.onEnterFrame = function() {
        _x += (_root.targetx-_x)/speed;
        _y += (_root.targety-_y)/speed;
    };
}
onClipEvent (enterFrame) {
    if (_y == targety && _x == targetx) {
        delete this.onEnterFrame;
    }





i have this code on mc1, which is a square mask. i have attached this/similar code to each button:


PHP Code:



on (release) {
    _root.targetx = 260;
    _root.targety = 240;





this all works fine and dandy when i only have one mc (which is how the easing menu stuff works). however, how can i get this to work using 2+ mcs/masks? i understand paths/root stuff, but it doesn't seem to work here? my plan was to make 4 mc/masks, that would slide in, one after the other; ie, when one stops, the other slides in, and so forth.

does anyone know how to do that? (i would have attached my .fla, but i have mx04, and most of you probably wouldn't be able to open it - i've tried already, and it says "unexpected file format" with plain mx).

looking forward to any solutions,
-h

Easing Menu > OnClipEvent Trouble..
Thanks to this tutorial I was able to come up with a pretty cool sub menu system, but I wanted to take it a step further.. I was trying to add a menu marker (blue line with arrow in sample) that slides from side to side to mark which sub menu the user was viewing. The problem is that I can either get the sub nav to scroll OR I can get the marker to work but not both at the same time. How can I combine the code so that they both work?

You can see a sample here and download source files here.

Thanks for your help!

Flash Mx Flyout Menu Trouble
Great Board - Excellent Topics. You folks are brilliant creative minds.

Thank you ALL in advance for your help.

I'm new to FLASH MX and I'm having a bit of trouble (go figure).

I've been following this tutorial ...

http://www.cbtcafe.com/flash/flyoutm...youtmenus.html

It is the closest one I could find for the effect I want to create. It is for Flash 5 and I'm not certain how much of a difference there is between 5 and MX.

Everything works out just fine until I get to the actionscript for the Main Menu rollover ...

Main Menu Actionscript as stated in the tutorial

on (rollOver) {
gotoAndPlay ("over");
}


RETURNS THIS ERROR when I check the script:

Symbol=MasterMenu_MC, Layer=MasterMenu, Frame=1: Line 1: Mouse events are permitted only for button instances
on (rollOver) {

End result ... the rollover does not work at all when testing.

I created my text - then converted it to a button and then converted it to a movie as instructed.

Normal Mode or Expert Mode ... both return the same results. What does this mean and how do I overcome the issue?

Any help would be greatly appreciated. Thanks again.

Duplication Trouble With Scrolling Menu
Can anyone tell me what I am doing wrong with this scrollbar. It only seems to duplicate the strip every second time.

I can't seem to figure it out, and I am still learning how to use flash.

I ahd it working on the main timeline in another test I did, but due to masking and other things, I want it contained within the movie clips as I have here (see file)

Any flash guru assistance would be great.

Cheers.

Trouble With Tutorial - Sliding Menu
I'm trying to follow this tutorial -- I can't seem to get it to work. There aren't any steps along the tutorial that are particularly confusing. The only thing I noticed weird is when I copy and paste the ActionScript it loses all the indentation / formatting.

I've hosted the .fla I came up with, I'm hoping someone can point out the mistake I've been making I'm using Flash 8 on Mac OSX if that makes a difference.

Copyright © 2005-08 www.BigResource.com, All rights reserved