A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Is this right?

  1. #1
    Junior Member
    Join Date
    Oct 2004
    Posts
    27

    Is this right?

    on (release) {
    if (lit._y>30 & lit._y<142) {
    lit._y += 20;
    }
    if (lit._y == 149.9) {
    nextFrame();
    }
    }


    i basically have a menu with a "lit" mc that moves up and down to show where u are in selection. this is the actionscript that goes on the down button. when it reachs a certain point (149.9) i want it to go to the next frame when pressed again, it doesnt do this.

  2. #2
    Senior Member jbum's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    2,920
    it's very unlikely that the _y position will ever be exactly equal to 149.9 - especially considering that you are adding 20 to it.

    Perhaps you should use >= 149 or something that is more likely to happen.

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