dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Can a movie clip perform a different function each time it is clicked?

  1. #1
    Junior Member
    Join Date
    Jan 2005
    Location
    Colorado
    Posts
    1

    Can a movie clip perform a different function each time it is clicked?

    I would like to know how to get a movie clip to play the first half of second movie clip's timeline when clicked for the first time, then the second time it is clicked, I would like the second movie clip to play the second part of its internal timeline.

    Is this even possible, and if so how?

    Thanks!

  2. #2
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    Sure, for example you could do something like:

    Code:
    clip.clickTimes=0;
    clip.onRelease=function(){
    if(this.clickTimes==0{
    this.play();
    }else {
    this.gotoAndPlay("secondHalf");
    }
    }

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