[Solved] convert action script 2 to action script 3


I think that you want to understand that AS2 code not to convert it.

That code is apparently used inside a component(Button, MovieClip)’s code and it’s just trying to concatenate the name of that component to a global string (_root.components).

For example, if I’ve a button called button and a MovieClip called movieclip, when I execute that code using their onPress() functions, I’ll get something like this :

_level0.button _level0.movieclip

Hope that can help.

solved convert action script 2 to action script 3