HOME | DD

pichu90 — Flash Button Tutorial I

Published: 2007-10-24 05:03:36 +0000 UTC; Views: 16721; Favourites: 197; Downloads: 327
Redirect to original
Description This is probably past due for some, and I apologize

Several people have asked me about making a tutorial that changes the color of the dress up character with the push of a button. This tutorial will show you how to do that if you have a dress up already going but would like to add this feature.

This tutorial assumes you know how to create a dress up, and a little bit of actionscript too. It's very basic, it demonstrates how to add a button to a sample dressup. You can find the demo dressup here: [link]

For how to create a dressup, check out my basic dressup tutorial here: [link]

Hope this helps those who have been asking this for months.

This also required you to have Flash MX 2004.
Related content
Comments: 93

2SkyDragon [2008-01-18 03:31:41 +0000 UTC]

It doesn't work for me...
I have Flash Professional 8... Uhh...
I suppose I should be doing something else. XD

👍: 0 ⏩: 0

RDeis [2007-12-23 00:55:08 +0000 UTC]

The code didn't work for me... T_T

👍: 0 ⏩: 1

pichu90 In reply to RDeis [2007-12-23 03:29:39 +0000 UTC]

What's the problem?

👍: 0 ⏩: 1

RDeis In reply to pichu90 [2007-12-23 03:47:22 +0000 UTC]

Not sure, it gave me about 4 different errors about the ColorChange name, which I did make sure ot name the button.

👍: 0 ⏩: 1

pichu90 In reply to RDeis [2007-12-23 04:30:00 +0000 UTC]

Remember to name the button "ColorChange" in the properties window too, right below where it says "Button"

👍: 0 ⏩: 1

RDeis In reply to pichu90 [2007-12-23 04:34:56 +0000 UTC]

I did, though, that's the confusion.

👍: 0 ⏩: 1

pichu90 In reply to RDeis [2007-12-23 04:57:24 +0000 UTC]

Could you tell me the error Flash gave you?

👍: 0 ⏩: 1

RDeis In reply to pichu90 [2007-12-23 19:32:46 +0000 UTC]

