Selecting Characters

  • MovieClip
  • Born
  • Born
  • MovieClip
  • Posts: 1

Post 3+ Months Ago


Imagine that I have 4 characters and I want to select one and load it in a particular place to play with it. There is some easy way to do it in actionScript 2.0?

I'm sorry to bother you with this, but I'm on an informatic course and currently developing a final project and I can't solve this problem which is driving me insane.

It would be wonderful if you guys could hook me up.

With the best regards.
  • Zielak69
  • Novice
  • Novice
  • Zielak69
  • Posts: 21
  • Loc: Poland

Post 3+ Months Ago

I've managed to do this ages before + with possibility to unlock special characters with password.
Here's the thing:
1st of all, the character movement script can not be on the character itself, it need to be in the mainframe because we're going to load characters directly from library. Open up library and set all characters MovieClip as ActionSctipt exportable, I don't know how exactly does that looked like in AS2 but I hope you'll find it out.
You need to create an array to hold all informations about the characters
var chars:Array = new Array();
chars[0] = "the name of char in library";
and of course the variable with the name of character that is going to be used:
var character:String = ""; //empty at the beginning
Then make some sort of list with the characters of any kind and when user pick a character make the `character` variable to be set as chosen character's name.
In the main thing just use `attachMovie` function and here we go!

If you have any questions, ask.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 3 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-2017. Ozzu® is a registered trademark of Unmelted, LLC.