Skip to main content
Inspiring
June 20, 2018
Question

MovieClip object becomes null on its own.

  • June 20, 2018
  • 2 replies
  • 920 views

I'm building an app in animate cc (10-frames long) and  I have a movieclip at frame 3. When I navigate through frames 4-9 and return to frame 3, the object is still there, but when I go back from frame 10, my object turns null and my app crashes. I don't have a code that would remove it from the stage. I  don't know what's happening, but that's the second time I've experienced something like this. It seems completely random and I can't seem to be able to fix it. This is really worrying.

This topic has been closed for replies.

2 replies

Ned Murphy
Legend
June 21, 2018

Is frame 10 a keyframe and does the movieclip still have an instance name assigned there if it is?

SwyzeAuthor
Inspiring
June 23, 2018

No, the app is a mobile app, so different views (frames) have different set of items. So in one frame I display game stas score, name, etc. while in another one I have a FAQ sections. The object in frame 3 doesn't exist in frame 10. This is undoubtedly a very annoying bug. I fixed it by placing the object on a separate layer and extending through the entire timeline, so that it's available in every view. I just added a new keyframe (instance name is preserved all the time), so that I could move the object out of users signt (it's an absolutely terrible workaround). I didn't want to play with the "visible" property or adding that object through code because I have several navigation buttons and I would have to add too many add/remove listeners and add/remove child, or the visible property.

Flash/animate cc can randomly lose instance names of random objects when navigating through frames.It's already happened to me 3 times on unique objects (used only once) or reused objects, e.g. same back button, but with different instance names. It's completely random.

albertd9194959
Inspiring
June 21, 2018

Hmm, are you accessing an object within the movieclip ? or the movieclip directly ?

What code do you have in frame 10 ? how does it differ to 9 and the way is accesses the object ?

Example would be good !

Regards,