Hey guys,
Still quite new to AS3. I suppose this might be a bad thing but gotten I’ve to a point where even when I’ve gotten something to work, I’ll try to make the code more efficient. I’ve spent three hours trying with condense my code without success.
Essentially I have a movie clip with three movieclips inside it. What I want is when the mouse hovers over one, it unblurs and the the other two blur. I’ve actually gotten this to work by adding an event listener to each clip and writing three separate functions that unblurs the one which the mouse rolls over and blurs the other two.
However I’m sure there must be a better way of doing it so there is only one function.
I’ve used
for (var m:Object in mc_container){
container[m].addEventListener(MouseEvent.MOUSE_DOWN, drag);
}
and written one function that allows all the clips inside the container to be dragged.
I figure that if I add a ROLLOVER event listener to all of the clips in the same manner I should be able to write one function that control all three windows?
I’ve gotten as far as
function focus(e:MouseEvent):void {
TweenLite.to(e.target, 0.8, {blurFilter:{blurX:0, blurY:0}});
}
which does unblur the clip I hover over, but I can’t figure out how to make the ones its not hovering over to blur as I don’t know what to put in as the target ie
function focus(e:MouseEvent):void {
TweenLite.to(e.target, 0.8, {blurFilter:{blurX:0, blurY:0}});
TweenLite.to(???, 0.8, {blurFilter:{blurX:10, blurY:10}});
}
I’ve been trying if/else statements to no avail.
Any suggestions appreciated.
thanks in advance