Hi!
I'm having some trouble with a mouseover event, the code I use isn't responding. I just want my cta_mc to popup when I mouseover.
var frequency = 3;
stage.enableMouseOver(frequency);
this.cta_mc.addEventListener("mouseover", fl_MouseOverHandler.bind(this));
function fl_MouseOverHandler()
{
TweenMax.to(this.cta_mc, .3, {scaleX:1.15, scaleY:1.15, ease: Back.easeOut}, "+=.3");
TweenMax.to(this.cta_mc, .3, {scaleX:1, scaleY:1, ease: Back.easeOut});
}
var tl = new TimelineMax({repeat:0, repeatDelay:3})
TweenLite.defaultEase = Power2.easeOut;
tl.to(this.bg_mc, 1, {delay:.5, alpha:.5})
.from(this.txt1_mc, 1.5, {y:"+=20", alpha:0}, "-=.5")
.to(this.txt1_mc, .5, {delay:1, y:"+=10", alpha:0})
.from(this.txt2_mc, 1, {y:"+=20", alpha:0}, "-=.3")
.from(this.txt2_1_mc, 1, {y:"+=10", alpha:0}, "-=.5")
.to(this.txt2_1_mc, .5, {delay:1, y:"+=10", alpha:0})
.from(this.txt3_1_mc, 1, {delay:.5, y:"+=10", alpha:0}, "-=.5")
.to(this.txt3_1_mc, .5, {delay:1, y:"+=10", alpha:0})
.from(this.txt4_1_mc, 1, {delay:.5, y:"+=10", alpha:0}, "-=.5")
.to(this.txt2_mc, .5, {delay:1, y:"-=25"})
.to(this.txt4_1_mc, .5, {y:"-=25"}, "-=.5")
.from(this.cta_mc, 1, {y:"+=25", alpha:0}, "-=.25")
.to(this.cta_mc, .3, {scaleX:1.15, scaleY:1.15, ease: Back.easeOut}, "+=.3")
.to(this.cta_mc, .3, {scaleX:1, scaleY:1, ease: Back.easeOut})
.to(this.cta_mc, .3, {scaleX:1.15, scaleY:1.15, ease: Back.easeOut})
.to(this.cta_mc, .3, {scaleX:1, scaleY:1, ease: Back.easeOut})
GSDevTools.create();
I also tried this code but i guess it is outdated?
//set scope activation object
var root = this, tl;
//prevent children of mc from dispatching mouse events
root.cta_mc.mouseChildren = false;
root.cta_mc.on("mouseover", function(){this.gotoAndPlay(1);});
root.cta_mc.on("mouseout", function(){this.gotoAndStop(0);});
root.cta_mc.on("mouseover", function(){
TweenMax.to(this, 1.25, {scaleX:1.1, scaleY:1.1, ease:Elastic.easeOut});
});
root.cta_mc.on("mouseout", function(){
TweenMax.to(this, 1.25, {scaleX:1, scaleY:1, ease:Elastic.easeOut});
});
Any change somebody seeing what's incorrect?
Hope you can help me out.
Thanks in advance.