A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: [F8] Action Script- Doll Maker help?

Hybrid View

  1. #1
    Junior Member
    Join Date
    Jul 2007
    Posts
    4

    [F8] Action Script- Doll Maker help?

    Hey all. I joined for some help in Flash8, and right now, this is my problem....

    I'm working on a doll maker type of game, and require an action which includes changing certain parts by clicking a button. I thought that there might be a simple script effect where you can click the button to switch one symbol with another, but I'm still new to the Script, so I'm unsure on how to do it. Can anyone help me out with this?

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Here's a rough example of one where you can click on the shirts...
    Last edited by dawsonk; 08-22-2007 at 10:50 AM.

  3. #3
    Junior Member
    Join Date
    Jul 2007
    Posts
    4
    Quote Originally Posted by dawsonk
    Here's a rough example of one where you can click on the shirts...
    Hm, a good example... Though, what I need is simply a change in facial expression. I want to try to make it as simple as possible, considering the only script I've done at this point has just been timeline-related..

  4. #4
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Here's one where a button changes the eyes. See attached file...
    Last edited by dawsonk; 08-22-2007 at 10:50 AM.

  5. #5
    Junior Member
    Join Date
    Jul 2007
    Posts
    4
    Quote Originally Posted by dawsonk
    Here's one where a button changes the eyes. See attached file...
    That is EXACTLY what I need. How do you do it, exactly?

  6. #6
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Quote Originally Posted by Malunis_T
    How do you do it, exactly?
    Are you asking about the coding or creating movie clips or ???

  7. #7
    Junior Member
    Join Date
    Jul 2007
    Posts
    4
    Quote Originally Posted by dawsonk
    Are you asking about the coding or creating movie clips or ???
    The script.

  8. #8
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Code:
    stop();
    // stops that main time line from playing
    faceEyes.stop();
    // stops the movie clip instance name of faceEyes from playing
    btnChgFace.onPress = function() {
    	// sets up a function to play when the movie clip instance name btnChgFace is pressed
    	// this function displays the next frame of the faceEyes movie clip, when it reaches
    	//  the last frame t will cycle back to the first frame
    	if (faceEyes._currentframe == faceEyes._totalframes) {
    		// check if current frame of movie clip instance name of faceEyes is on the last frame
    		faceEyes.gotoAndStop(1);
    		// was on last frame so, go to and stop on the first frame
    	} else {
    		faceEyes.gotoAndStop(faceEyes._currentframe + 1);
    		// not on last frame so go to and stop on the next frame
    	}
    };

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