Ok så har jeg en løsning, men min markerings dims virker ikke, fordi roll-overs'ne blander sig i hinanden, hvordan undgår man det?
Webeksempel link:
http://www.chainreact.dk/test/test2.swfKildefiler link:
http://www.chainreact.dk/test/test2.zipKode:
stop()
// ANIMATION ENGINE - - - - - - - - - -
import caurina.transitions.Tweener;
//MENU - - - - - - - - - -
//MENU ROLLOVER STUFF - (USING: TWEENER AS3 version -
http://code.google.com/p/tweener/)
//mMenu.sIntro.buttonMode = true;
buttons(mMenu.sIntro);
buttons(mMenu.sNews);
buttons(mMenu.sFactual);
buttons(mMenu.sFictional);
buttons(mMenu.sServices);
buttons(mMenu.sProfile);
buttons(mMenu.sAdress);
buttons(mMenu.sEmail);
function buttons(a:Object):void {
a.sBlack.alpha = 0.0
a.addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
function rollOverHandler(event:MouseEvent):void {
Tweener.addTween(event.target.sBlack, {alpha:1.0, time:0.0, transition:"linear"});
}
a.addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
function rollOutHandler(event:MouseEvent):void {
Tweener.addTween(event.target.sBlack, {alpha:0.0, time:0.5, transition:"linear"});
}
}
// YELLOW MARKER STUFF
marker(mMenu.sFront);
marker(mMenu.sProductions);
marker(mMenu.sCompany);
marker(mMenu.sContact);
function marker(a:Object):void {
a.addEventListener(MouseEvent.ROLL_OVER, markOver);
function markOver(event:MouseEvent):void {
Tweener.addTween(mMenu.marker, {x:a.x, time:0.5});
//trace(a.x);
}
/*
a.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
function mouseOutHandler(event:MouseEvent):void {
Tweener.addTween(event.target., {alpha:0.0, time:0.5, transition:"linear"});
}
*/
}
Last edited by Janmansilver : Today at 11:26 AM.
Today, 04:51 PM #2
Janmansilver
Junior Member
Join Date: Feb 2006
Posts: 13
Improved, but still issues with the yellow marker
I've solved the black-highlighters, but I'm still having problems with how to do the yellow indicator correctly.
New swf:
http://www.chainreact.dk/test/test2.swfNew source:
http://www.chainreact.dk/test/test2.zipCode:
stop()
// ANIMATION ENGINE - - - - - - - - - -
import caurina.transitions.Tweener;
//MENU - - - - - - - - - -
//MENU ROLLOVER STUFF - (USING: TWEENER AS3 version -
http://code.google.com/p/tweener/)
//mMenu.sIntro.buttonMode = true;
buttons(mMenu.sIntro);
buttons(mMenu.sNews);
buttons(mMenu.sFactual);
buttons(mMenu.sFictional);
buttons(mMenu.sServices);
buttons(mMenu.sProfile);
buttons(mMenu.sAdress);
buttons(mMenu.sEmail);
mMenu.sIntro.sBlack.alpha = 100;
var mOn:Object = mMenu.sIntro;
function buttons(a:Object):void {
//a.sBlack.alpha = 0.0;
a.addEventListener(MouseEvent.MOUSE_UP, mouse_upHandler);
function mouse_upHandler(event:MouseEvent):void {
if (mOn != a) {
Tweener.addTween(mOn.sBlack, {alpha:0.0, time:0.5, transition:"linear"});
}
mOn = a;
}
a.addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
function rollOverHandler(event:MouseEvent):void {
Tweener.addTween(event.target.sBlack, {alpha:1.0, time:0.0, transition:"linear"});
}
a.addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
function rollOutHandler(event:MouseEvent):void {
if (mOn != a) {
Tweener.addTween(event.target.sBlack, {alpha:0.0, time:0.5, transition:"linear"});
}
}
}
// YELLOW MARKER STUFF
marker(mMenu.sFront);
marker(mMenu.sProductions);
marker(mMenu.sCompany);
marker(mMenu.sContact);
function marker(a:Object):void {
a.addEventListener(MouseEvent.ROLL_OVER, markOver);
function markOver(event:MouseEvent):void {
Tweener.addTween(mMenu.marker, {x:a.x, time:0.5});
//trace(a.x);
}
/*
a.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
function mouseOutHandler(event:MouseEvent):void {
Tweener.addTween(event.target., {alpha:0.0, time:0.5, transition:"linear"});
}
*/
}