Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

ActionScript 3.0 error

  • 16-03-2009 2:32pm
    #1
    Registered Users, Registered Users 2 Posts: 1,810 ✭✭✭


    Hi all. I'm trying to put together a Flash project for college, so I am as novice as they come. I've spent ages fixing my ActionScript code but keep getting the same error. I have copy and pasted the code numerous times for different buttons but it's only having a problem with the first line of the first piece of code. That's what I don't get; I typed the code in the first time and then pasted it every other time, so if there's a problem with the first piece, surely there should be a problem all the way through?

    Anyway, just wondering if anyone has any idea? The error description is '1120:Access of undefined property clickFashion.

    Here is the code:

    btnFashion.addEventListener(MouseEvent.CLICK, clickFashion);
    function clickIntroduction(event:Event):void{
    trace("Fashion")
    gotoAndStop("Fashion");
    }

    I have named the instance of the button 'Fashion' as btnFashion, and I've double and triple checked that.

    Anyone have any other ideas?

    Thanks.


Comments

  • Registered Users, Registered Users 2 Posts: 2,120 ✭✭✭p


    My advice is really to just use actionscript 2.

    Actionscript 3 is really for hard core developers and not suited to the basics.


    This specific problem is probably needs something like:
    var clickFashion:MovieClip;
    at the top of the code to work.

    That, or turn off strict debugging in the Actionscript preferences for this project.


  • Closed Accounts Posts: 7,145 ✭✭✭DonkeyStyle \o/


    Where's your clickFashion function? Have you some external class file or is this it?
    Renaming clickIntroduction to clickFashion should sort it out.


Advertisement