|
-
[F8] Please help, I'm gonna commit suicide
I have a problem with an horizontal drop menu, the menu is supposed to appear from left when I click on "menu" and hide again whien I click on "menu", It used to work fine till I've edited the differents buttons in the menu moviclip, please take a look, it's in the french part.
here's the fla in rar
-
-
it appears by itself, that's the problem in fact, sorry.
-
Senior Mamba
Delete all your code from the menudo-movieclip. Instead, put this on the corresponding frame:
code: menudo.speed = 0;
menudo.onRelease = function() {
if (menudo._x>0) {
menudo.speed -= 640/8;
} else {
menudo.speed += 640/8;
}
};
menudo.onEnterFrame = function() {
this._x += this.speed;
// ease function
this.speed *= 0.90;
};
And please - don't commit suicide.
-
thanks a lot, you saved my life!
-
hum!..this doesn't work actually :(
I've made what you sais and the horizontal drop menu move correctly from right to left, but now the buttons that ares inside the menu does not work and they don't take me where I'm supposed to go.
Could you have a last look....my life is still in danger.
here's it is (in RAR)
-
Senior Mamba
Ok, delete the code I provided. Also delete the code you have on your menu button (instance of "Schalter"). Instead, assign an instance name to "Schalter" and paste this code into the frame that holds the Schalter-button: code: _root.menudo.speed = 0;
instancenameofSchalter.onRelease = function() {
if (_root.menudo._x>0) {
_root.menudo.speed -= 640/8;
} else {
_root.menudo.speed += 640/8;
}
};
_root.menudo.onEnterFrame = function() {
this._x += this.speed;
this.speed *= 0.90;
};
Sorry about that...
-
Flash Incompetent
I couldn't find the menu, the english button didn't work and the francais button just led to an intro which kept looping infinitely...
-
-
check it! Do you think it's possible to....
Hey! I've done it, there's still some thing to arrange about fonts but I want to ask you if you think it's possible to make that the buttons stay blue when you're in the selected section.
exemple: click on french>reportages> pick any...do you see that the button "reportages" is blue just on rollover? Is it possible to make it stay blue when you're in reportages?
here it is
-
Senior Mamba
Certainly isn't possible as long as you don't provide any source files / code.
-
Hi, thanks for being there, which source code should I provide to make each button change colo when I'm in a specific section? is it too difficult? what do u suggest?
Panchoskywalker.
-
Senior Mamba
-
right...but...
Thanks, I did it for "reportages" button, the thing is that there are also other buttons, so what can I do for that "reportages" go back to grey when I click on another button?
check it
-
Senior Mamba
I guess arrays would be an option.
What the following code basically does is telling each button to access its correlating element in a predefined array named "myArray":code: var myArray:Array = new Array("home", "reportages", "voyages", /* etc. */);
function inArray(ar:Array, search:String) {
for (var i in ar) {
var obj = _root[ar[i]];
if (ar[i] == search) {
obj.gotoAndStop("blue");
} else {
obj.gotoAndStop("grey");
}
}
}
home.onRelease = function() {
inArray(myArray, "home");
};
reportages.onRelease = function() {
inArray(myArray, "reportages");
};
voyages.onRelease = function() {
inArray(myArray, "voyages");
};
// etc.
Further reading:
http://www.kirupa.com/developer/actionscript/array.htm
http://www.kirupa.com/developer/acti...lues_array.htm
Hope this helps,
aut.
-
interesting...
Hi, I've tried withe two buttons "voyages" and "reportages", I still don't get that these buttons get grey when I click on the otherone.
I've put this array in the frame label grey, blue and active. I don't know where does the variable change when I click on a button...do you think I'm doing well?
I think I've have to ad some code in the active status, so it goes back to grey when the variable change.
var myArray:Array = new Array("home", "reportages", "voyages", "recherche", "publications", "expo", "bio", "contact");
function inArray(ar:Array, search:String) {
for (var i in ar) {
var obj = _root[ar[i]];
if (ar[i] == search) {
obj.gotoAndStop("blue");
} else {
obj.gotoAndStop("grey");
}
}
}
home.onRelease = function() {
inArray(myArray, "home");
};
reportages.onRelease = function() {
inArray(myArray, "reportages");
};
voyages.onRelease = function() {
inArray(myArray, "voyages");
};
recherche.onRelease = function() {
inArray(myArray, "recherche");
};
publications.onRelease = function() {
inArray(myArray, "publications");
};
expo.onRelease = function() {
inArray(myArray, "expo");
};
bio.onRelease = function() {
inArray(myArray, "bio");
};
contact.onRelease = function() {
inArray(myArray, "contact");
};
here's the site
here's the fla
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|