Skip navigation
Mihkeldesign
Currently Being Moderated

help me out guys

May 27, 2012 3:52 AM

Tags: #problem #error ##1009 #typeerror:

So i am trying to make a flashbook like this one here -> http://arendus.mihkeldesign.com/flashbook/flashmaster.html .  Only I want to have 5 videos in there. So I added my 5 videos and added some more stop functions for every video, so they wouldnt start playing as soons as you open the videobook. But right now they start all playing at the same time when you open and, the prev and next button arent working either anymore. I get this error in output.

 

TypeError: Error #1009: Cannot access a property or method of a null object reference.

    at mayabasics_fla::MainTimeline/frame5()

 

Here'd the folder the stuff is in. http://i49.tinypic.com/zn530j.jpg

Here's the layers & stuff.  http://i46.tinypic.com/vmszlf.jpg

And here's the code.

 

 

import flash.events.MouseEvent;

 

/* Stop a Movie Clip

Stops the specified movie clip on stage.

 

Instructions:

1. Use this code for movie clips that are currently playing.

*/

 

movie1.stop();

movie1.stop();

 

movie2.stop();

movie2.stop();

 

movie3.stop();

movie3.stop();

 

movie4.stop();

movie4.stop();

 

movie5.stop();

movie5.stop();

 

stop()

 

btn1.addEventListener(MouseEvent.CLICK,backward);

btn2.addEventListener(MouseEvent.CLICK,forward);

 

function forward(event:MouseEvent){

                                   if(this.currentFrame == this.totalFrames){

                                   gotoAndStop(1);

                                                   }

                                   else{

                                        nextFrame();

                                    }

                                    }

                                  

                                   function backward(event:MouseEvent){

                                   if(this.currentFrame == 1){

                                   gotoAndStop(this.totalFrames);

                                                    }

                                   else{

                                        prevFrame();

                                        }

                                   }

 

All help is appreciated!!

 
Replies
  • Currently Being Moderated
    May 27, 2012 4:18 AM   in reply to Mihkeldesign

    The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....

     

    - is declared but not instantiated

    - doesn't have an instance name (or the instance name is mispelled)

    - does not exist in the frame where that code is trying to talk to it

    - is animated into place but is not assigned instance names in every keyframe for it

    - is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).

     

    If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved.

     
    |
    Mark as:
  • Currently Being Moderated
    May 27, 2012 4:56 AM   in reply to Mihkeldesign

    If that is the first occurence of a " : # " after a frame number, then it is telling you line 13 is where the problem is.

     

    If you put traces of the instance names involved before that line you should be able to see which is coming up null, either by the trace showing null or the error indicating the line.

     
    |
    Mark as:
  • Currently Being Moderated
    May 27, 2012 11:36 AM   in reply to Mihkeldesign

    How have you implemented these videos?  Are you using the FLVPlayback component?

     
    |
    Mark as:
  • Currently Being Moderated
    May 27, 2012 12:47 PM   in reply to Mihkeldesign

    You should be able to set the ' autoplay ' property to false in the Properties panel.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points