Solved

Movie Clip as a Button Activates Whole Movie, Not Just Clip Itself

Posted on 2003-11-05
4
247 Views
Last Modified: 2010-04-03
I've got the following script on a movieclip:

onClipEvent (load) {
     this.stop();
}
onClipEvent (mouseDown) {
         // on(release)
         hidetoc();  
}

It works, but ANYWHERE in the whole movie.  It's not exclusive to the shape within the movieclip.  I need the action to be executed ONLY when I click on the actual shape within the movie clip.

Thanks,
Brandon
0
Comment
Question by:brandonlee
  • 2
  • 2
4 Comments
 

Author Comment

by:brandonlee
ID: 9686789
I'm using Flash 5
0
 
LVL 27

Expert Comment

by:negatyve
ID: 9686968
onClipEvent (load) {
    this.stop();
}
onClipEvent (mouseDown) {
        // on(release)
      if(this.hitTest(_root._xmouse, _root._ymouse, true){
              hidetoc();
      }
}
0
 
LVL 27

Accepted Solution

by:
negatyve earned 100 total points
ID: 9686971
one parenthesis missing:

onClipEvent (load) {
    this.stop();
}
onClipEvent (mouseDown) {
        // on(release)
      if(this.hitTest(_root._xmouse, _root._ymouse, true)){
              hidetoc();
      }
}
0
 

Author Comment

by:brandonlee
ID: 9687551
Ah, to make sure the movie clip was actually clicked.

Thanks again!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

825 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