Solved

Simple Button not working action script 2.0

Posted on 2011-02-21
7
307 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
DevOps Toolchain Recommendations

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

 
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

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.

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…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
The viewer will learn how to count occurrences of each item in an array.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

932 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

10 Experts available now in Live!

Get 1:1 Help Now