dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: _global.hasPlayed - | Help Needed |

  1. #1
    Senior Member frostbite's Avatar
    Join Date
    Aug 2003
    Location
    Colorado
    Posts
    666

    _global.hasPlayed - | Help Needed |

    I have one more quick question

    if you have already played a frame, the script I use to skip forward to another frame is

    Code:
    if (_global.hasPlayed){
            gotoAndPlay(11);
    } else {
            _global.hasPlayed = true;
            stop();
    }
    How can I modify this so that you can say if a certain frame, not necessarily the frame you are on right now, has been played, do the following.

    In other words, say that is on frame 1, and I want to say if frame 20 has been played, then gotoAndPlay(11); but if not, stop();
    Yarrg Matey!

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    I guess you can store the frames you've already visited in an array.
    Then, you can check if that frame is in the array already or not.

    Here you have some prototypes to deal with arrays that should save you some time.

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