|
-
 Originally Posted by bamben
Why does this code not work? It seems to make the error:#1009: Cannot access a property or method of a null object reference. my buttons on the same frame have all stopped working, please help!
Code:
import flash.display.MovieClip;
import fl.containers.ScrollPane;
scrollpane.content as MovieClip;
MovieClip(scrollpane.content).gotoAndSto p("frameName");
If you get an error "Cannot access a property or method of a null object reference", this means that you're trying to access something that doesn't exist at that moment when you're trying to access it. The thing you can do is checking when you put an instance of the object on the stage and when you're trying to access it. Also, check if you use the correct names. This is very important! I don't know if this mistake is in your own code, but there's a space between the "o" and the "p" on this line: MovieClip(scrollpane.content).gotoAndSto p("frameName");
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|