A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: going backwards by frame label in a mc/bttn

  1. #1
    Member
    Join Date
    Mar 2006
    Posts
    48

    going backwards by frame label in a mc/bttn

    I created a movie clip with 2 frame labels with 10 frames each: part1, part2.
    Each of both frame labels have 1 button.
    The first button has a rollover to play part2.

    The second button (the one is part2) has a Rollout that I want to go backwards until reaches the beginning of part2 one frame at the time. how can I do that?

    Part1 has a animation that does not need to played twice. Thats why I need the button in the "part2" to go backwards to frame "10" or the beginning of part 2.

    Thank you for your response dudes.

  2. #2
    Member
    Join Date
    Mar 2006
    Posts
    48
    Anyone please?

  3. #3
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    place this code in a seperate layer inside the movieclip.
    PHP Code:
    var beginning:Number 10;// this is the number that will be the beginning of your rollout frame number
    var reversing:Boolean=false;
    this.onEnterFrame = function() {
        if (
    reversing) {
            if (
    this._currentframe>beginning) {
                
    this.prevFrame();
            }
            if (
    this._currentframe == beginning) {
                
    reverse false;
            }
        }
    }; 
    place this code for the button to trigger reverse action (when you rollover)
    PHP Code:
    on (rollOver) {
        
    reversing true;


  4. #4
    Member
    Join Date
    Mar 2006
    Posts
    48
    thank you

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