Community

Troubles with buttons and Action Script :)

Posted Jul 3, '08 at 9:59am

Misiur

Misiur

5 posts

 -

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?

Posted Jul 3, '08 at 11:33am

MikeVarilek

MikeVarilek

38 posts

Wood - Squire

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

 

Posted Jul 3, '08 at 1:07pm

Klaushouse

Klaushouse

1,700 posts

Iron - Lord

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

 

Posted Jul 3, '08 at 5:01pm

Misiur

Misiur

5 posts

 -

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:
"powrot_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.

 

Posted Jul 3, '08 at 5:02pm

Misiur

Misiur

5 posts

 -

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

 

Posted Jul 5, '08 at 1:11pm

Misiur

Misiur

5 posts

 -

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

 

Posted Jul 5, '08 at 2:56pm

dank

dank

779 posts

Iron - Lord

Moderator

Do you have a 'powrotKlik' function?

 

Posted Jul 5, '08 at 3:04pm

Misiur

Misiur

5 posts

 -

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

 
Reply to Troubles with buttons and Action Script :)

You must be logged in to post a reply!