Skip navigation
Currently Being Moderated

The class or interface "MouseEvent' could not be loaded

Mar 3, 2010 9:28 PM

function upScrollText(evt:MouseEvent):void{
tSpeech.scrollV-=1;
}
bscrollup.addEventListener(MouseUp.CLICK.upScrollTex);

 

Do you know why I got the errors below?

 

The class or interface 'MouseEvent' could not be loaded.    Function upScrollText(evt:MouseEvent):void{

 

I have updated my Flash to CS4 from CS2 and these action script I have learned from a on - line course,  It does work on their CS3.

 

Anybody know why ?

 

Thanks

 

Kanny

 
Replies
  • kglad
    62,165 posts
    Jul 21, 2002
    Currently Being Moderated
    Mar 3, 2010 11:06 PM   in reply to Kanny N

    because you're publishing for as2 and using as3 code.

     

    to remedy, click file/publish settings/flash and, in the actionscript version combobox, select a.s.3.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 30, 2012 12:10 PM   in reply to kglad

    I am new I have the same problem - it says I can't choose Action Script 3 as it says "Screen based documents must target Action Script 2 - help

     

    this is the code that I input - I know nothing about action script

     

    stop()

     

     

    bWC1.addEventListener(MouseEvent.CLICK,play1);

     

     

    function play1(event:MouseEvent):void{

              gotoAndStop("pic1");

    }

     

     

    stop()

     

     

    bWC2.addEventListener(MouseEvent.CLICK,play2);

     

     

    function play2(event:MouseEvent):void{

              gotoAndStop("pic2");

    }

     

     

    stop()

     

     

    bWC3.addEventListener(MouseEvent.CLICK,play3);

     

     

    function play3(event:MouseEvent):void{

              gotoAndStop("pic3");

    }

     

     

    stop()

     

     

    bWC4.addEventListener(MouseEvent.CLICK,play4);

     

     

    function play4(event:MouseEvent):void{

              gotoAndStop("pic4");

    }

     

     

    stop()

     

     

    bWC5.addEventListener(MouseEvent.CLICK,play5);

     

     

    function play5(event:MouseEvent):void{

              gotoAndStop("pic5");

    }

     

     

    stop()

     

     

    bWC6.addEventListener(MouseEvent.CLICK,play6);

     

     

    function play6(event:MouseEvent):void{

              gotoAndStop("pic6");

    }

     

     

    stop()

     

     

    bWC7.addEventListener(MouseEvent.CLICK,play7);

     

     

    function play7(event:MouseEvent):void{

              gotoAndStop("pic7");

    }

     

     

    stop()

     

     

    bWC8.addEventListener(MouseEvent.CLICK,play8);

     

     

    function play8(event:MouseEvent):void{

              gotoAndStop("pic8");

    }

     

     

    stop()

     

     

    bWC8.addEventListener(MouseEvent.CLICK,play9);

     

     

    function play9(event:MouseEvent):void{

              gotoAndStop("pic9");

    }

     

     

    stop()

     

     

    bWC10.addEventListener(MouseEvent.CLICK,play10);

     

     

    function play10(event:MouseEvent):void{

              gotoAndStop("pic10");

    }

     

     

    stop()

     

     

    bWC11.addEventListener(MouseEvent.CLICK,play11);

     

     

    function play11(event:MouseEvent):void{

              gotoAndStop("pic11");

    }

     

     

    stop()

     

     

    bWC12.addEventListener(MouseEvent.CLICK,play12);

     

     

    function play11(event:MouseEvent):void{

              gotoAndStop("pic12");

    }

     
    |
    Mark as:
  • kglad
    62,165 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 30, 2012 12:30 PM   in reply to karenusa

    you have to change your code to as2:

     

     

     

    stop()

     

     

    bWC1.onRelease=play1;

     

     

    function play1():Void{

              gotoAndStop("pic1");

    }

     

     

     

    bWC2.onRelease=play2;

     

     

    function play2():Void{

              gotoAndStop("pic2");

    }

     

     

    bWC3.onRelease=play3;

     

     

    function play3():Void{

              gotoAndStop("pic3");

    }

     

    //etc

     

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 16, 2013 5:48 PM   in reply to kglad

    Nailed it!!!

     

    THANK YOU!!!!!!

     
    |
    Mark as:
  • kglad
    62,165 posts
    Jul 21, 2002
    Currently Being Moderated
    Apr 16, 2013 5:51 PM   in reply to Lauraroze2013

    you're welcome.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points