A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: where i went wrong, simple one

  1. #1
    Member
    Join Date
    Dec 2000
    Posts
    55

    where i went wrong, simple one

    hai all.....
    on a movie clip this is the script
    onClipEvent(load){
    this._yscale = 10
    _yscale = yy
    yy = 2
    }
    onClipEvent(enterFrame) {
    this._yscale += yy
    if(this._yscale == 55)
    this._yscale -= 2
    }
    so it grows in yscale, but after reaching size 55 it need to come back to size 10 this is effect which i want, but iam unable to achive..help me.

    thanks
    nau

  2. #2
    Senior Member
    Join Date
    May 2003
    Posts
    157
    Two things

    first make if >=55 so cos if you start at and even number and go up by 2 each time you'll miss 55 and so it'll never stop.

    And I'd get rid of "this._yscale -= 2" and make "yy = -2;" instead.

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