Solved

Simple Button not working action script 2.0

Posted on 2011-02-21
7
306 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 39

Expert Comment

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

Author Comment

by:cnl83
Comment Utility
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)
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
This article will show, step by step, how to integrate R code into a R Sweave document
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now