Stick Page Forums Archive

Button question

Started by: Lars | Replies: 11 | Views: 818

Lars
2

Posts: 38
Joined: Dec 2005
Rep: 10

View Profile
May 24, 2009 11:17 AM #423916
Hey,

So I'm making some sort of dress-up game for school.
But I need to know some more clear and advanced way than drag&drop,

How to make a button (what AS?) to have like a next/prev arrow that scrolls
through what kind of pieces of pants are available?

I tried the AS 2.0;

on.Release nextframe (you prolly know what I mean)

But didn't worked.
N T
2

Posts: 1,825
Joined: Oct 2008
Rep: 10

View Profile
May 24, 2009 11:28 AM #423922
if you want to go to the another frame?:

on(release){
_root.gotoAndPlay(frame number ) }
Chimaera
2

Posts: 2,490
Joined: Oct 2005
Rep: 10

View Profile
May 25, 2009 12:03 PM #424666
gotoAndStop would be more appropriate, otherwise it will zip through all the frames. OP states it's for a game.
Lars
2

Posts: 38
Joined: Dec 2005
Rep: 10

View Profile
May 25, 2009 1:40 PM #424695
Ok, it works yes. But need more help.

I now made like a button and got like ~6 pieces of Shirts and aswell Pants.
Now I made the first button (a previous and next one) for the Shirts,
and filled in every keyframe to wich frame it should go.

Now I did the same for the pants, but some combinations aren't possible,
because it also changes the frame of the Shirt of course.

What options now?
Aycaramba
2

Posts: 766
Joined: Apr 2007
Rep: 10

View Profile
May 25, 2009 1:50 PM #424702
Do the same thing, only this time, do it in a movie clip.
Lars
2

Posts: 38
Joined: Dec 2005
Rep: 10

View Profile
May 25, 2009 1:56 PM #424704
Care to explain a lil more detailed?

U mean making the pieces a movieclip or the buttons?
Wich I guess u mean the ieces.. but still.
What do I fill in at the button what to show?

Petty annoying, I always found out good tutorials that helped me if I
needed help with Flash AS. But somehow I can't seem to find some sort of
tutorial on this one.
Aycaramba
2

Posts: 766
Joined: Apr 2007
Rep: 10

View Profile
May 25, 2009 2:21 PM #424718
Hmm, you could do like this instead, if it sounds confusing.
Make 2 buttons.
on the "next" button, put this;

on(release){
shirts.gotoAndPlay(nextFrame);
}


And on the "previous" button put this;

on(release){
shirts.gotoAndPlay(prevFrame);
}

Next:
Create a new symbol, name it "shirts".
Put the shirts in the MC, and put every shirt on a seperate frame, like you did with the pants.
type "stop();" without the quotes on every frame.
Done.
Lars
2

Posts: 38
Joined: Dec 2005
Rep: 10

View Profile
May 25, 2009 5:12 PM #424845
Ok.. I understand the AS a part of it.

Look at the picture, hopefully it explains good enough what I've done:
http://i41.tinypic.com/vqqhz6.jpg

Now I'm stuck.
As you can see on the Right-low menu, I made all pants on every frame a MC.
What now?
Aycaramba
2

Posts: 766
Joined: Apr 2007
Rep: 10

View Profile
May 25, 2009 7:42 PM #424968
You're doing it wong, you need to make an mc called pants/shirts/whatever.
Then put every pant on a seperate frame, and type "stop();" on every frame too.
Then you have to put an instance name on the mc (if you use the code I gave you, name it "shirts", or just change the "shirts" in the code to whatever you like, and name the mc instance the same.)
After that, go to the main stage, and make the "previous" and "next" buttons.
Put the code that I previously posted in those buttons.
Done.
I hope it doesn't sound too confusing.
Lars
2

Posts: 38
Joined: Dec 2005
Rep: 10

View Profile
May 25, 2009 7:52 PM #424975
Ow.. I'm missing the step that I first make a MC symbol.
Ow well, I tried that first, but how to make a MC from.. well, nothing?
Cause u tell me to first make a MC and make a seperate frame for every pants/shirts.

This is prolly the part where I'm stuck at.
Cause I understand all the AS know u submitted, but the starting point. :(
Aycaramba
2

Posts: 766
Joined: Apr 2007
Rep: 10

View Profile
May 25, 2009 7:56 PM #424978
You make the frames inside the symbol.
Lars
2

Posts: 38
Joined: Dec 2005
Rep: 10

View Profile
May 25, 2009 9:39 PM #425034
Nope.. I'm stuck at making a MC for the shirts.

God.. I feel stupid... -.-
I can't make a symbol out of nowhere, like:
Make a new layer, press F9, nothing pops up.
Website Version: 1.0.4
© 2025 Max Games. All rights reserved.