A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: playing movies with in a button

  1. #1
    Join Date
    Jun 2001


    I want to make a picture a button that when you mouse over it slowly starts to grow but it shrinks when you mouse off but when it starts to shrink it starts shrinking from the sive it was when the mouse off took place

  2. #2
    Junior Member
    Join Date
    Jun 2001
    perhaps try it like this ...

    you put your picture and button in a MC and throw it on stage. zeropoint of this MC should be the center of the pic. I tell you a script for an mc called "btt" in the instance-window.


    _root.bttx = _root.btt._x;
    _root.btty = _root.btt._y;
    _root.bttw = _root.btt._width;
    _root.btth = _root.btt._height;
    _root.btts = 100;

    _frame 2

    if ((_root._xmouse > (_root.bttx-(_root.bttw/2*(_root.btts/100))) and (_root._xmouse < (_root.bttx + root.bttw/2*(_root.btts/100))) and (_root._ymouse > (_root.btty-(_root.btth/2*(_root.btts/100))) and (_root._ymouse < (_root.btty+(_root.btth/2*(_root.btts/100))) and (_root.btts < 300)) {
    _root.btts += 2;
    if (((_root._xmouse <(_root.bttx-(_root.bttw/2*(_root.btts/100))) or(_root._xmouse >(_root.bttx + root.bttw/2*(_root.btts/100))) or(_root._ymouse <(_root.btty-(_root.btth/2*(_root.btts/100))) or(_root._ymouse >(_root.btty+(_root.btth/2*(_root.btts/100)))) and (_root.btts > 10 )) {
    _root.btts -= 2;
    _root.btt._xscale = _root.btts;
    _root.btt._yscale = _root.btts;



    hope it works & makes fun,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center