HOME | DD

Rose-Layon — Dress up tutorial

Published: 2007-05-29 14:34:26 +0000 UTC; Views: 47259; Favourites: 663; Downloads: 828
Redirect to original
Description ----------------- EDIT -----------------

Thanks for all the fav's and comments, they make me really happy

But I'm sorry to say that I will not be replying to comments about the ActionScript any more, I just don't have the time...

If you have any questions, I suggest searching the internet. There are lot's of good forums out there

----------------- EDIT -----------------

When I made a dress-up game I wanted some specific things, like clothes that could change color and clothing that snapped in the right place. So I looked for a tutorial. I looked all over the Internet but I couldn't fined one. So I decided to just fight whit actionscript head on. After a lot of blood sweat and tears (mostly from me and not from actionscript ) I finished my dress-up game and was very happy.

When some people asked me how I had made this I decided to write a tutorial (just because I am just THAT kind of a nice person and not at all because I could use it to score points at my school) It took me a really long time to finish this tutorial but it's finally done!

This is the first time I've made an tutorial or even tried to explain actionscript and I 'm not an actionscript expert, so if my explanations are unclear or wrong please tell me, so I can improve them. Also English is not my first language so please tell me if I made spelling mistakes so I can change that.

I've used Flash MX 2004, in case you were wondering.

Pleas tell me what you think of this tutorial and if it was of any use. And if you make a dress up game please send me the link .

--- Edit ---

Here is the code I used, so you can copy and paste it

stop();
this.onPress = function() {
startDrag(this);
};
this.onRelease = function() {
stopDrag();
if (_root.eyes, hitTest(_root.Pop)) {
setProperty(this, _x, 445.8);
setProperty(this, _y, 203.7);
} else {
setProperty(this, _x, 543.2);
setProperty(this, _y, 127.9);
}
};

and for the buttons:

on (press) {
_root.skate_pants.gotoAndStop(3);
_root.baggy_pants.gotoAndStop(2);
_root.skirt.gotoAndStop(1);
_root.punk_pants.gotoAndStop(6);
_root.short_pants.gotoAndStop(7);
}
Related content
Comments: 234

miles-tails33 [2008-09-26 19:50:10 +0000 UTC]

is this for flash CS3 ?

👍: 0 ⏩: 1

Rose-Layon In reply to miles-tails33 [2008-09-27 19:51:18 +0000 UTC]

I made mine in flash MX 2004, but it will work in CS3 if you make it in a ActionScript 2.0 file

👍: 0 ⏩: 1

miles-tails33 In reply to Rose-Layon [2008-09-27 19:58:01 +0000 UTC]

yippy


1hrs later -- I made my game not the best but I made one

👍: 0 ⏩: 1

Rose-Layon In reply to miles-tails33 [2008-09-27 20:04:24 +0000 UTC]

Good for you

And you can always get better

👍: 0 ⏩: 1

miles-tails33 In reply to Rose-Layon [2008-09-27 20:08:31 +0000 UTC]

thx

👍: 0 ⏩: 0

Kiwibon In reply to ??? [2008-09-23 16:27:11 +0000 UTC]

<3 This is a great tut n_n......

O____O

KNOW WHAT I DID WRONG? [link]

👍: 0 ⏩: 1

Rose-Layon In reply to Kiwibon [2008-09-23 20:14:36 +0000 UTC]

I'm glad you like it

You have made such cute art! <3

I think I know what your problem is, you have selected the movieClip and put the actionscript on it. But you have to click the movieClip twice so you can put the actionscript in it.

I hope that this helps

👍: 0 ⏩: 1

Kiwibon In reply to Rose-Layon [2008-09-23 21:41:26 +0000 UTC]

AH THANK YOUUU~ BUT WHERE IS INSIDE THE MOVIECLIP? >W<

👍: 0 ⏩: 1

Rose-Layon In reply to Kiwibon [2008-09-25 15:09:00 +0000 UTC]

Remember how in the tutorial I say you have to make symbols out of the things you draw? These can either be button, movieClip of graphic, and the pieces of clothing you made should be movieClips. And seeing your screen shot I think you did that right.

So now they should appear in your library (also explained in the tutorial). If you right click on a symbol in the library and you click the Edit in the menu you can edit your movieClip (you can also do this by clicking the movieClip on stage twice). Now you are inside the movieClip so here you click the Actions tab and ad the actionscript.

