1 Reply Latest reply on May 12, 2016 6:13 AM by berzins

    Mouseover  + gotoAndPaly

    berzins Level 1

      Hello.

       

      Im working on so called "expandable web baner" at the moment, and have a problem with mouseover function.

       

      There are Two Keyframes on the timeline - one is called "HalfFrame" and the second one "FullFrame". Both they have actions at the end in a timeline, where the actual scene ends - this.gotoAndPlay("HalfFrame");  (Or FullFrame). So in this way when i open HTML, animation loops just in the first section - HalfFrame.

       

      Problem appears, when i try to add mousover event to expand (play "FullFrame") when mouse hovers a ClickArea

      This is a code:

       

           var frequency = 3;

           stage.enableMouseOver(frequency);

           this.ClickArea.addEventListener("mouseover", fl_MouseOverHandler);

           function fl_MouseOverHandler()

           {

             gotoAndPlay("FullFrame");

           }

       

      If i write mouseover function e.x.    alert("Ooops. FullFrame");    it shows mouseover works precisely as it should be. If i write anything else - nothing happens.

      Does only "alert" function works with mouseover ... can't believe it!

       

       

      Please help. What i do wrong?