camcmull
06-18-2008, 09:09 PM
Hey, this has been driving me nuts, and I can't seem to find any reference to a similar problem anywhere on the web.
I'm trying to apply a MOUSE_OVER event to a timeline animation. The event would be to make the movieclip have a glow when the mouse is over it, to match the glowing tooltip. This works fine, however, the animation on the timeline stops as soon as the mouse_over event occurs. I've tried animating the movieclip along the timeline with a motion tween, as well as by frame by frame. In both cases the animation stops when the event occurs.
Does anyone know how to fix this problem, or why this is occuring? Here's the code:
//A hovering tooltip
TDB2.visible = false;
//Tried referencing the movieclip to no avail...
var temp:MovieClip = new MovieClip();
temp = symbol4;
//Event listener for the tooltip
symbol4.addEventListener(MouseEvent.MOUSE_OVER, up3);
symbol4.addEventListener(MouseEvent.MOUSE_OUT, down3);
//Event listener for the filter on the movieclip
symbol4.addEventListener(MouseEvent.MOUSE_OVER, symbolUp);
symbol4.addEventListener(MouseEvent.MOUSE_OUT, symbolDown);
function up3(evt:Event):void {
TDB2.visible = true;
symbol4.addEventListener(Event.ENTER_FRAME, ref3);
}
//Simply positions the movieclip
function ref3(evt:Event):void {
TDB2.width = 60;
TDB2.height = 45;
TDB2.y = stage.mouseY -40;
TDB2.x = stage.mouseX + 20;
TDB2.filters = [new GlowFilter(0xFF0000, .75, 10, 10, 5, 2, false, false)];
}
function down3(evt:Event):void {
symbol4.removeEventListener(Event.ENTER_FRAME, ref);
TDB2.visible = false;
}
function symbolUp(evt:Event):void{
symbol4.addEventListener(Event.ENTER_FRAME, symbolGlow);
}
//The problem must be in here somewhere, but ?
function symbolGlow(evt:Event):void{
var myGlow:GlowFilter = new GlowFilter(0xCC0000,.75,15,10,50,3);
temp.filters = [myGlow];
}
function symbolDown(evt:Event):void{
temp.filters = [];
symbol4.removeEventListener(Event.ENTER_FRAME, symbolGlow);
}
symbol4 is merely the instance name of a movieclip that follows a motion guide on the stage, it has no animation itself, it purely follows the guide.
I'm trying to apply a MOUSE_OVER event to a timeline animation. The event would be to make the movieclip have a glow when the mouse is over it, to match the glowing tooltip. This works fine, however, the animation on the timeline stops as soon as the mouse_over event occurs. I've tried animating the movieclip along the timeline with a motion tween, as well as by frame by frame. In both cases the animation stops when the event occurs.
Does anyone know how to fix this problem, or why this is occuring? Here's the code:
//A hovering tooltip
TDB2.visible = false;
//Tried referencing the movieclip to no avail...
var temp:MovieClip = new MovieClip();
temp = symbol4;
//Event listener for the tooltip
symbol4.addEventListener(MouseEvent.MOUSE_OVER, up3);
symbol4.addEventListener(MouseEvent.MOUSE_OUT, down3);
//Event listener for the filter on the movieclip
symbol4.addEventListener(MouseEvent.MOUSE_OVER, symbolUp);
symbol4.addEventListener(MouseEvent.MOUSE_OUT, symbolDown);
function up3(evt:Event):void {
TDB2.visible = true;
symbol4.addEventListener(Event.ENTER_FRAME, ref3);
}
//Simply positions the movieclip
function ref3(evt:Event):void {
TDB2.width = 60;
TDB2.height = 45;
TDB2.y = stage.mouseY -40;
TDB2.x = stage.mouseX + 20;
TDB2.filters = [new GlowFilter(0xFF0000, .75, 10, 10, 5, 2, false, false)];
}
function down3(evt:Event):void {
symbol4.removeEventListener(Event.ENTER_FRAME, ref);
TDB2.visible = false;
}
function symbolUp(evt:Event):void{
symbol4.addEventListener(Event.ENTER_FRAME, symbolGlow);
}
//The problem must be in here somewhere, but ?
function symbolGlow(evt:Event):void{
var myGlow:GlowFilter = new GlowFilter(0xCC0000,.75,15,10,50,3);
temp.filters = [myGlow];
}
function symbolDown(evt:Event):void{
temp.filters = [];
symbol4.removeEventListener(Event.ENTER_FRAME, symbolGlow);
}
symbol4 is merely the instance name of a movieclip that follows a motion guide on the stage, it has no animation itself, it purely follows the guide.