SIMPLE Actionscript 3 error in Flash - Please help...
From C++ to PHP, debugging to webhosting; help and discussion about writing your latest program to running your website. NOT for help when your PC won't work.
| Announcements | Posted on | |
|---|---|---|
| Enter our travel-writing competition for the chance to win a Nikon 1 J3 camera | 20-05-2013 | |
-
SIMPLE Actionscript 3 error in Flash - Please help...
I have an error with my flash actionscript, can someone please please help me.
Thanks
And this is the error generated -Code:addEventListener(Event.ENTER_FRAME, onEnterFrame); function onEnterFrame(event:Event):void { // ANIMATED EQ BARS CODE 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
Any help would be appreciated thanksTypeError: Error #1009: Cannot access a property or method of a null object reference.
at mp3_fla::MainTimeline/onEnterFrame()[mp3_fla.MainTimeline:
94]
-
Re: SIMPLE Actionscript 3 error in Flash - Please help...
Hi,
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.
Last edited by Ever_Dream; 23-04-2012 at 04:27.