Skip to main content
March 21, 2014
Question

MovieCLip Comparation

  • March 21, 2014
  • 1 reply
  • 626 views

Good night. A Hug from Venezuela!
I am entering the world of Flash and as3 and I have a question about the movie clip.
I have a movie clip and each has a value, my question is:
As I can make a comparison between them to see which is the greater and which is smaller?

example:
I have 10 cards and compare between them to see which is the highest and lowest
How can I do this?
thnks All !

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
March 21, 2014

Assign each movieclip's value as a property of that movieclip and then compare the values against each other.

if(movieclip1.value > movieclip2.value){

     trace("movieclip1 is highest")

}

March 21, 2014

thanks for replying.

Sorry but I still do not understand very well the technical mastery in English language I'm using the google translator

Might you give me an example, I fail to understand code better? Thanks and sorry to bother
"Assign each movieclip's value as a property of that movieclip"

Ned Murphy
Legend
March 21, 2014

"Assign each movieclip's value as a property of that movieclip"

Movieclips are dynamic objects which means you can assign properties to them dynamically...

movieclip1.value = 1;

movieclip2.value = 2;

etc....