开发者

packages cannot be nested

its giving error on importing mx.res开发者_如何学Pythonource.resourcebundle that packages cannot be nested

package common
{
    import common.clsGlobals;

    import flash.desktop.NativeProcess;
    import flash.desktop.NativeProcessStartupInfo;
    import flash.events.IOErrorEvent;
    import flash.events.NativeProcessExitEvent;
    import flash.events.ProgressEvent;
    import flash.filesystem.File;
    import flash.filesystem.FileMode;
    import flash.filesystem.FileStream;

    import mx.collections.XMLListCollection;
    import mx.controls.Alert;
    //import mx.events.FileEvent;
    import mx.resources.*;


That's some stupid Flex Builder error that usually says that you have some other error in your application and sometimes - that you have no errors at all. Clean you project (Project menu -> Clean) and it should be gone.


You'll get this error if the given code is part of an <mx:Script></mx:Script> tag in an mxml file. That can happen when you use the <mx:Script source="filename.as"/> method to include ActionScript to your mxml components. If that is the case here, you can fix it by deleting the package block.

I'd rather copy the code into the CDATA block inside the <mx:Script> tag than keeping it in a separate file, but that's your choice.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