A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: change size of button with Actionscript!

  1. #1
    Junior Member
    Join Date
    Mar 2001
    Posts
    4

    Smile

    I'm old programmer... but I'm new to flash programming..
    I like to know how can I change size of button with actionscript? I realy like to know that becouse I work on these problem for 5 hours now...



  2. #2
    Junior Member
    Join Date
    Nov 2000
    Posts
    25
    While this might be too simplified it can give you an idea:

    on (rollOver) {
    setProperty (this, _yscale, getProperty ( this, _yscale )+10);
    setProperty (this, _xscale, getProperty (this, _xscale )+10);
    }
    on (rollOut) {
    setProperty (this, _yscale, getProperty (this, _yscale )-10);
    setProperty (this, _xscale, getProperty ( this, _xscale )-10);
    }

  3. #3
    Junior Member
    Join Date
    Mar 2001
    Posts
    4
    I try yours suggestion but won't work...
    All buttons on page become larger!

    I like to change size only for specific button!

  4. #4
    Junior Member
    Join Date
    Nov 2000
    Posts
    25
    Originally posted by danilof
    I try yours suggestion but won't work...
    All buttons on page become larger!

    I like to change size only for specific button!
    If you are using bunch of buttons why don't you simply make it larger in the Over stage in the button symbol, why do you have to use Action Script for such a simple task?
    It is possible to make it work though the way you want.
    Just place an invisible button over the movie clip and assign
    setProperty(yourmoviename, _yscale, getProperty ( yourmoviename, _yscale )+10);
    setProperty(yourmoviename, _xscale, getProperty ( yourmoviename, _xscale )+10);
    onRollover and
    setProperty(yourmoviename, _yscale, getProperty ( yourmoviename, _yscale )+10);
    setProperty(yourmoviename, _xscale, getProperty ( yourmoviename, _xscale )+10);
    onRollout
    This way you can use as many kinds of "buttons" as you want
    while cutting on the file size.

  5. #5
    Junior Member
    Join Date
    Mar 2001
    Posts
    4

    Smile

    I have problem with menu....
    On these site i was found toturial for menus...
    http://www.flashkit.com/tutorials/Ac...29/index.shtml

    And these menu won't work becouse buttons have no URLs, becouse buttons are move clips...
    I like to add url-s to these buttons... And I don't now how to do this!

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