Home
> FlashEff 2.0
> Topic
Effect start at MouseOver <-> end at MouseOut! HOW?
Posted by Molodjez
Effect start at MouseOver <-> end at MouseOut! HOW? July 20, 2009 04:43PM | Registered: 14 years ago Posts: 7 |
Hi Everybody,
sorry for a stupid question from a Beginner:
I have a MC on my stage and I want to add a hide-effect (FESSquareLight) if the mouse comes over (then u can see mc2 behind mc1). After mouse out, the show-effect should start to comin to the starting situation. I am really new in AS3 and Flash Eff so maybe someone have a tip for me...
thx
sorry for a stupid question from a Beginner:
I have a MC on my stage and I want to add a hide-effect (FESSquareLight) if the mouse comes over (then u can see mc2 behind mc1). After mouse out, the show-effect should start to comin to the starting situation. I am really new in AS3 and Flash Eff so maybe someone have a tip for me...
thx
Re: Effect start at MouseOver <-> end at MouseOut! HOW? July 21, 2009 06:44AM | Admin Registered: 15 years ago Posts: 405 |
// here you will see how to do the hide on mouse over
yourMC.addEventListener(MouseEvent.MOUSE_OVER, doTheHide);
function doTheHide (e:MouseEvent):void {
FlashEffComponentInstance.hide()
}
// And here we will see how to show the MC on roll out
yourMC.addEventListener(MouseEvent.ROLL_OUT,doTheShow)
function doTheShow (e:MouseEvent):void {
FlashEffComponentInstance.show()
}
FlashEffComponentInstance = the instance name of the FlashEff2 component.
yourMC = the clip that will register the events.
Hope it helps,
-Ionut
yourMC.addEventListener(MouseEvent.MOUSE_OVER, doTheHide);
function doTheHide (e:MouseEvent):void {
FlashEffComponentInstance.hide()
}
// And here we will see how to show the MC on roll out
yourMC.addEventListener(MouseEvent.ROLL_OUT,doTheShow)
function doTheShow (e:MouseEvent):void {
FlashEffComponentInstance.show()
}
FlashEffComponentInstance = the instance name of the FlashEff2 component.
yourMC = the clip that will register the events.
Hope it helps,
-Ionut
Re: Effect start at MouseOver <-> end at MouseOut! HOW? July 21, 2009 12:17PM | Registered: 14 years ago Posts: 7 |
Hi lonut, thx for your help! I did it like your Code:
img_01_mc.addEventListener(MouseEvent.MOUSE_OVER, doTheHide);
img_01_mc.addEventListener(MouseEvent.ROLL_OUT, doTheShow);
function doTheHide (e:MouseEvent):void {
flashEffComp.hide();
}
function doTheShow (e:MouseEvent):void {
flashEffComp.show();
}
I want to hide my img_01_mc if I rollOver with the mouse - and if I rollOut with the mouse it should be shown! But with this code it is blinking?! What can I do?
Here is the *.FLA
img_01_mc.addEventListener(MouseEvent.MOUSE_OVER, doTheHide);
img_01_mc.addEventListener(MouseEvent.ROLL_OUT, doTheShow);
function doTheHide (e:MouseEvent):void {
flashEffComp.hide();
}
function doTheShow (e:MouseEvent):void {
flashEffComp.show();
}
I want to hide my img_01_mc if I rollOver with the mouse - and if I rollOut with the mouse it should be shown! But with this code it is blinking?! What can I do?
Here is the *.FLA
Re: Effect start at MouseOver <-> end at MouseOut! HOW? July 21, 2009 12:50PM | Admin Registered: 15 years ago Posts: 405 |
The problem from your file(my example) is that the target's visibility was set to false while the images had alpha 0.
The fastest way to fix this is:
Copy the target(Ctrl + c)
Paste it in the excat same place(ctrl+Shift+v)
Give it different instance name- maskMC
Set it's alpha to be 0.
Open the actions panel and do the following changes:
maskMC.addEventListener(MouseEvent.MOUSE_OVER, doTheHide);
maskMC.addEventListener(MouseEvent.ROLL_OUT, doTheShow);
Now the event is being triggered on a different target that has alpha 0.
This worked best for me.
Sorry about the first tutorial, I didn't consider the fact that the target will be made invisible at some point.
If you can't make it work, let me know and I'll attach the file.
-Ionut.
The fastest way to fix this is:
Copy the target(Ctrl + c)
Paste it in the excat same place(ctrl+Shift+v)
Give it different instance name- maskMC
Set it's alpha to be 0.
Open the actions panel and do the following changes:
maskMC.addEventListener(MouseEvent.MOUSE_OVER, doTheHide);
maskMC.addEventListener(MouseEvent.ROLL_OUT, doTheShow);
Now the event is being triggered on a different target that has alpha 0.
This worked best for me.
Sorry about the first tutorial, I didn't consider the fact that the target will be made invisible at some point.
If you can't make it work, let me know and I'll attach the file.
-Ionut.
Re: Effect start at MouseOver <-> end at MouseOut! HOW? July 21, 2009 12:57PM | Registered: 14 years ago Posts: 7 |
Re: Effect start at MouseOver <-> end at MouseOut! HOW? July 21, 2009 01:11PM | Admin Registered: 15 years ago Posts: 405 |
Re: Effect start at MouseOver <-> end at MouseOut! HOW? July 21, 2009 01:51PM | Registered: 14 years ago Posts: 7 |
Sorry, you do not have permission to post/reply in this forum.