Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Syntax

  1. #1
    New to the CF scene
    Join Date
    Mar 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Syntax

    Hi, I'm VERY new to flash. I'm trying to make an easy educational game for my multimedia class using action script 2.0. For some reason i am getting the same errors on all my frames in the same lines. someone please help and guide me in the right direction...

    i have 6 frames, this is the error from frame 1....

    stop();
    function buttonClickBlue(myevent:MouseEvent):void{
    gotoAndStop(6);
    }
    btnBlue.addEventListener (MouseEvent.CLICK,buttonClickBlue);

    function buttonClickRed(myevent:MouseEvent):void{
    gotoAndStop(2);
    }
    btnRed.addEventListener (MouseEvent.CLICK,buttonClickRed);

    Error Message:
    Scene=Scene 1, layer=Layer 1, frame=1, Line 2 The class or interface 'MouseEvent' could not be loaded.
    Scene=Scene 1, layer=Layer 1, frame=1, Line 7 The class or interface 'MouseEvent' could not be loaded.

    I'm sure it's something silly but i hope someone can help shed some light. HELP THE NOVICE!! :-P
    Last edited by agosselin; 03-30-2011 at 01:37 AM. Reason: figured it out

  • #2
    New Coder
    Join Date
    Jun 2008
    Posts
    61
    Thanks
    0
    Thanked 12 Times in 12 Posts
    You're using AS3.

    You said, you want it for AS2. So it should work that way:

    PHP Code:
    stop();
    btnBlue.onRelease=function(){
    gotoAndStop(6);
    }
    btnRed.onRelease=function(){
    gotoAndStop(2);



  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •