Ugly Flash bug – using linkage property breaks imported MovieClips
Man this one was nasty! The artist I work with was supplying me with fla files containing MovieClips. I’d copy and paste his MCs from his fla into my main fla. Up till this week there was no problem doing this. All of a sudden, I was no longer able to programtically use his MCs! If I added a linkage property to a MC named Basketball, and did the standard:
var myClip:MovieClip = new Basketball();
When I tried to compile the fla, it would stop on the 2nd frame and become completely unresponsive. The elements for the 2nd frame didn’t complete loading. Note this was not the same as a fla that didn’t compile right, where the playback head continously loops through the movie. I’ve never seen a movie break in this way.
Even weirder, these clips would also break the fla if they were added to the timeline!
I tried building my fla from scratch. Didn’t work. I should also note that I was able to compile and run the artist’s fla files on my machine, no problem. So there was no corruption on my machine, my copy of CS4, or in either of our fla files.
Here’s the hack that solved the problem:
I copied and pasted his MCs into an intermediate fla file and saved. I was then able to copy and paste these MCs into my main fla, use them in the timeline, or add them programatically. Weird. FWIW, he’s on a PC, I’m on a Mac – although again, transferring files has worked fine for 5 months now till this week. Thought I’d post it in case anybody else was suffering. Macromedia lives!