Just to amend my previous comment, in the case where I said `createClassObject()` failed but `attachMovie()` didn't, that ended up to be not quite true. `createClassObject()` didn't do anything, but `attachMovie()` created the visual portions of the clip, but it looks like none of the component's code was actually loaded, so while it appeared to be working it really wasn't.
But in the cases where one works the other seems to work as well, so I'm still wondering what the difference is. -Andy On 3/20/07, Andy Herrman <[EMAIL PROTECTED]> wrote:
I'm wondering if there are any significant differences between using `attachMovie()` and `createClassObject()` for creating components (I'm targeting for Flash 7). I just ran into a weird issue creating a ComboBox where I was using `createClassObject()` to instantiate it, but saw that elsewhere in the code it was using `attachMovie()` to create one, and both were working. Specifically, both this: mc.attachMovie("ComboBox", "myComboBox", mc.getNextHighestDepth()); and this: mc.createClassObject(ComboBox, "myComboBox", mc.getNextHighestDepth()); seems to give the same results in most cases. Is there any benefit to using `createClassObject()` over `attachMovie()` for components? The one situation I ran into where it gives different results is when using multiple SWFs from different places. I have a main movie which loads another movie that contains all the UI resources (makes branding easier). The UI resources movie contains the ComboBox in its library. If both the movies are on the local filesystem then it works fine, but if the resources SWF is on a remote web server the `createClassObject()` call fails. However, if I change it to use `attachMovie()` it works fine. So I'm leaning towards using `attachMovie()`, just to make my life easier for testing (don't have to upload the main movie every time I want to test it), but I'm wondering if that will cause issues later. -Andy
_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com