FORUMS: list search recent posts

SIMPLE Flash CS3 RollOver Problem

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
dogstalktome
SIMPLE Flash CS3 RollOver Problem
on Nov 21, 2007 at 10:32:57 pm

I was trying to create a simple rollover animation that would start when the mouse would be over a set of individual movie clips. It works, but only slightly - the animation is only activated when the mouse touches the white outline of the MC. This white outline is on the topmost layer of each of those MCs.


This is the file if you want to check it out:

http://www.csupomona.edu/~berigazzi/RECentertest.swf

This is the actionscript I am using to execute this thing:

rone.addEventListener(MouseEvent.MOUSE_OVER, rollOver);
e.addEventListener(MouseEvent.MOUSE_MOVE, rollOver);
c.addEventListener(MouseEvent.MOUSE_MOVE, rollOver);
c2.addEventListener(MouseEvent.MOUSE_MOVE, rollOver);
e2.addEventListener(MouseEvent.MOUSE_MOVE, rollOver);
n.addEventListener(MouseEvent.MOUSE_MOVE, rollOver);
t.addEventListener(MouseEvent.MOUSE_MOVE, rollOver);
e3.addEventListener(MouseEvent.MOUSE_MOVE, rollOver);
r2.addEventListener(MouseEvent.MOUSE_MOVE, rollOver);

function rollOver(evt:MouseEvent):void {
evt.target.gotoAndPlay(2);

}


I'm on a Mac if that matters at all.


Return to posts index

Sher Ali
Re: SIMPLE Flash CS3 RollOver Problem
on Nov 22, 2007 at 6:15:24 am

Actually the image holders block the event to be received by the fill of the buttons. If image holder is a separate mc and the letter's fill color is behind the image holder exists then you have to disable the image holder from receiving mouse events. You can do this:
img_holder.mouseEnabled = false;


This is same like you make a button from movieclip, which consists of a shape and a text-field on top of the shape. When you attach event listener to the button then the button responds only in those areas where the text-field is not covering the area of the shape. So in that case we disable the text-field to enable the button work properly. Like:
btn.textfield.mouseEnabled = false;
btn.addEventListener(MouseEvent.MOUSE_MOVE, rollOver);


-------------------
Sher Ali
webeyestudio.com
kabulinteractive.com
kabulinteractive.com/blog

Sher Ali
interactive web-designer
http://www.webeyestudio.com


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]