A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: get current frame ????

  1. #1
    Senior Member
    Join Date
    May 2001
    Posts
    230
    how do you get the current frame (number or label) in AS for more scripting, refering to the current frame ???

    for example I have a MC that I want to go the the same frame label as the main timeine, (they are labeled identical, but could be changed if needed ) whenever the button is clicked.

    Is there any way to do this without variables ??

    thanks
    Darin

  2. #2
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    Hi...

    _currentframe will return the current frame of the targeted timeline...ie:

    _root._currentframe
    _root.movieclip._currentframe
    this._currentframe

    etc...

    K.

  3. #3
    Senior Member
    Join Date
    May 2001
    Posts
    230
    deadbeat, thanks for your reply

    why won't it work ?? (pulling my hair out)

    two buttons, one with :

    on (release) {
    gotoAndStop (_currentframe-1);
    }

    the other with:

    on (release) {
    gotoAndStop (_currentframe+1);
    }

    the movie jumps to the very last frame of the movie, no matter which one you hit, and no matter where it is on the timeline ????

    what's wrong with this script ?? (each frame in the movie has a "stop()" script on it, and otherwise works fine. . .)

    thanks
    darin

  4. #4
    Junior Member
    Join Date
    Jan 2008
    Posts
    1
    have you tried this._currentFrame ++;

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