So here I have two layers which are movie clips.They are stacked in the same place; They are named: ninja and ninja_mc The code below works and it makes 2nd image(ninja_mc) hidden by default and when I mouse over my original image(ninja), that 2nd image replaces the original one:
ninja_mc._visible = false;
ninja.onRollOver = function(){
ninja_mc._visible = true;
}
ninja.onRollOut = function(){
ninja_mc._visible = false;
}
So what I am trying to do, (which is incorrect) and makes both of the images blinking: I am trying to accomplish: while I mouse over my original image, the modified image(ninja_mc) pop up and the original one hides instead. So they do not stack each other;
ninja_mc._visible = false;
ninja.onRollOver = function(){
ninja._visible = false;
ninja_mc._visible = true;
}
ninja.onRollOut = function(){
ninja._visible = true;
ninja_mc._visible = false;
}
+1 everyone who is willing to help.
Create a transparent movieclip as overlay and assign your code to that one. It should work then.
Hope this helps...
I figured it out! I had to duplicate the ninja layer, make a movie clip of the duplicated layer, then change blending mode to screen(so it might be transparent), change the visibility of the new movie clip along with ninja_mc(in the actionscript frame) and at the end, just make it visible - off by default. Thank you anyway!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.