?
Solved

Simple Button not working action script 2.0

Posted on 2011-02-21
7
Medium Priority
?
319 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 17

Accepted Solution

by:
deepanjandas earned 1000 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 1000 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
DFW AZURE MEETUP TONIGHT FRI 6PM

We will be discussing what Azure Stack is, how does it fit into the suit of offerings that Azure has currently, and where can it fit into your organizations technology stack. We will also be discussing limitations of the platform while covering various applicable scenarios.

 
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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
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 …
Suggested Courses

762 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