Results are out! Find what you Get quick advice or join the chat
Hey there! Sign in to join this conversationNew here? Join for free

SIMPLE Actionscript 3 error in Flash - Please help...

Announcements Posted on
Let our uni choice search tool match you with your perfect university 19-11-2015
  1. Offline

    I have an error with my flash actionscript, can someone please please help me.


    addEventListener(Event.ENTER_FRAME, onEnterFrame);
        function onEnterFrame(event:Event):void {
        eqLeft1.gotoAndStop (Math.round(my_channel.leftPeak * 9) ); // 10 is the amount of frames in our EQbar clips
        eqRight1.gotoAndStop (Math.round(my_channel.rightPeak * 11) ); // 10 is the amount of frames in our EQbar clips
        eqLeft2.gotoAndStop (Math.round(my_channel.leftPeak * 16) ); // 10 is the amount of frames in our EQbar clips
    And this is the error generated -

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mp3_fla::MainTimeline/onEnterFrame()[mp3_fla.MainTimeline::frame1:94]
    Any help would be appreciated thanks
  2. Offline


    I haven't touched As3 in a while but here goes:
    This error means that one of the references to an object inside that method (eqLeft1, my_channel etc) doesn't exist.
    In flash, if a movieclip hasn't been instantiated (possibly due to being inside another movieclip, on say, frame 5) then the reference to it will return null if it hasn't reached frame 5 yet.
    It is also possible you haven't correctly 'targeted' one of those objects or the frame.

    I'm sorry i can't help more without more information.


Submit reply


Thanks for posting! You just need to create an account in order to submit the post
  1. this can't be left blank
    that username has been taken, please choose another Forgotten your password?
  2. this can't be left blank
    this email is already registered. Forgotten your password?
  3. this can't be left blank

    6 characters or longer with both numbers and letters is safer

  4. this can't be left empty
    your full birthday is required
  1. By joining you agree to our Ts and Cs, privacy policy and site rules

  2. Slide to join now Processing…

Updated: April 23, 2012
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

Today on TSR

Win an iPad Air 2

Don't miss our big TSR competition!

What class are you?
Useful resources
Quick reply
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.