开发者

Document class silently fails

开发者 https://www.devze.com 2023-01-08 01:36 出处:网络
I have this weird issue while compiling my .fla file : it won\'t use the Document class. Here is the document class. (note that the parent class EditorPlugin extends Sprite).

I have this weird issue while compiling my .fla file : it won't use the Document class. Here is the document class. (note that the parent class EditorPlugin extends Sprite).

package com.myproject.plugins.editor {
import flash.display.MovieClip;
import com.myproject.editor.EditorPlugin;
import com.myproject.editor.tools.EpisodeEditorTool;
import com.myproject.editor.tools.NewTabTool;
import com.myproject.editor.tools.ToolManager;

public class EpisodeEditorPlugin extends EditorPlugin{
    public function EpisodeEditorPlugin(){
        trace("creating", this);
        AddAuth(ToolManager.EDIT_EPISODE_AUTH, ToolManager.EDIT_EPISODE_AUTH, EpisodeEditorTool, ToolManager.EDIT_EPISODE_LABEL);
    }
}
}

The weird part is that in the line below, if I use NewTabTool instead of EpisodeEditorTool, the code works just fine, but with EpisodeEditorTool, the Class is not instanciated. There are no warnings or compiling errors, but i don't get the trace. I loaded the resulting .swf, it is not of type EpisodeEditorPlugin, but rather a simple MovieClip (via getQualifiedClassName() and is EpisodeEditorPlugin).

The EpisodeEditorTool and NewTabTool are quite similar开发者_StackOverflow社区 even though of different use, but very huge, here are their declarations :

public class EpisodeEditorTool extends JPanel implements ITool{

and

public class NewTabTool extends JPanel implements ITool{

I should add that both class contain no error (at least according to Flash) and have been compiled in other .flas before. the only problem I can see is that EpisodeEditorTool is even more huge(r?) than other ITools.

Does anyone have any idea of how a document class could fail to be applied? And fail silently at that?

Thanks!


The only thing I can really think of is that you're not specifying the name of the Document class correctly inside the Flash IDE. Inside the Properties panel there's a box where you enter the name of your Document class, which you must presumably have used if the Document class works when you rename the class to NewTabTool. I guess you put NewTabTool into that box, then changed the actual class' name, and forgot to change the reference in the Properties panel. I've forgotten that little bit when changing the name of my Document class before, I hope your solution is as simple as that!

debu

0

精彩评论

暂无评论...
验证码 换一张
取 消