Attach movie issue

I dont know if this is known or not or if Im the first to stumble on it (which I wouldnt think so since its also present in Flash 5) but, if you have an instance of a movieclip on the stage and convert its type to a button, assuming that that button is the highest instance of that movieclip on the stage in comparison to all other instances of that clip, then, when you use attachMovie on that clip in the library, the attached clip will be of the type button. Also, in this, no passed initObject properties (MX) are copied into the newly attached, what is now, button.

There are no issues if the highest instance is a graphic, then attachmovie functions correctly and adds a graphic.

its something weird and something to be aware of. I just figured this out just now, but if youve heard about this before Id like to know :slight_smile:

happy flashing

Good to know man. Thank you for sharing.

I don’t usually change my movie clips to buttons though, since I use MX I can use button handlers on my movie clip so I don’t see the need to do that. (or am I overlooking something)

But definitely some good knowledge to have.

wow man, that made no sense to me, but I’m not kidding when i say it was fascinating.

*Originally posted by lostinbeta *
**I don’t usually change my movie clips to buttons though **

yeah me either which is why I just noticed now. The only time I do is for testing, then I only have to make one symbol, a movieclip - then dup and convert to a button to test button actions on. Actually, that being the case, I dont see how I could have not seen this before?

*Originally posted by lostinbeta *
** since I use MX I can use button handlers on my movie clip so I don’t see the need to do that. (or am I overlooking something) **

the thing there is that movieclip actions are still set in the scope of that movieclip. Buttons are set in the scope of the clip they are in, so for referencing clips within that scope, a button instance would just need the clip name and not a _root or _parent prefix.

Ok, makes sense.

yeah its not really a big deal :wink: but for quick buttons to control things in that area, its easy to use… buttons.