Hey guys, I’m pretty experienced with as2. I’ve been doing OOP in it for a long while now… but they changes from as2 to as3 have completely thrown me off. Things that were once the simplest things now are impossible for me to do. I need help with a few things :
**MovieClip(root).foo
**I keep reading how this casts root as a movie clip, but unless the syntax is extremely unique, this looks nothing like a cast in Java or C++. Can someone give me a detailed explanation of why this is needed and what it is achieving?
**Playing movie clips with code
**I’m attempting to do something very simple, play a movie clip when a variable has attained a certain value. Lets say the movie clip is I’m trying to play is “bob”. The path to the this movie clip is root->environment->bob. When I attempted to do this I would get the error
ReferenceError: Error #1069: Property environment not found on flash.display.Stage and there is no default value.
**Garbage Collector
**I’ve read it’s only possible to delete dynamically created object properties, and it’s impossible to delete anything else that is created dynamically. The only other option is to set that objects value to null. So if an object has been set to null, is it ok to assume that the garbage collector will free up that memory relatively soon?
**Looping
**In the past for my games, I would simply create a function in the main timeline that would loop forever once the main timeline reached that frame until I stopped it. How could I achieve something similar in as3?
Thanks for any replies and help.