Bachalo
Bachalo

Reputation: 7219

Associate Class with MovieClip already on stage

Trying to resurrect some ancient AS2 voodoo. Can't seem to associate a MovieClip already on the stage with an existing Class file.

Of course, this is simple in AS3....trying to do so in AS2 doesn't seem as straightforward.

Any AS2 ninjas still out there?

Googling isn't much help simply because AS2 is at least 8 years old!

Upvotes: 0

Views: 42

Answers (2)

Bachalo
Bachalo

Reputation: 7219

The answer seems to be to simply define a Library linkage to the Class, thought it doesn't always seem to work properly.

Upvotes: 0

Jan
Jan

Reputation: 445

This is not possible at runtime, neither in AS2 nor in AS3. However, withinin the MovieClip, you could create a variable of the existing class and instantiate it. This will probably result in some code changes within the existing class when there are assignments to objects on the root/stage of the MovieClip.

Upvotes: 1

Related Questions