how to use actionscript instead of 10000 frames, please help!

  • Sus
  • Newbie
  • Newbie
  • Sus
  • Posts: 9
  • Loc: Sweden

Post 3+ Months Ago

Hi

I am making a game in Flash with an artificial pet as a main character.

I would like to personalize the pet by letting the user choose between a lot of different clothing combination. Trying to keep the file size (and amount of work) low, I look for a way to let the pet have different clothing combination without me having to make every animation with every possible combination of clothes(that would result in a huge amount of frames).

Perhaps there's a way to use actionscript, e.g. having the body as an object and the choices of combinations as different values put on the object, instead of just painting every combination out for every step the pet takes (in 10000 frames)?

Does anyone (understand what I mean :wink: and) know how I can accomplish this?

I am soooo grateful for any suggestions!



/Susanna, newbie in actionscript and desperate :wink:
  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

:roll:
maybe you should start actionscript from the begining ...
how far have u reached in actionscript ?
  • Sus
  • Newbie
  • Newbie
  • Sus
  • Posts: 9
  • Loc: Sweden

Post 3+ Months Ago

well... I have'nt needed it until now, have just used simple stuff like gotoAndPlay ...I hoped it would be easy to jump right in because I know other object oriented language, but what a fool I was :P
  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

Sus wrote:
well... I have'nt needed it until now, have just used simple stuff like gotoAndPlay ...I hoped it would be easy to jump right in because I know other object oriented language, but what a fool I was :P


its good if u have general knowledge of programming language , as is somehow similar to Java , well kind of , i find as much easier ...

but i recommend that u start from the begining , just to see how things are done .
and if you need further help , u can post in here ..
  • minipwn
  • Beginner
  • Beginner
  • minipwn
  • Posts: 38

Post 3+ Months Ago

I would use Arrays to set different clothing categorys such as Hats or Shirts with colors, that may save alot of frames, if that is what your trying to do.
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

object: Pet (in flash case will be a movieclip)
properties: hairID, hairColor, clothID, clothColor ... etc
methods:
SetClothColor(iColor);
SetHairColor(iColor);
LoadClothStyle(id);
LoadHairStyle(id);

usefull flash commands: loadMovie;
if you want a on the fly change color for any image, just let me know, i'll provide you the code
  • Sus
  • Newbie
  • Newbie
  • Sus
  • Posts: 9
  • Loc: Sweden

Post 3+ Months Ago

thanks a lot! :D
  • Sus
  • Newbie
  • Newbie
  • Sus
  • Posts: 9
  • Loc: Sweden

Post 3+ Months Ago

Quote:
if you want a on the fly change color for any image, just let me know, i'll provide you the code


Yes please! :D
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

Code: [ Select ]
myColor = new Color(mc1); // mc1 = instance of the movieclip
myColor.setRGB(0x990077); // the new color
  1. myColor = new Color(mc1); // mc1 = instance of the movieclip
  2. myColor.setRGB(0x990077); // the new color

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 5 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.