ForumsProgramming ForumTroubles with buttons and Action Script :)

7 3267
Misiur
offline
Misiur
9 posts
Nomad

Hi, i've got little trouble. I don't know how to get to button in frame x. Only those from 1 frame are working. Those are making errors. Help?

  • 7 Replies
MikeVarilek
offline
MikeVarilek
36 posts
Nomad

I'm not quite understanding your question, could you reword it, and possibly give an example of the code you are using?

Klaushouse
offline
Klaushouse
2,770 posts
Nomad

Or post the FLA. Unless we know what you are talking about we won't be able to help you.

Misiur
offline
Misiur
9 posts
Nomad

ok, sorry, but i'm not from England, or America I've got separated file with as: codeAs.as, and game file: game.fla. I know, when i set instance of button, then i have variable, with same name. And i have buttons in 1 frame: starter, and instructions. But, in second frame i've got button powrot_guz. And when i'm trying to add to it code like this:
&quotowrot_guz.addEventListener(MouseEvent.CLICK, powrotKlik);"
It return me erros like:
"TypeError: Error #1009: Cannot access a property or method of a null object reference.
at plikias::kodAs$iinit()
"
And show to this line of code It is now able to understand question? Thanks, Misiur.

Misiur
offline
Misiur
9 posts
Nomad

Sorry, but names which i gave, are little diffrent, becouse i had to English them

Misiur
offline
Misiur
9 posts
Nomad

Sorry, here're files: [url=http://rapidshare.com/files/127369643/Flash.rar.html]

dank
offline
dank
986 posts
Peasant

Do you have a 'owrotKlik' function?

Misiur
offline
Misiur
9 posts
Nomad

Sure:
"
private function powrotKlik(event:MouseEvent):void
{
gotoAndStop(1);
}
"

Showing 1-7 of 7