Error 1037

Hi all,
I am trying to include a .as file in my flex project.
I get the error 1037: Packages cannot be nested.
Any help would be great.
Regards,
Pooja

Remove "package { }" stuff from included .as file

Similar Messages

  • Error #1037 Bug Report, Flash Builder 4.6

    I tried reporting this bug through the proper channels, but the link on the page at https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform for filing Flash Builder bugs is not working.  The page it links to is "taking too long to respond".
    I'm using Flash Builder 4.6, and I'm getting error #1037.  According to the documentation at http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/runtimeErrors.html, this isn't something that should be happening, and when the programmer doesn't believe the swf has been corrupted, Adobe has requested that they report it.  Even though I feel something like this always justifies the word "corrupted", I don't believe it's been corrupted in this strict of a sense; I'm just building the swf in Flash Builder.  The project itself is fairly simple and doesn't have any out-of-the way configurations.
    Take the following line of code in the start class:
    m_com.onBWDone = rnd.handleBWDoneResults;
    the following code in m_com's class:
    private var m_fOnBWDone:Function;
    public function set onBWDone(pValue:Function):void
        m_fOnBWDone = pValue;
    and the following code in rnd's class:
    public function handleBWDoneResults(... pRest):void
    The line of code in the starting class is what's throwing the error.  If I comment that line of code out, the error goes away.  If I simply make m_fOnBWDone a public variable, delete the setter, and set the variable's value directly in the starting class, that works too.  But if I try to make it private and then use a trivial public property to set it like that, the error is raised.
    @Adobe Please fix this.  Thanks.

    The docs say it could be a few things, just one of which is the corrupt portion.
    You shouldn't have a method and property with the same name either. In any get/set situation for a private value your private value is typically prefaced just to avoid the collision with the public get/set. For the same reason, colliding, methods and properties should be unique and I am also confused as to how it compiled (although FB just warns you there's an issue and still allows you to proceed).
    What you're doing there appears to be highly dynamic, so I really can't say what kind of method names you're assigning with pValue. Nor can the compiler until you send 2 different functions with the same name there and it errors on you. Only you know what functions are being assigned in there, or what you do with it after that.

  • AS3 in Flex - ERROR 1037 Packages cannot be nested

    Hi.
    I am having some difficulty getting this simple bit of code
    working in Flex. It works perfectly in Flash. However in Flex i get
    an error 1037, Packages cannot be nested. Can anyone let me know
    where im going wrong / how to fix this problem. Thanks. Code
    attached.
    Barry.

    This thread should be in the AIR forum. The couple
    suggestions Andrei1 is making are correct, but it isn't the reason
    why you're getting that error.
    When you want to use a class within the declarative
    environment of Flex/AIR, you should use a namespace for that class
    and instantiate it via MXML or instantiate it within the Script
    block via ActionScript. Make sure that the files are in the same
    folder and then see if the following works for you.
    TS

  • ReferenceError: Error #1037: Cannot assign to a method every on Array.

    This code causes a runtime Error#1037 when publishing in AS3, but not in AS2.
    var myArray:Array=[];
    myArray["every"]=[];
    I'm guessing that is because every is an already defined method in the Array class.
    Should I be using the dictionary class instead? Any good tips on that? Anything I should really know?

    i'm not sure what you're trying to do but the Array class is used for ordered lists.  You should NOT be using a string for a key.
    if you want to create an unordered list = hash=map in flash (and use strings for keys), use an object:
    var obj:Object={}
    obj["every"]=[];  // if you want the value to be an array or
    obj["ever"]={};  // if you want the value to be another object/has/map
    use a dictionary if you want to use objects for keys.

  • Error -- 1037: Packages cannot be nested.

    Hi There,
    I am using Flash CS3 and ActionScript3.0 for development. I
    am trying to run some sample codes from Adobe site [and also from
    Flash Help, copied directly] but on compiling it throws "1037:
    Packages cannot be nested.". I m totally clueless... my only
    assumption is... this might be a Flash/Environment setting issue.
    Even if it is an Env issue... how to resolve it? Any help!!
    Thanks in Advance,
    Siraj Khan
    [email protected]
    // Code Attached

    The example code in the online help is horribly inconsistent.
    The example that you site is meant to be pasted into an .as
    external file. If you want to use this code in an actionscript
    frame space then you'll have to de-package the code. Look at my
    example. You have to remove the package wrapper and the sprite
    extension wrapper. Then remove the "Public" and "private" prefixes
    from the functions. Finally you have to call the first
    function.

  • Package runtime error

    Hi.
    When I test the code within the flash development environment
    i get no errors returned, however, when i run the code i get the
    following error;
    1037: Packages cannot be nested.
    Any suggestions?
    Thanks
    Barry.
    The Code:

    buttons is probably an XMLList class member and not an XML
    class member. and i don't think you're going to return anything in
    buttons. but that's not causing the error message.
    you must have that file stored in a directory different from
    your flash html and you must be using a path somewhere in your swf
    to refererence the class.
    show your swf file code relevant to this class.

  • "Packages cannot be nested" error in Flex

    I want to use SoundFacade class from Adobe. (Here, from github). I simple created an "ActionScript File" and paste all the code. But when I want to compile my app I got following error:
    1037: Packages cannot be nested.
    The only reason I can guess is that the package must somehow put into the project or something.
    Even when I just put a simple empty package I got the error:
    package {  }
    Any idea what is this error about?

    Found the solution in the forum: http://forums.adobe.com/message/4299377

  • Errors in Code

    OK so here is my
    component
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="200" height="130" backgroundColor="#000000" color="#ff0000"
    fontSize="20">
    <mx:Script source="../asa/clock.as" />
    </mx:Canvas>
    My AS file
    package
    import flash.display.Sprite;
    import flash.events.TimerEvent;
    import flash.utils.Timer;
    public class ShortTimer extends Sprite
    public function ShortTimer()
    // creates a new five-minute Timer
    var minuteTimer:Timer = new Timer(1000, 300);
    // designates listeners for the interval and completion
    events
    minuteTimer.addEventListener(TimerEvent.TIMER, onTick);
    minuteTimer.addEventListener(TimerEvent.TIMER_COMP LETE,
    onTimerComplete);
    // starts the timer ticking
    minuteTimer.start();
    public function onTick(evt:TimerEvent):void
    // displays the tick count so far
    // The target of this event is the Timer instance itself.
    trace("tick " + evt.target.currentCount);
    public function onTimerComplete(evt:TimerEvent):void
    refresh();
    and my application file
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" width="100%" viewSourceURL="srcview/index.html"
    height="100%"
    xmlns:c="Com_Board.*">
    <mx:Style source="source.css"/>
    <mx:Image source="images/title.jpg" width="210"
    height="65" top="4" left="15"/>
    <mx:Image source="images/title1.jpg" id="image1"
    horizontalAlign="right" verticalAlign="top" width="784" height="58"
    y="3" right="0"/>
    <mx:XML id="tempXML" source="
    http://something.net/interface.php?username=admin&amp;password=pass&amp
    ;customer=63&amp;action=showopen&amp;operation=def
    ects&amp;format=xml&amp;critcal=both" />
    <c:Red_co x="627" y="69" width="394" height="32"
    color="#ff0000" fontSize="25"/>
    <mx:XMLListCollection id="defectXMLList"
    source="{tempXML.defect}" />
    <mx:TileList
    dataProvider="{tempXML.defect.asset}"
    horizontalCenter="0" bottom="56" top="72" width="100%"
    backgroundColor="#000000" color="#ff0000" fontSize="27"
    borderColor="#000000" columnWidth="300" rowHeight="50"
    themeColor="#808080" fontWeight="bold"
    allowMultipleSelection="true"/>
    </mx:Application>
    All this and I still get the error
    1037: Packages cannot be nested

    Hello
    I am having same trouble using  CS4 and ActionScript 3. Let me illustrate using ShapleExample.as file that is a package.
    package {
        import flash.display.DisplayObject;
        import flash.display.Graphics;
        import flash.display.JointStyle;
        import flash.display.LineScaleMode;
        import flash.display.Shape;
        import flash.display.Sprite;
        public class ShapeExample extends Sprite {
            private var size:uint           = 80;
            private var bgColor:uint       = 0xFFCC00;
            private var borderColor:uint  = 0x666666;
            private var borderSize:uint   = 0;
            private var cornerRadius:uint = 9;
            private var gutter:uint       = 5;
            private function refreshLayout():void {
                var ln:uint = numChildren;
                var child:DisplayObject;
                var lastChild:DisplayObject = getChildAt(0);
                lastChild.x = gutter;
                lastChild.y = gutter;
                for (var i:uint = 1; i < ln; i++) {
                    child = getChildAt(i);
                    child.x = gutter + lastChild.x + lastChild.width;
                    child.y = gutter;
                    lastChild = child;
            private function doDrawCircle():void {
                var child:Shape = new Shape();
                var halfSize:uint = Math.round(size/2);
                child.graphics.beginFill(bgColor);
                child.graphics.lineStyle(borderSize, borderColor);
                child.graphics.drawCircle(halfSize, halfSize, halfSize);
                child.graphics.endFill();
                addChild(child);
            private function doDrawRoundRect():void {
                var child:Shape = new Shape();
                child.graphics.beginFill(bgColor);
                child.graphics.lineStyle(borderSize, borderColor);
                child.graphics.drawRoundRect(0, 0, size, size, cornerRadius);
                child.graphics.endFill();
                addChild(child);
            private function doDrawRect():void {
                var child:Shape = new Shape();
                child.graphics.beginFill(bgColor);
                child.graphics.lineStyle(borderSize, borderColor);
                child.graphics.drawRect(0, 0, size, size);
                child.graphics.endFill();
                addChild(child);
    ******End Code ShapeExample.as*******
    Then I create mycode.fla file
    and in frame one layer one I type the following code
    import class ShapeEample();
              doDrawCircle();
                doDrawRoundRect();
                doDrawRect();
                refreshLayout();
    ****END MYCODE.FLA***
    i SHOULD GET ONE CIRCLE AND TWO SQUARES** INSTEAD i GET ERROR CODE 1037

  • Another Compiler Bug (message: An internal build error has occurred... Unknown Flex Problem)

    I was fighting with this problem for a few days. Finally I've got it resolved. I want to describe it and fill in BUG in the bug report, but I am not sure about Adobe support options. So, I am putting bug report here.
    1. ASSUMPTION: All problems which compiler reports as unknown problem are the real compiler BUGs/Problems. Eventually MXML compiler/ActionScript compiler should be able to take C++ or FORTRAN code or an aribitrary text and nicely tell "Error: It is not ActionScript (Flex) code" or "the code is corrupted from Line so and so...". When compiler crashed, it is most probably due to one of the states not handled (or not handled correct). Keeping this in mind I assume, that my code has nothing to do with the compiler crash.
    2. PROBLEM Description.
         - I tried to port our internal project from Flex3.5/Flex Builder 3 to Flex4.1/Flash Builder 4.
         - After checking out and trying to build code I start getting weird problems like Error 1037: Packages cannot be nested.
         - After cleaning and compiling project by project, walking up dependency tree, I was able to get rid of this problem.
         - On last Project I've got another problem (An internal build error has occurred... Unknown Flex Problem). Which I stuck with for a while.
         - When I checked log file I found following messages:
    ============================================================
    !ENTRY com.adobe.flexbuilder.project 4 43 2010-12-21 15:45:24.353
    !MESSAGE Uncaught exception in compiler
    !STACK 0
    java.lang.ClassCastException: macromedia.asc.parser.InputBuffer cannot be cast to flex2.compiler.as3.CodeFragmentsInputBuffer
    at flex2.compiler.as3.AbstractSyntaxTreeUtil.lineNumberToPosition(AbstractSyntaxTreeUtil.jav a:1266)
    at flex2.compiler.mxml.ImplementationGenerator.generateBinding(ImplementationGenerator.java: 569)
    at flex2.compiler.mxml.ImplementationGenerator.generateBindingsSetupFunction(ImplementationG enerator.java:863)
    at flex2.compiler.mxml.ImplementationGenerator.generateBindingsSetup(ImplementationGenerator .java:812)
    at flex2.compiler.mxml.ImplementationGenerator.generateInitializerSupportDefs(Implementation Generator.java:1878)
    at flex2.compiler.mxml.ImplementationGenerator.generateClassDefinition(ImplementationGenerat or.java:1044)
    at flex2.compiler.mxml.ImplementationGenerator.<init>(ImplementationGenerator.java:206)
    at flex2.compiler.mxml.ImplementationCompiler.generateImplementationAST(ImplementationCompil er.java:499)
    at flex2.compiler.mxml.ImplementationCompiler.parse1(ImplementationCompiler.java:197)
    at flex2.compiler.mxml.MxmlCompiler.parse1(MxmlCompiler.java:168)
    at flex2.compiler.CompilerAPI.parse1(CompilerAPI.java:2871)
    at flex2.compiler.CompilerAPI.parse1(CompilerAPI.java:2824)
    at flex2.compiler.CompilerAPI.batch2(CompilerAPI.java:446)
    at flex2.compiler.CompilerAPI.batch(CompilerAPI.java:1274)
    at flex2.compiler.CompilerAPI.compile(CompilerAPI.java:1496)
    at flex2.tools.oem.Application.compile(Application.java:1188)
    at flex2.tools.oem.Application.recompile(Application.java:1133)
    at flex2.tools.oem.Application.compile(Application.java:819)
    at flex2.tools.flexbuilder.BuilderApplication.compile(BuilderApplication.java:344)
    at com.adobe.flexbuilder.multisdk.compiler.internal.ASApplicationBuilder$MyBuilder.mybuild(A SApplicationBuilder.java:276)
    at com.adobe.flexbuilder.multisdk.compiler.internal.ASApplicationBuilder.build(ASApplication Builder.java:127)
    at com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.build(ASBuilder.java:190)
    at com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.build(ASItemBuilder.java:7 4)
    at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.buildItem(FlexProjectB uilder.java:480)
    at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.build(FlexProjectBuild er.java:306)
    at com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.build(FlexIncremen talBuilder.java:157)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:633)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:218)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:360)
    at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:516)
    at org.eclipse.core.internal.resources.Project.build(Project.java:94)
    at org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:221)
    at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:162)
    at org.eclipse.ui.actions.WorkspaceAction$2.runInWorkspace(WorkspaceAction.java:483)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38 )
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    !SESSION 2010-12-22 09:48:27.766 -----------------------------------------------
    eclipse.buildId=M20100909-0800
    java.version=1.6.0_16
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Framework arguments:  -product org.eclipse.epp.package.jee.product
    Command-line arguments:  -data C:\Client_Flex4 -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product
    ================================================
    3. RESOLUTION/WORK AROUND
         - I was able to get this problem cleared by putting compiler option for Flex Application projects:  -keep-generated-actionscript
    4. SIDE NOTE
      I do not really see putting this compiler option as the solution and living with the mistery is making me fill a bit bad.

    Hi Faser,
    I just tried it on Vista with our latest FB Plugin build but
    I was unable to reproduce your issue with the following setup:
    - FB Plugin build installed by Administrator account user
    under her Documents folder
    - Administrator account user can launch, create Flex projects
    under her own workspace without any problems
    - Standard account user can launch the FB Plugin build (need
    Admin's password) and create Flex project (default location) under
    his own workspace
    If your setup is different, can you please log a bug at
    http://bugs.adobe.com/flex.
    Be sure to include what build you are using, whether it's
    reproducible, the detail of the setup, etc...
    thanks,
    Sharon

  • Using a third party filter

    I am looking at a filter from a website, but having difficulties with it as I have never used filters before.  I created a folder on my desktop, and in this folder, I created another folder called myFilters.  In this folder, I placed the TwirlFilter file and ammended it so it was
    package myFilters{
    I then created a new flash file, and in frame 1, I went to the actions
    panel, and added the code for one of their examples.This is simple code
    package
        import flash.display.Sprite;
        import myFilters.TwirlFilter;
        import flash.filters.DisplacementMapFilter;
        import flash.display.Bitmap;
        [SWF(width="420", height="280", backgroundColor="#fef9fe", frameRate="25")]
        public class SimpleExample extends Sprite
            public function SimpleExample()
                [Embed(source='/assets/prickpearsm-420x280.jpg')]
                var image:Class;
                var img:Bitmap=new image();
                addChild(img);
                var twirl:TwirlFilter=new TwirlFilter(this.stage.width/2-100,this.stage.height/2-100,100,Math.PI);
                img.filters=[twirl.filter];
                //addChild(twirl.image);
    The package has no name, as it is in the top folder, and I import the
    filter correctly, or so I think.  If i try running it, i get an error
    1037: Packages cannot be nested.  Not sure why this is, or if I am even
    doing this correctly.  As I say, first time using a filter, so didnt
    know what to do with it.
    Do you know what we might be doing wrong?
    Thanks
    Nick

    Originally, the SimpleExample file was just an AS3 file.  The problem was that with an as3 file, you cant go to Control/Test Movie, so i did not know how I would play it.  This is why I changed it and tried adding it to a timeline in a flash file.  I have seen many examples on the internet of things I would like to try, but all they provide you with is as3 code.  When I get this file, how am I suppossed to play it to test it out?  If you know the answer or could provide me with some sort of tutorial, this would be great.
    cheers

  • Dynamic class & property

    Hi there!
    I would like to know, if it is possible to mimic the behavior of XML dynamic class:
    var xm:XML =
        <question idAttr="atribute xml">
        </question>;
    trace(xm.attributes());
    trace("Attributes: "+xm["attributes"]);
    xm["attributes"] = {a:"atr1", b:"atr2"}; (in my dynamic class with attributes function, I get ReferenceError: Error #1037)
    trace("Attributes: "+xm["attributes"]);
    trace(xm.attributes());
    So I can call:
         xm.attributes() method which gives me XML attributes
    and use
         xm["attributes"] = {a:"atr1", b:"atr2"};
    which writes to the "attributes" property and not references the XML class function.
    My question:
    How can I do the same in my custom dynamic class ?
    Gregory

    As you might noticed some syntaxes of XML class' properties and methods are not conventional to AS3. This, perhaps, hints to the fact that XML class is not an AS3 class in its purest sense. In other words it is probably written in a different language (C? C++?...).
    In AS3, unlike in other languages, you cannot name property and method the same. So, there is no way to have both "attributes" property and "attributes()" method.
    Nevertheless, if you want to emulate XML functionality to some extend and enumerate/return dynamically set properties, you can definitely do that. This is an excellent case for using accessors (setters and getters):
    package 
         public dynamic class DynamicClass
              public function DynamicClass()
              public function get attributes():Object {
                   var obj:Object = { };
                   for (var prop:String in this) {
                        obj[prop] = this[prop];
                   return obj;
              public function set attributes(obj:Object):void {
                   for (var prop:String in obj) {
                        this[prop] = obj[prop];
    Usage:
    var dc:DynamicClass = new DynamicClass();
    dc.prop2 = "BLAH";
    dc.attributes = { propA: "bbb", anotherProp: 456 };
    trace(dc["attributes"]);
    for (var prop:String in dc.attributes) {
         trace(prop, "=", dc.attributes[prop]);
    Message was edited by: Andrei1

  • How to debug swc files in Flash CS5

    Hi, to coin a familiar phrase "I'm new to Flash developement". My question is very simple. How do I debug .swc files (that I've created in Flash Builder 4) in Flash Professional CS5. I've incorporated the .swc file in the Publish Settings->Flash tab. But when I attempt to consume the objects in the .swc file I get an error saying it "Cannot display source code at this location."
    Can someone tell me the best pratice for debugging .swc files. Do I debug them in Flash Builder or Adbobe Professional Flash CS5?

    I think I found the solution to my problem..... but dont know how to implement it correctly.
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageScal eMode.html#SHOW_ALL
    I believe I need to use the SHOW_ALL constant, but there isn't an example of how to do it
    Heres my code, it compiles without errors, but when I publish it as .exe I get the 'Error 1037: Package cannot be nested':
    package
              import flash.display.StageScaleMode
              import flash.media.Camera;
              import flash.media.Video;
              public class ScaleMode
                        public static const SHOW_ALL:String = StageScaleMode.SHOW_ALL;
                        var camera:Camera = Camera.getCamera();
                        if (camera != null) {
                                  videoTwo.attachCamera(camera);
                        } else {
                                  trace("You need a camera.");
              stop();
    Any ideas??

  • How to separate embedded ActionScript from MXML

    Hi all,
    I need to separate the embedded ActionScript codes located in
    between <mx:Application> tags (inside MXML). I need to
    do this, becuse it will help me to simplify my job.
    The embedded ActionScript code looks like this:
    <mx:Script>
    <![CDATA[
    private var services:RemoteObject;
    public function initApplication():void
    services = new RemoteObject("GenericDestination");
    services.source="com.mydomain.Services";
    services.authorizeAccessTicket.addEventListener(ResultEvent.RESULT,
    loginResultHandler);
    ]]>
    </mx:Script>
    Once I taked the whole codes, and placed inside a class
    called Main.as and refere this class inside <mx:Application>
    as following:
    <mx:Script source="Main.as" />
    I got the following error: 1037: Packages cannot be nested.
    Main class looks like this:
    package
    import mx.rpc.remoting.RemoteObject;
    public class Main
    private var currentUser:User;
    private var currentAccessTicket:AccessTicket;
    private var services:RemoteObject;
    public function Test()
    services = new RemoteObject("GenericDestination");
    services.source="com.mydomain.Services";
    services.addEventListener(FaultEvent.FAULT, faultHandler);
    services.authorizeAccessTicket.addEventListener(ResultEvent.RESULT,
    loginResultHandler);
    What I have to do in this case?

    You made your included file a class. Instead, you want to put
    into your included AS files EXACTLY what appears in the
    <mx:Script> block (without the CDATA). From your example, the
    external AS file would start with private var services:RemoteObject
    and not with package and class information.

  • Dynamic text is inside movieClip

    I am working on flash & AS file, in flash file (main.fla) dynamic text is inside that movieClip (myButton) .I will like to send some text to that particular dynamic text field inside the movieClip (myButton) from AS file
    as file code is
    var myButton:Button;
    var myText:text;
    myButton.myText.text="Custom Msg";
    I import .as file in flash but it is not showing can anybody help me?

    This is working fine but my problem is that, in my another application I am importing the class from as file in that as file I have one loop
    if(errorCode == 0){
             trace("welcome ");
             mc.myText.text="Custom Msg";
              }else{
                 trace("Error loging in to Server Error Code : "+ errorCode)
    It will trace message properly
    my problem is that I will like to put "Custom Msg" in dynamic text which is in MovieClip (mc) of fla file, how could I go wtih this ?
    If I include same as file in flash It will shows as error
    1037: Packages cannot be nested. What the solution for this ?

  • How to change video resolution in Flash CS5

    Hi, I've made a small app that captures and displays the camera feed. But the problem i'm having is that the app only displays a fraction of what the camera is showing (top left part of the corner), is there a way to shrink the resolution in Flash CS5 so that the app can show the full picture??
    Many thanks.

    I think I found the solution to my problem..... but dont know how to implement it correctly.
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageScal eMode.html#SHOW_ALL
    I believe I need to use the SHOW_ALL constant, but there isn't an example of how to do it
    Heres my code, it compiles without errors, but when I publish it as .exe I get the 'Error 1037: Package cannot be nested':
    package
              import flash.display.StageScaleMode
              import flash.media.Camera;
              import flash.media.Video;
              public class ScaleMode
                        public static const SHOW_ALL:String = StageScaleMode.SHOW_ALL;
                        var camera:Camera = Camera.getCamera();
                        if (camera != null) {
                                  videoTwo.attachCamera(camera);
                        } else {
                                  trace("You need a camera.");
              stop();
    Any ideas??

Maybe you are looking for

  • Conversion of Smart form to PDF in Webdypro UI

    Hi Gurus,              I want to display a smart form as PDF by converting OTF to PDF and thereby passing the PDF format data to Interactive Form UI element in a Webdynpro application (via portal iview). Do I need ADS server for publishing the OTF co

  • Saving takes a very long time!!!  -- PLEASE HELP

    I just bought KN 09 and very happy with it. But I have a presentation prepared in 08 that has several large Quicktime files in them. Every time I make little changes in 09, it takes a LONG time to save it -- like 6 minutes. What's the problem? I save

  • [Solved] Trouble with virtualbox and xorg-server-1.13

    So I'm trying out Arch through VirtualBox. Everything has been great so far and I've installed dwm and even customized it a bit already. The problem is that I'm stuck in 1024x768... which is brutal on a 16:9 monitor. Ive installed the virtualbox gues

  • I just downloaded firefox. It starts but won't execute any searches.

    That about says it. I can't find any online advice about what my problem might be.

  • Ipad WiFi Problem

    Hey guys can anyone help i have downloaded APP Sky Mobile Tv on IPAD when i play Sky it will let me play Sky Sports for exactly 1 hour and it just stops playing until i start off the APP again starts again for 1 hour again and stops again Modem is wo