Um, it gave 3.
Accessof possibly undefined property flash.display:SimpleButton.ColorChange.onRelease = function() {
Accessof undefined propert _currentFrame
Access of undefined proprety _totalframes

And I put the actions as
"stop();
ColorChange.onRelease = function() {
if(_currentFrame < _totalframes)
nextFrame();
else
gotoAndStop(1);
}"

👍: 0 ⏩: 1

pichu90 In reply to RDeis [2007-12-23 22:44:02 +0000 UTC]

Is your Flash MX 2004?

👍: 0 ⏩: 1

RDeis In reply to pichu90 [2007-12-23 23:55:45 +0000 UTC]

CS3

👍: 0 ⏩: 1

pichupet101 In reply to RDeis [2008-01-19 02:38:58 +0000 UTC]

Oh, try going to File=>ublish Settings than select Flash, and change it to V. 1 It's suppose to work because I'm pretty sure that's the same version has. :3

👍: 0 ⏩: 2

RDeis In reply to pichupet101 [2008-01-19 03:12:03 +0000 UTC]

Thanks! I figured out how to do it on my version, but it doesn't work on earlier versions of flash, good to have something that does. ^_^

👍: 0 ⏩: 1

pichupet101 In reply to RDeis [2008-01-19 03:40:54 +0000 UTC]

Luls, I'm trying to follow the color changing code, but it still doesn't work. >.>; How'd you do it? :3

👍: 0 ⏩: 1

RDeis In reply to pichupet101 [2008-01-19 03:44:29 +0000 UTC]

Well, first, what are you using? I'm using a code that only works if you play it in Flash 9 and using Flash CS3

👍: 0 ⏩: 1

pichupet101 In reply to RDeis [2008-01-19 03:48:15 +0000 UTC]

I can do it on flashCS3, but than I would have to know the code for the drag-the-clothing thing too.

👍: 0 ⏩: 1

RDeis In reply to pichupet101 [2008-01-19 03:52:02 +0000 UTC]

:/ I haven't figured that out yet.... I guess try to use that one and save it as an earlier version. I haven't done that- though.

👍: 0 ⏩: 1

pichupet101 In reply to RDeis [2008-01-19 04:08:52 +0000 UTC]

'Kay. I'll try to figure it out. >.> (tedious work isn't it...? >x>; )

👍: 0 ⏩: 1

RDeis In reply to pichupet101 [2008-01-19 04:11:00 +0000 UTC]

Very :/ I'm sure once you get used to it it's easy, but until then... @_@ The coidng takes half the time!

👍: 0 ⏩: 0

pichupet101 In reply to pichupet101 [2008-01-19 02:39:18 +0000 UTC]

Oh, sorry, it's PUBLISH settings.

👍: 0 ⏩: 0

MoosieMoo [2007-12-16 21:38:58 +0000 UTC]

Could you post the actionscript so I could copy and paste it?

👍: 0 ⏩: 1

pichu90 In reply to MoosieMoo [2007-12-17 01:03:40 +0000 UTC]

on(press){
startDrag("");
}
on(release){
stopDrag();
}

👍: 0 ⏩: 0

K-PUZ [2007-11-21 04:04:23 +0000 UTC]

wow, this would be very helpful if i had flash haha
hmm, who is dat chu?

👍: 0 ⏩: 1

pichu90 In reply to K-PUZ [2007-11-21 04:16:49 +0000 UTC]

No chu in particular, I just thought it was a fun combination to try hehe

👍: 0 ⏩: 1

K-PUZ In reply to pichu90 [2007-11-21 05:52:02 +0000 UTC]

hehe, i was thinking the bat+pikachu, it is on my front page

👍: 0 ⏩: 0

KCoyote [2007-10-30 06:02:15 +0000 UTC]

woot awesome, thankyouu. I will defiantly use this for my next dress-up.. god knows when that'll be made though x.x

👍: 0 ⏩: 1

KCoyote In reply to KCoyote [2007-11-16 05:26:07 +0000 UTC]

aw tried and it didnt work. It treated it like a movie and flashed the colours of the base really fast when i tested it lol Any idea how to fix that?

👍: 0 ⏩: 1

pichu90 In reply to KCoyote [2007-11-21 05:51:37 +0000 UTC]

Usually that happens if there's an error with the actionscript, or the actionscript may have been placed in the wrong place. Make sure the code is in "Actions-Movie Clip" and that you name the button accordingly. I wish I could help more but hope this helps! ^^

👍: 0 ⏩: 2

KCoyote In reply to pichu90 [2007-12-18 05:37:17 +0000 UTC]

ahh i think ive almost got it (I think xD) but im having some problems with the actionscript. I cant tell where you put the spaces.. is it possible you could post the actionscript? I saw below someone asked the same thing.. but that isnt the same actionscript as in the tutorial :S sorry im so annoying xD

👍: 0 ⏩: 1

pichu90 In reply to KCoyote [2007-12-18 09:15:14 +0000 UTC]

Ah, here ya go! ^^

stop();
ColorChange.onRelease = function() {
if (_currentFrame < _totalframes)
nextFrame();
else
gotoAndStop(1);
}

👍: 0 ⏩: 1

KCoyote In reply to pichu90 [2007-12-18 09:43:39 +0000 UTC]

awesome thanks

👍: 0 ⏩: 0

KCoyote In reply to pichu90 [2007-11-21 12:56:18 +0000 UTC]

hmm ok, i'll give it another go, thanks ^^

👍: 0 ⏩: 0

thesorcerousisfat In reply to ??? [2007-10-26 08:34:48 +0000 UTC]

DAHHAHAHAHA *explodes* YAAYYY
THIS SHALL HELPP MEEEE *zooms off to complete dressup

👍: 0 ⏩: 0

Vanillafox [2007-10-24 20:07:31 +0000 UTC]

I needs help STARTING my flash,xD,it keeps saying,'update avalible' i push not now,and it doesnt start,and when i do the update it says ti the next time.this'll help when i get it started tho >w<

👍: 0 ⏩: 0

jhubert In reply to ??? [2007-10-24 09:45:33 +0000 UTC]

Added to the Art Tutorials Wiki .

👍: 0 ⏩: 0

Eledora In reply to ??? [2007-10-24 09:04:58 +0000 UTC]

So this is how you make the color change!
This is really helpful! Perhaps I really should try out this feature sometime...

👍: 0 ⏩: 0

Spyroflamesredsbum [2007-10-24 07:41:59 +0000 UTC]

OMGPOO
THIS IST LIEK SO DARN HELPFUL DUDE o-o
Jess shall blow up *goes to contact ~thesorcerousisfat *

👍: 0 ⏩: 1

Spyroflamesredsbum In reply to Spyroflamesredsbum [2007-11-04 02:14:08 +0000 UTC]

ZOMG D: Pichuuu i tried and it no works D:

👍: 0 ⏩: 0

PlushPaws In reply to ??? [2007-10-24 06:14:40 +0000 UTC]

thanks you i well try this later ^^

👍: 0 ⏩: 1

pichu90 In reply to PlushPaws [2007-10-24 06:17:16 +0000 UTC]

Yes please, let me know if it helps you out! ^^

You welcome! ^^

👍: 0 ⏩: 0

Dark-Mightyena [2007-10-24 05:04:45 +0000 UTC]

great job

👍: 0 ⏩: 1

pichu90 In reply to Dark-Mightyena [2007-10-24 05:15:16 +0000 UTC]

Thanks, btw do you have Flash?

👍: 0 ⏩: 1

Dark-Mightyena In reply to pichu90 [2007-10-24 20:04:49 +0000 UTC]

no why?

👍: 0 ⏩: 0


<= Prev |