Reply to comment

Making a MovieClip act like a Button

In AS3 (and actually using a similar method in AS2) you can make a MovieClip act just like a button like so:

Give your MovieClip 3 frames, labelled _up, _over and _down.

Create your MovieClip:

var clip:MovieClip=new MyClip();
clip.buttonMode=true;
// Need this, because otherwise any interactive children will break the button behaviour
clip.mouseChildren=false;
clip.stop();

Now when you attach your clip to the display tree, it'll show up, over and down states as appropriate.

This is an undocumented feature of Flash.

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <i> <b> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockcode> <h1> <h2> <h3> <h4> <h5> <h6>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.