I hope you get it working now

👍: 0 ⏩: 1

Kiwibon In reply to Rose-Layon [2008-09-25 17:37:36 +0000 UTC]

aaahhh<3 thanks a bunch n___n Youre so smart~

👍: 0 ⏩: 1

Rose-Layon In reply to Kiwibon [2008-09-27 19:54:01 +0000 UTC]

Thank you...

I'm glad your problem is solved

👍: 0 ⏩: 0

Shini-Sara [2008-09-05 01:07:15 +0000 UTC]

This was a really nice tutorial, except when I copy/pasted the code it came up with errors T__T

"**Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 1: Statement must appear within on/onClipEvent handler
stop();

**Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 2: Statement must appear within on/onClipEvent handler
this.onPress = function() {

**Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 5: Statement must appear within on/onClipEvent handler
this.onRelease = function() {

Total ActionScript Errors: 3 Reported Errors: 3"

Do you have any idea what they mean? I don't know actionscript at all, so I'm completely lost @_@

👍: 0 ⏩: 1

Rose-Layon In reply to Shini-Sara [2008-09-07 14:58:57 +0000 UTC]

I'm glad you liked the tutorial

I hope I can help you

First of, what version of Flash are you using? Because you now have ActionScript 2.0 and ActionScript 3.0 and I made this game in ActionScript 2.0. So I don't think it will work good in ActionScript 3.0. If you have a newer version of flash that also works with ActionScript 3.0 you can choose, when making a new file, between using ActionScript 2.0 or 3.0 so this is where you should pick 2.0.

Further, if you are already using ActionScript 2.0 you should check in the tutorial if you have the ActionScript in the right place. Because it sounds like the errors come form a piece of code for clothing or something, so make sure you put the code on the frame of the MovieClip of the clothing (or what ever it is you want to make dragable)

In this part of the error "Scene=Scene 1, layer=Layer 2, frame=1:Line 1" ActionScript tells you the part of the code where the error appeared, maybe that helps too

I hope you get it working soon

👍: 0 ⏩: 2

Shini-Sara In reply to Rose-Layon [2008-09-07 16:59:48 +0000 UTC]

I thought a screen-shot would help xD
[link]

I edited the script because if I had the if/else parts in, it wouldn't go to either place I put in so I just kept one coordinate part of the code.
I had to guess to get the skirt to be where it is now (on the preview); and I'm not sure why it won't line up :[

👍: 0 ⏩: 1

Rose-Layon In reply to Shini-Sara [2008-09-08 09:40:08 +0000 UTC]

Hmm... the only thing I can think of is that your symbol/MovieClip doesn't stand on 0,0 coordinates... Are you sure they are?

Double click on the skirt MovieClip, so you can adjust it, then select everything in the MovieClip, the properties x and y should be 0 now. If they aren't, that was the problem, put them both to 0 and your problem should be fixed. If they are already 0, I really don't know what the problem is.

If that is the case and you don't get it working, I can send you a note whit my e-mail address and you can send me the flash file so I can look at it if you want

BTW I'm glad your code works now

👍: 0 ⏩: 1

Shini-Sara In reply to Rose-Layon [2008-09-08 14:28:00 +0000 UTC]

That was my problem! I was making it into a symbol at 0,0; not setting it in the properties
Thank you very much for the help :D

👍: 0 ⏩: 1

Rose-Layon In reply to Shini-Sara [2008-09-09 20:46:39 +0000 UTC]

You are welcome It was fun helping you!

When you have your dress up game finished please send me a note or something, I'd love to see it ^^

👍: 0 ⏩: 1

Shini-Sara In reply to Rose-Layon [2008-09-09 22:50:37 +0000 UTC]

Do you mind helping me again .___.?

I went back to the code you had in your description (with the edits I made), since only one coordinate made the item stick on the person and it couldn't be removed at all after that.

Now with two coordinates it sort of does the same thing. 'If' is set to (123.1, 325.5) and 'else' is set to (236.4, 379.3)
I can drag it to the 'else' coordinates, but then when I try to drag it away it goes back to the 'else' coordinates.
If I switch the 'if' and 'else' coordinates it does the same thing, only placed in a different area.

(I'm really sorry if I'm bothering you with all these problems @_@; )

👍: 0 ⏩: 1

Rose-Layon In reply to Shini-Sara [2008-09-14 15:02:58 +0000 UTC]

I don't mind your questions.

But I don't understand what is going wrong... Can you explain it a bit more?

I have send you a note whit my e-mail, so you can send me the file if you want

👍: 0 ⏩: 1

Shini-Sara In reply to Rose-Layon [2008-09-14 15:10:13 +0000 UTC]

Thank you > w<;

I have the coordinates set for point A and point B (point A is off the person, point B is on the person). I'll drag it to point B and it sticks. I try to drag it off point B and it drags, but snaps back to the body when I let go of it.

If I switch the coordinates it does the same thing, only snapping to point A rather than point B.

I hope that was clearer but I'll send you the file too > 3< Thank you very much~

👍: 0 ⏩: 1

Rose-Layon In reply to Shini-Sara [2008-09-14 20:31:59 +0000 UTC]

Okay, I think I know what's wrong

In the if else statement you put the condition that has to be true right after the if, between the brackets. So there should be the hit test. But in your code you accidentally put the setProperty there. So just repalce that whit the hit test and put the set property a little lower between the curly brackets. You also should make a movieClip out of the person and give it an instance name, just as you did whit the scarf.

Your code should look like this:

if (this.hitTest(_root.person)) {
setProperty(this, _x, 142.3);
setProperty(this, _y, 425.3);
}
else {
setProperty(this, _x, 232.8);
setProperty(this, _y, 383.5);
}

👍: 0 ⏩: 1

Shini-Sara In reply to Rose-Layon [2008-09-14 21:06:02 +0000 UTC]

O__O It works! Thank you so much! ; w;

👍: 0 ⏩: 1

Rose-Layon In reply to Shini-Sara [2008-09-14 21:10:59 +0000 UTC]

Haha, you're welcome

👍: 0 ⏩: 0

Shini-Sara In reply to Rose-Layon [2008-09-07 16:32:29 +0000 UTC]

I have flash 8, so it says Actionscropt 1.0 & 2.0.

I ended up messing around with the code for a few hours and got all the errors to go away, but now the items don't line up with the person :[

I make the symbol in the 0,0 coordinates, then enter where I want it to go but it's always above or next to the doll, not on it ><; Do you perhaps know what's wrong D: ?

👍: 0 ⏩: 0

jazminballet91 [2008-08-28 03:02:39 +0000 UTC]

but how do u dowload that one thing to make the dress up?? cool tutorial. luv u 4 this!

👍: 0 ⏩: 1

Rose-Layon In reply to jazminballet91 [2008-08-28 15:21:36 +0000 UTC]

Thank you

I don't really know what you mean...

To make my dress up game I've used Flash MX 2004. Here you can download a trial for the newest version of Flash (that is CS3) [link]

Does that help?

👍: 0 ⏩: 2

evilsnickers In reply to Rose-Layon [2009-05-27 22:13:13 +0000 UTC]

I was wondering...

because for some reason im the dumby that doesnt know how to do it..

the whole button making thing and changing the colors.. do you think you could explain that better? That's really all i don't know how to do.


any help would be greatly appreciated!

👍: 0 ⏩: 1

Rose-Layon In reply to evilsnickers [2009-06-01 21:07:03 +0000 UTC]

You're not dumb, all beginnings are hard! Keep on trying and you'll get better

Unfortunately I don't have the time right now to make an other tutorial. I'd reccoment searching google with some words like 'flash' 'actionscript' 'button' 'tutorial' and you'll find a lot of tutorials. This is a good one I found [link]

I hope this helps

👍: 0 ⏩: 0

jazminballet91 In reply to Rose-Layon [2008-08-28 21:02:06 +0000 UTC]

do you have to bye it?? and thanx! <;D

👍: 0 ⏩: 1

Rose-Layon In reply to jazminballet91 [2008-08-29 10:47:03 +0000 UTC]

Er... yes, you have to buy it...

There are other ways to get it, like illegal downloading, but that is like the name says: illegal ^^'

👍: 0 ⏩: 1

jazminballet91 In reply to Rose-Layon [2008-12-15 04:33:00 +0000 UTC]

lol wich one did you get? PS what can you do with abdobe reader 8? Can you make a tuturial about abdobe reader 8??

👍: 0 ⏩: 0

rebeliuz In reply to ??? [2008-08-26 05:07:53 +0000 UTC]

for your tutorial I understand where the first X and Y coordinates came from, but where did the 112, 96 X Y coordinates come from? If you could reply ASAP that would be nice. thank you :]

👍: 0 ⏩: 1

Rose-Layon In reply to rebeliuz [2008-08-26 12:14:23 +0000 UTC]

Those are the X and Y coordinates from the original place where the clothing stood.

So if there is a shirt standing on the left and you grab it, but instead of releasing it on the doll, you just release it on the right side is will snap back to the place on the left where it stood in the first place.

I hope its clear this way

👍: 0 ⏩: 1

rebeliuz In reply to Rose-Layon [2008-08-27 03:17:41 +0000 UTC]

ah thank you, but for some reason that code doesn't work for me, is it because you have flash MX 2004 and I have flash 8? I can only wonder..

👍: 0 ⏩: 1

Rose-Layon In reply to rebeliuz [2008-08-27 08:30:47 +0000 UTC]

No, I don't think so. Because Flash 8 is a newer version than MX 2004 it should work.

Don't you get any errors? Or maybe you have made a mistype somewhere? (I get that a lot :S)

I hope you get it working soon

👍: 0 ⏩: 1

rebeliuz In reply to Rose-Layon [2008-08-29 02:10:37 +0000 UTC]

well I copy and paste your direct code and many error lines pop up...and it is a bit frustrating...lol.

👍: 0 ⏩: 0

sapphireyuriko In reply to ??? [2008-08-13 04:13:22 +0000 UTC]

OMG!!! I've been searching for this tutorial for years!!! THANKS FOR SHARING!!!

👍: 0 ⏩: 1

Rose-Layon In reply to sapphireyuriko [2008-08-13 16:58:12 +0000 UTC]

Thank you ^^

And thank you for the

👍: 0 ⏩: 0

FireIceRobin In reply to ??? [2008-07-16 04:52:21 +0000 UTC]

Thank you so much for this tutorial!
It helped a lot
I was so happy to finally find a tutorial about snapping clothing into place.

👍: 0 ⏩: 1

Rose-Layon In reply to FireIceRobin [2008-07-30 08:01:08 +0000 UTC]

Thank you

It makes me happy it helped you

👍: 0 ⏩: 0

BonnieMcBop In reply to ??? [2008-06-27 00:57:43 +0000 UTC]

When I saw this I almost hugged my computer screen since I couldn't find tutorials ANYWHERE!
But I've got a problem-- I'm using Flash 8, maybe that's it... but I'm trying to get the button part to work, and I put in the code and changed the baggy_pants part (or whatever it was called) to the movie clip I used, and then I changed the frame, and then I finally went to go click the button for a test run and the hair (in my case) didn't change!
I don't know what I'm doing wrong

👍: 0 ⏩: 2

princessshiny In reply to BonnieMcBop [2009-02-02 10:24:37 +0000 UTC]

as long as you're using autoscrips (2.0) and not (3.0) or something. (made the same mystake)

👍: 0 ⏩: 0

Rose-Layon In reply to BonnieMcBop [2008-06-27 08:20:32 +0000 UTC]

I'm sorry, I don't really get it...

Maybe you could send me the file ore something?

👍: 0 ⏩: 0

KupoGames In reply to ??? [2008-06-23 00:09:40 +0000 UTC]

This looks very useful. I just made made a dress up game with very little actionscript, cause my scripting sucks, hopefully ma next one will have more features.

👍: 0 ⏩: 1

Rose-Layon In reply to KupoGames [2008-06-23 08:08:17 +0000 UTC]

Wow, your dress up game is already really cool!

Thank you for the

👍: 0 ⏩: 1

KupoGames In reply to Rose-Layon [2008-06-23 18:29:40 +0000 UTC]

No problem

👍: 0 ⏩: 0

carmiecarmela In reply to ??? [2008-06-16 04:20:55 +0000 UTC]

Thanksss! :thumb56389394:

👍: 0 ⏩: 1

Rose-Layon In reply to carmiecarmela [2008-06-16 08:04:54 +0000 UTC]

Your welcome

👍: 0 ⏩: 0

xXRawrcoreXx In reply to ??? [2008-06-10 12:08:55 +0000 UTC]

Thats A Very Complicated Way Of Doing It. :/

👍: 0 ⏩: 1

Rose-Layon In reply to xXRawrcoreXx [2008-06-10 13:11:51 +0000 UTC]

I'm sorry if you didn't understand...

👍: 0 ⏩: 1


<= Prev | | Next =>