Director FAQ [14] Objects, Parent Scripts & Factories [14.7] I want to put objects on the stage on the fly. How do I allocate channels?
The key thing to realize is that the objects you create, and the sprites onstage, are separate entities. The sprites will behave just like sprites always behave, whether you’re controlling them with objects or ordinary lingo scripts. In order to put an object onstage, you have to have a channel for it to go into, and in order to use that channel, it must already have something in it. So, if you want to create a bunch of object-sprites, you need to prepare the channels for them in advance when you create the movie. Decide on a range of channels that you’ll set aside to put the objects in when you create them. Put some dummy sprites into these channels: an invisible tools palette rectangle is good for this, since it doesn’t take up much space (use the same cast for all these dummy sprites rather than having one each!). You may want to start the movie with all these sprites safely offstage where they won’t get in the way. The sprites you choose needn’t be contiguous, but it’s probably eas
Related Questions
- Director FAQ [14] Objects, Parent Scripts & Factories [14.9] How are factories different from parents, and is there any reason to use them instead?
- Director FAQ [14] Objects, Parent Scripts & Factories [14.10] Do I need to dispose of these objects when Im done?
- Director FAQ [14] Objects, Parent Scripts & Factories [14.6] Do objects always relate to sprites?