I am getting this weird error, in as2 I could change the name of timeline objects all i wanted thru code... No problemo! But in as3 its not letting me do this...
(I'm getting this error: "Cannot change name of timeline placed objects"
I'm trying to add objects to an array but I need each object to need a separate name, but As3 isn't letting me change the name...
timeline placed objects are named with instance names, that is being declared as it is loaded. So it will not allow you to change the name (it is basically written in stone).
The best practice is to addChild then give the name as you added the MovieClip
How can you do this with timeline placed objects???
pretty easy... you take the frame that the level is on convert to MovieClip (yes the whole level) then clear the frame. Now I like to think of this as a mini-map. Then you can use code to add the children by using the for loop. Once the loop is done, the whole level will be setup and you can then run the enter frame loop to take control of the objects.
Would you like me to make a demo of what I am talking about?
The thing that confuses me here is that in As2 they let you change names on runtime of timeline placed objects, but in As3 adobe decided to remove that? That seems to only be limiting control over what people can make... Oh well.