views:

31

answers:

2

its giving error on importing mx.resource.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.*;
A: 

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.

2DH
A: 

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.

Amarghosh