I have a custom class that is extended from MovieClip. The class is basically creating a button that uses frame labels in the MovieClip to move between button states as mouse events are dispatched. Each state (each approx 20 frames long) is terminated with a timeline stop()
.
This class has been used in numerous other projects, but after a certain point in my current application any buttons created as an extension of my button class stop executing the code on the timeline, and just play on a loop. This includes any traces put into the timeline, but all code in the class still executes correctly, even the gotoAndPlay calls when the button state changes.
The strangest part is that no error is thrown by any of the misbehaving button instances on the stage.
What I need are suggestions of what could prevent any object that extends a certain class from executing timeline code without throwing an error.
Thanks!
UPDATE: This still has me stumped. Our projects usually come in three parts: a lightweight preloader, a language and age gate, then the main application. Each is loaded into the previous, each time using the current application domain. After the main application has been loaded, any custom display object that extends MovieClip (directly or indirectly) will ignore any actionscript directly on its timeline. The playhead can still be controlled though the class however.
UPDATE 2: This is the code in the test button class that I have made. Notice how there is nothing in it.
package com.test
{
import flash.display.MovieClip;
public class TestLabelButton extends MovieClip
{
public function TestLabelButton():void
{
}
}
}
Update 3: So I've narrowed it down, but it's strange. It seems that I can load my language gate into the preloader just fine, with the language gate being an swf with a custom document class that extends MovieClip. After that though, if I load any more SWFs that contain a custom doc class extending MovieClip it's like all subsequently instantiated MovieClips of extentions thereof loose all the code on their timelines.
From what you describe it sounds like when you run a SWF in the FlashIDE with compile errors.
It will just loop though all the frames.
I am sure you have seen it before normal flash buttons just flicker.
Have you tried to take the offending MovieClip and put it in a new project alone and see what happens?