Solved

Simple Button not working action script 2.0

Posted on 2011-02-21
7
309 Views
Last Modified: 2012-05-11
CS5 actionscript 2.0
I have a simple button on the main stage, and a frame named "main".

Why does this code not work?

on (release) {
gotoAndPlay("main");

}
0
Comment
Question by:cnl83
7 Comments
 
LVL 17

Accepted Solution

by:
deepanjandas earned 250 total points
ID: 34948336
2 questions/suggestions:
1. Check where you have placed this piece of code mentioned above, this should be placed on the button instance and not on frame.
2. check that the "main" that you have mentioned has been properly set as a label to another frame in the time line.

Warm Regards
Deepanjan Das
0
 
LVL 39

Assisted Solution

by:blue-genie
blue-genie earned 250 total points
ID: 34949632
on (release) {
      _parent.gotoAndPlay("main"); //with the code in the button itself you need to specify where the frame is.
}
0
 
LVL 17

Expert Comment

by:deepanjandas
ID: 34950061
blue-genie is right to some extent if the instance is a movieclip. If its a button then no need to add _parent I guess.

Warm Regards
Deepanjan Das
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 39

Expert Comment

by:blue-genie
ID: 34950128
Deepanas, try it.
it's one of those oddities of flash
0
 

Author Comment

by:cnl83
ID: 35132785
I dont know why it wasnt working. I recreated the file and resolved it. fla must have been corrupt or something.
0
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 36321175
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Disk Ram Peak 1 43
What is assert.deepEqual? 4 48
Interactive Script in Scheduled Task not running 8 30
exchange ,script 10 46
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question