2 Replies Latest reply on Oct 13, 2009 11:56 AM by flarg123

    Merging Flash

    flarg123

      I have a flash background that's going to act as the template for a 'site'. I've published that using flash and uploaded it to the website directory without a problem. Now I was planning to use animated flash icons to act as a transport to getting from this website and to a forum (Ie. A link). The problem is that whenever I 'click and drag' this icon from the flash library to the background I recieve the error:

       

      ''The class or interface 'MouseEvent' could not be loaded.
      function onOut(event:MouseEvent):void {''

       

      This comes two times under two different lines of code. After I get the two compiler errors, the icon appears on the background but has lost all of the flash animations which mainly consist of ''Mouse hover over'' and ''Mouse hover out''. To test I'm doing this correctly I created a new flash file on a blank white page, did exactly the same 'click and drag' action and everything worked.

       

      P.S. This is the code for the icon which includes all the animations needed but somehow disappears during the 'click and drag' action:

       

      //mouse over actions
      btnSensor.addEventListener(MouseEvent.MOUSE_OVER, onOver);
      function onOver(event:MouseEvent):void {
          //play icon animation
          event.target.parent.mcIcon.mcShapeAnimation.gotoAndPlay(2);
          //play frame animation
          event.target.parent.mcIcon.mcFrame.gotoAndPlay(2);
      }
      //mouse out actions
      btnSensor.addEventListener(MouseEvent.MOUSE_OUT, onOut);
      function onOut(event:MouseEvent):void {
          //play icon animation
          event.target.parent.mcIcon.mcShapeAnimation.gotoAndPlay(11);
          //play frame animation
          event.target.parent.mcIcon.mcFrame.gotoAndPlay(2);
      }