A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: frame move on if statment

  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    12

    frame move on if statment

    anyone want to tell me why this MC allways jumps to frame 76...

    here is my code

    function goQuestion(e:Event){
    if(e.currentTarget.frame <=(60)){
    e.currentTarget.gotoAndPlay(60)
    }else{
    e.currentTarget.gotoAndPlay(76);
    }
    }

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    It probably goes to frame 60, then 61, which will then make it jump to 76. Did you mean gotoAndStop(60)?

  3. #3
    Junior Member
    Join Date
    May 2009
    Posts
    12

    timeline move on IF statement

    I figured it out i was using .frame insted of .currentframe...

    function goQuestion(e:Event){
    if(e.currentTarget.currentFrame <(75)){
    e.currentTarget.gotoAndPlay(60)
    }else{
    e.currentTarget.gotoAndPlay(76);
    e.currentTarget.removeEventListener("click", goQuestion);
    }
    }

Tags for this Thread

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