4 Replies Latest reply on Jan 17, 2009 1:40 PM by Cubba27

    AS Errors????

    Cubba27
      hey all,
      Well i've just put together a flash document, and i've included rollout buttons within it. Although when i've tested it, it works fine but i do get an error which is below:

      '**Error** Scene=Scene 1, layer=gallery_btn, frame=1:Line 1: Mouse events are permitted only for button instances
      on(rollOver) {

      Total ActionScript Errors: 1 Reported Errors: 1

      i've looked over everyting and everything seems to be ok, can anyone suggest whats worng, i've linked the document below, any help would be great thanx

      http://rapidshare.com/files/185091012/index_01.fla
        • 1. Re: AS Errors????
          kglad Adobe Community Professional & MVP
          click on your gallery_btn layer, frame 1. something that's highlighted has code attached to it. click on the stage and then click on it highlighted item until you find a non-button/non-movieclip with that on(rollOver) code.
          • 2. AS Errors????
            Cubba27 Level 1
            Yer i'm using some action script in there but when i've looked over the AS is exactly the same as my other buttons apart from the instances obviously and the other buttons work fine. when i've tested its everything runs ok no problems but is still get the message. this is the AS im using:

            import mx.transitions.Tween;
            import mx.transitions.easing.*;

            gallery_btn.onRollOver = function() {
            new Tween(this.gallery_txt, '_x', Strong.easeOut, this.gallery_txt._x, 47, 8, false);
            }

            gallery_btn.onRollOut = function() {
            new Tween(this.gallery_txt, '_x', Strong.easeOut, this.gallery_txt._x, -56, 8, false);
            }

            gallery_btn.onRelease=function(){
            getURL(" http://www.google.com","_self");
            }
            • 3. Re: AS Errors????
              clbeech Level 3
              cubba is your code 'on the timeline' ? if so you should be able to see the 'a' in the timeline, it's a common error to 'select' an instance and then open the AS window and enter code - the error is saying that you have 'attached' the code to a MC or button.
              • 4. Re: AS Errors????
                Cubba27 Level 1
                Lol, thanx i can't believe it was that simple. i didn't think to check because i didn't recall adding any code to that layer... thanks alot :)