AS 2.0 problem

  • Started
  • Last post
  • 3 Responses
  • Beeswax0

    I'm sorry I'm really not good at this.
    If a try the first solution should I remove page_count++; and page_count--; as well?
    Or in second solution, how can i increment the variable at the end of the function?

  • mikotondria30

    This was what aged me 10 years doing any sizable Flash project - the unpredictability of finding solutions to problems like that that meant completion dates for deadlines became more inaccurate the closer they got. 2 days to solve this ? No one can afford that - the saving grace of Flash is that there's always another way to do things. Rather than spending 2 days trying to match your concept of incrementation to that of the code you wrote to do it, and giving yourself a minor stroke and putting the project back 2 days, redo it another way. Of the top of my head - have a timeline along which you progress with the as controlling specifically which MC to addtostage, scroll out or in, and eventually removefromstage. It might seem long-hand, and a bit of a hack, but it'll work and when you come back to it in 6 months it'll be easy to understand and you won't have to relearn all the code you spent 2 days learning, that you'll forget in a weeks' time. It fits the mantra of keeping it simple and reducing code and keyframes and actions and all to try it the proper way as you have been doing, but if you haven't nailed something like that within an hour, trash it and do it quick and dirty - you don't get extra marks for being clever. Bosh it out, spend that extra time you save sprucing up the other stuff so the client loves it.

  • dasmeteor0

    Obviously it's an incrementation problem.
    onRelease you are using the old "page_count" variable.
    I suggest you to trace that variable and maybe to increment it on the release event :
    b_0.onRelease = function() {
    page_count ++;
    next_page( "Video1A_" + page_count);
    };
    b_1.onRelease = function() {
    page_count --;
    prev_page( "Video1A_" + page_count);
    };

    or

    increment your variable at the end of your next_page and prev_page functions

    But the problem is here.
    Also try to test the limits >>> I guess there's nomovieclip named Video1A_-1 or Video1A_500