Bonsoir, sa fait des heures que je bataille avec un menu flash.
Je voudrai créer des lien a partir de ce menu (que j'ai téléchargé), je ne vous cache pas que je n'y connais pas grand chose!
voici mon script .fla d'origine.
/* Menu Handling + Menu Vars ---------------------------------------------------------------------- */ var colours:Array = [ [0xFA9D76, 0xC91D0A], [0xF7C970, 0xC7630A], [0xE4F873, 0xC5BF0A], [0xAEF673, 0x7BC30A], [0x71D8F6, 0x0AB7C2], [0x7095F5, 0x095BC0], [0xE870F3, 0x8F0CBF] ]; var menu:Array = [{title:"Acceuil"},{title:"confreries secrêtes"},{title:"Conspirations"},{title:"Mystères"},{title:"New world order"},{title:"Documentaires"},{title:"Liens"}]; function buildMenu(menu) {
while (Math.random() > 0.1) { colours.next(); } // randomize the colours enableButtons(100*menu.length+100); // after an interval, allow the user to click on the navigation buttons for (i=0; i<menu.length; i++) {
// Create the segment of the menu: // + Draw, Position, Account for in main array var item:MovieClip = _root.createEmptyMovieClip("segment_"+_root.getNextHighestDepth(), _root.getNextHighestDepth()); item.drawSegment(Math.PI*2*i/menu.length, Math.PI*2*(i+1)/menu.length, 100, colours.next()); item._x = Stage.width/2; item._y = Stage.height/2; allSegs.push(item);
// Apply the properties from the object to the segment for later use item.props = {}; for (j in menu[i]) { item.props[j] = menu[i][j];s }
Marsh Posté le 26-10-2009 à 02:31:15
Bonsoir, sa fait des heures que je bataille avec un menu flash.
Je voudrai créer des lien a partir de ce menu (que j'ai téléchargé), je ne vous cache pas que je n'y connais pas grand chose!
voici mon script .fla d'origine.
/* Menu Handling + Menu Vars
---------------------------------------------------------------------- */
var colours:Array = [
[0xFA9D76, 0xC91D0A],
[0xF7C970, 0xC7630A],
[0xE4F873, 0xC5BF0A],
[0xAEF673, 0x7BC30A],
[0x71D8F6, 0x0AB7C2],
[0x7095F5, 0x095BC0],
[0xE870F3, 0x8F0CBF]
];
var menu:Array = [{title:"Acceuil"},{title:"confreries secrêtes"},{title:"Conspirations"},{title:"Mystères"},{title:"New world order"},{title:"Documentaires"},{title:"Liens"}];
function buildMenu(menu) {
while (Math.random() > 0.1) { colours.next(); } // randomize the colours
enableButtons(100*menu.length+100); // after an interval, allow the user to click on the navigation buttons
for (i=0; i<menu.length; i++) {
// Create the segment of the menu:
// + Draw, Position, Account for in main array
var item:MovieClip = _root.createEmptyMovieClip("segment_"+_root.getNextHighestDepth(), _root.getNextHighestDepth());
item.drawSegment(Math.PI*2*i/menu.length, Math.PI*2*(i+1)/menu.length, 100, colours.next());
item._x = Stage.width/2; item._y = Stage.height/2;
allSegs.push(item);
// Apply the properties from the object to the segment for later use
item.props = {};
for (j in menu[i]) {
item.props[j] = menu[i][j];s
}
// Tween into view
item._xscale = item._yscale = 0;
setTimeout(item, "bounceScale", i*100, 100);
// Set up actions
item.onRollOut = item.onReleaseOutside = function() {
_root.hideToolTip();
this.bounceScale(100);
}
item.onRollOver = function() {
_root.showToolTip(this.props.title);
this.bounceScale(120);
}
item.onRelease = function() {
this.onRollOut();
_root.output.output.text = this.props.title;
_root.destroyMenu();
}
}
logo.swapDepths(_root.getNextHighestDepth());
}
// removing the menu:
function destroyMenu() {
endLogoTrick();
setTimeout(this, "destroyMenuWatch", allSegs.length*100, false);
for (i in allSegs) {
delete allSegs[i].onRollOver, delete allSegs[i].onRollOut, delete allSegs[i].onRelease;
setTimeout(allSegs[i], "bounceScale", i*100, 0);
}
}
function destroyMenuWatch(prop, newVal, oldVal) {
if (prop === false) {
scaleSegs.watch("length", destroyMenuWatch);
} else {
if (newVal == 0) {
for (i in allSegs) {
allSegs[i].removeMovieClip();
}
scaleSegs.unwatch("length" );
allSegs = new Array();
scaleSegs = new Array();
buildMenu(menu);
}
}
}
function enableButtons(a) {
if (a === true) {
//startLogoTrick();
logo.enable(true);
MovieClip.prototype.enabled = true;
} else {
setTimeout(_root, "enableButtons", a, true);
}
}
---------------------------------------------------------------------------
J'ai cru comprendre qu'il fallait que j'insere la commande pour chaque bouton
on (release) {("???" )
getURL("ma_page.html" );
}
mais où dois-je l'insérer. Que dois-je modifier dans le script a part cette commande svp?
Je vous serai reconnaissant de m'aiguiller .
Merci d'avance!