The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 2 of 2

Thread: Stage Resize + Math

  1. #1

    Stage Resize + Math

    I've got a Movie Clip on the bottom of my stage that's being positioned on Stage Resize:

    Code:
    drawer_mc.y = sh - drawer_mc.height + 120;
    It has a button on it that, when clicked, will change the Y position so that it opens up to reveal control options inside.

    I can't figure out the math to open this item up and keep it at the bottom of the stage in case someone resizes the stage. Right now this is working:

    Code:
    drawerTY = new Tween(drawer_mc, "y", Regular.easeIn, drawerMCy, drawerMCy - 30, .5, true);
    drawerMCy - 30 does the trick, but if you keep clicking the button, it keeps moving up the screen 30 pixels at-a-time.

    Any suggestions?
    Al Lemieux
    Lemieux Design
    http://www.lemieux-design.net

  2. #2
    Never mind, I figured it out. Using a conditional statement instead.

    Quote Originally Posted by alemieux34 View Post
    I've got a Movie Clip on the bottom of my stage that's being positioned on Stage Resize:

    Code:
    drawer_mc.y = sh - drawer_mc.height + 120;
    It has a button on it that, when clicked, will change the Y position so that it opens up to reveal control options inside.

    I can't figure out the math to open this item up and keep it at the bottom of the stage in case someone resizes the stage. Right now this is working:

    Code:
    drawerTY = new Tween(drawer_mc, "y", Regular.easeIn, drawerMCy, drawerMCy - 30, .5, true);
    drawerMCy - 30 does the trick, but if you keep clicking the button, it keeps moving up the screen 30 pixels at-a-time.

    Any suggestions?
    Al Lemieux
    Lemieux Design
    http://www.lemieux-design.net

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012