A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [RESOLVED] nextFrame() problem

  1. #1
    THE YELLOW FLASH!
    Join Date
    Feb 2008
    Posts
    57

    resolved [RESOLVED] nextFrame() problem

    I am trying to put a MC,to traverse through the frames in my fla.It has got two layers.I layer got 3 separate frames,which contains the contents that i want to show the user in every frame.The top layer got one common frame(that extends from 1-3)and got the AS3 for the NextMC. Here is the code:
    Actionscript Code:
    NextMC.addEventListener(MouseEvent.CLICK,NextFrame);

    function NextFrame(event:MouseEvent):void {
        nextFrame();
    }

    It traverses from 1st frame to second.But when i Click NextMC in 2nd frame,it gives me an error:

    Code:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    	at Estimate1_fla::MainTimeline/NextFrame()

    Why is that?the AS3 layer got its listener,do I have to write listeners on every frame?
    The CodeBreaker!

  2. #2
    THE YELLOW FLASH!
    Join Date
    Feb 2008
    Posts
    57
    Found it,an instance was not in stage.
    Please delete this thread.
    The CodeBreaker!

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center