TypeError: Error #1007: Instantiation attempted on a non-constructor.

So I am trying out Flex 4 and started so by creating a basic class that extends the spark.components.Application class.
package
    import spark.components.Application; 
    public class SimpleApp extends Application
        public function SimpleApp():void
            super();
It compiles time but at runtime I am getting this error:
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at mx.preloaders::Preloader/initialize()
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()
at mx.managers::SystemManager/initHandler()
Anyone have any insight into this? I found this http://forums.adobe.com/message/2724794 but it doesn't really seem to be a whole lot of help in my case.

K so I just setup a simple mxml file for it
<?xml version="1.0"?>
<sa:SimpleApp xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:sa="com.simpleapp.*" />
Now it seems to be happy. Thanks.

Similar Messages

  • TypeError: Error #1007: Instantiation attempted on a non-constructor... sometimes

    package{
              import flash.display.MovieClip;
              import flash.events.MouseEvent;
              public class MainTimeline extends MovieClip{
                             private var movieArray:Array = new Array(8);
                             private          var myMovieClip:Array = new Array(18);
                             private          var sco:Array = new Array(6);
                             private var i:Number = 0;
                             private var rangeX:Number = 0;
                             private          var sumScore:Number = 0;
                             public function MainTimeline(){
                                            movieArray = [tele01, tele02, tele03, tele04, duck01, monkey01, pig01, boom01]; //Animation MovieClip from library
                                            myMovieClip = [myMovieClip1, myMovieClip2, myMovieClip3, myMovieClip4, myMovieClip5, myMovieClip6]; //Blank MovieClip from library
                                            for (i = 0; i < 6; i++)
                                                           var number:Number = Math.floor(Math.random() * 9);
                                                           myMovieClip[i] = new movieArray[number]; //create Animation MovieClip to Blank MovieClip
                       myMovieClip[i].x = rangeX;
                                                           myMovieClip[i].y = 90;
                                                           sco[i] = 50;
                                                           addChild(myMovieClip[i]);
                                                           rangeX += 132;
               myMovieClip[0].addEventListener(MouseEvent.CLICK, disappear1);
               myMovieClip[1].addEventListener(MouseEvent.CLICK, disappear2);
               function disappear1(e:MouseEvent):void {
                                                          myMovieClip[0].visible=false;
                      sumScore = sumScore + sco[0];
                      score.text = sumScore.toString();
                                        function disappear2(e:MouseEvent):void {
                                                      myMovieClip[1].visible=false;
                                                      sumScore = sumScore + sco[1];
                                                      score.text = sumScore.toString();
    I am a Newbie of AS3 and I dont't undersatnd why this code can run successfully sometimes, sometimes not and told me "TypeError: Error #1007: Instantiation attempted on a non-constructor."
    Please, help me... I try to solve anything. Thank you.

    Change...
    myMovieClip[i] = new movieArray[number];
    to
    myMovieClip[i] = new Array[number];
    OR
    myMovieClip[i] = movieArray[number];
    I'm not sure of the intention

  • TypeError: Error #1007: Instantiation attempted on a non-constructor. on port to Flex 4

    I have been porting an app from Flex 3.4.x to 4.0.. I have successfully ported the app and its libraries to flex 4.0 (everything build successfully, all the CSS has the new Namespace stuff added, and warnings are down to the same stuff pre-port).  I've also removed ALL the references to http://www.adobe.com/2006/flex/mx in any of my mxml files... In short I "think" I have moved everything over to the new mx and fx namespaces. But I still get the following error (which never happend in 3.4 or 3.5 with this same app) when I try to run my flex app.
    TypeError: Error #1007: Instantiation attempted on a non-constructor. at mx.preloaders::Preloader/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\preloaders\Preloader.as:253] at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1925] at mx.managers::SystemManager/initHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2419]
    At this point I am completely stumped.. anyone have any ideas?
    Thanks
    Josh

    *Scratches head*
    Ok so I did a -keep and checked my  ***SystemManager-generated.as   the funciton info() was setting the sparkdownload progress just fine
    preloader: SparkDownloadProgressBar
    and it was importing both ths spark and mx progress bars
    import mx.preloaders.DownloadProgressBar;
    import mx.preloaders.SparkDownloadProgressBar;
    then I checked my link report.. and sure enough the spark preloader was there
    <script name="C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\libs\framework.swc(mx.preloaders:SparkDownloadProgressBar)" mod="1263586859699" size="13103" optimizedsize="6977">
    as was the mx.preloaders.preloader
    <script name="C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\libs\framework.swc(mx.preloaders:Preloader)" mod="1262975731760" size="6770" optimizedsize="4160">
    as was the IPreloaderDisplay
    <script name="C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\libs\framework.swc(mx.preloaders:IPreloaderDisplay)" mod="1262975731869" size="2113" optimizedsize="508">
    what wasn't in my link report was the mx.preloaders.DownloadProgressBar, but it was probably optmized out because it isn't actually ever called...
    And I can tell that info() is the one being called the first time through (when the first RSL decompression happens), so that's not it..
    Is there a way to figure out what tha second RSL decompression is?    It seems to me thats where the issue is.. (from what it looks like (based on width and hight numbers that the first decompression is my application (having my apps height and width) the second decomression is my object tag in my browser (because it has the height and width numbers I am setting there.. (which are different because I am trying to use the scaleMode to make the app scale to fit different sizes)..
    Oh and if I haven't said it yet, Thank you very much for your guidence on this.. Its a real headscratcher for me.
    Josh

  • Instantiation attempted of a non-constructor???

    I'm getting the following error:
    TypeError: Error #1007: Instantiation attempted on a non-constructor.
    at Website()[/Design/The Silver Collective/_classes/Website.as:42]
    This is line 42:
    var top = new top();
    package {
         import flash.display.*;
         import FluidLayout.*;
         import flash.display.Sprite;
         import flash.display.StageAlign;
         import flash.display.StageScaleMode;
         import flash.events.Event;
         import gs.*;
         import gs.easing.*;
         import fl.motion.easing.*;
         import com.greensock.*;
         import flash.text.AntiAliasType;
         import flash.text.TextField;
         import flash.text.TextFieldAutoSize;
         //import flash.text.TextFormat;
         //import greensock.*;
         import flash.events.MouseEvent;
    import flash.events.FullScreenEvent;
         import flash.display.*;
         import flash.events.*;
         import flash.net.URLRequest;
         public class Website extends MovieClip {
              public function Website() {
                   /* Set the Scale Mode of the Stage */
                   stage.scaleMode=StageScaleMode.NO_SCALE;
                   stage.align=StageAlign.TOP_LEFT;
                   /* Add the symbols to stage 
                               var bg = new Background(); 
                               addChild(bg); 
                   var top = new top();
                   addChild(top);
                   var toprightoption = new toprightoption();
                   addChild(toprightoption);
                   //var middle = new Middle(); 
                   //addChild(middle); 
                   var btmrightfooter = new btmrightfooter();
                   addChild(btmrightfooter);
                   /* Apply the alignment to the background  
                                 var bgParam = { 
                                     x:0, 
                                     y:0, 
                                    offsetX: 0, 
                                      offsetY: 0 
                                 new FluidObject(bg,bgParam); 
                   /* Apply the alignment to the top */
                   var topParam = { 
                                      x:0, 
                                     y:0, 
                                      offsetX:0, 
                                    offsetY:0 
                   new FluidObject(top,topParam);
                   /* Apply the alignment to the toprightoption */
                   var toprightoptionParam = { 
                                   x:1, 
                                   y:0, 
                                     offsetX: -toprightoption.width - 20, 
                                    offsetY: 20 
                   new FluidObject(toprightoption,toprightoptionParam);
                   /* Apply the alignment to the content
                                var middleParam = { 
                                    x:0.5, 
                                   y:0.5, 
                                    offsetX: -middle.width/2, 
                                    offsetY: -middle.height/2 
                                new FluidObject(middle,middleParam); 
                   /* Apply the alignment to the btmrightfooter */
                   var btmrightfooterParam = { 
                                    x:1, 
                                    y:1, 
                                    offsetX: -btmrightfooter.width - 10, 
                                    offsetY: -btmrightfooter.height -10 
                   new FluidObject(btmrightfooter,btmrightfooterParam);
         private var currentlyShowing:MovieClip=null;
              public function showModalContent(clip:MovieClip):void {
                   if (currentlyShowing!=null) {
                        removeChild(currentlyShowing);
                   currentlyShowing=clip;
                   addChild(currentlyShowing);
              public function removeModalContent():void {
                   if (currentlyShowing!=null) {
                        removeChild(currentlyShowing);
                        currentlyShowing=null;

    You need to used different names for the variable and class.
    Like var tp = new top();

  • Instantiation attempted on a non-constructor.

    I'm new to flex and trying to convert a project from a purely AS3 project to a Flex 4 project.  I'm trying to use a custom application class, and getting this strange error:
    TypeError: Error #1007: Instantiation attempted on a non-constructor.
    at mx.preloaders::Preloader/initialize()[E:\dev\4.x\frameworks\projects\framework\src\mx\pre loaders\Preloader.as:253]
    at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\4.x\frameworks\projects\fr amework\src\mx\managers\SystemManager.as:1925]
    at mx.managers::SystemManager/initHandler()[E:\dev\4.x\frameworks\projects\framework\src\mx\ managers\SystemManager.as:2419]
    Here's a minimal example of the code causing this error:
    (FancyAppClass.mxml)
    <?xml version="1.0" encoding="utf-8"?>
    <main:FancyApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx"
                      xmlns:main="main.*">
    </main:FancyApplication>
    And in FancyApplication.as:
    package main {
         import spark.components.Application;
         public class FancyApplication extends Application {
              public function FancyApplication() {
                   super();
    What am I doing wrong?  The weirdest part is that sometimes the error goes away only to come back later after some minor code change that seems completely unrelated.

    Bad news first: I did full reinstalls of flash CS4, CS5 and Flash Builder, and saw no change.  Good news:  At least I know nothing is wrong with my machine to have corrupted any of those installs, and I found what was causing the problem in the end.
    By turning on the -keep-generated-actionscript option, I was able to inspect the SystemManager subclasses the compiler was building for me.  It builds one for each "Applicaiton" in your project, and because my actionscript class extends Application, it was included by default in the project's list of application files and the compiler was building a SystemManager sublcass for it as well. However, when building that version (from the actionscript file rather than from the mxml), it was not including the default preloader class in the info() method returned object.  The randomness was a result of which "application" was being launched (which came down to which file in the IDE I had selected):  If the FancyAppClass (mxml) version was launched, it had the preloader subclass, and everything worked.  If the actionscript version was launched, it didn't have the preloader class and caused the error.  I have resolved this specific problem by removing the actionscript file from the list of applications in the project config.
    So now my question is: Is the behavior of not including the preloader in the info method of the generated SystemManager subclass the intended functionality, or is this a bug?

  • Instantiation attempted on a non-constructor problem

    Hi,
    I've got the following error in my application: "TypeError: Error #1007: Instantiation attempted on a non-constructor".
    I've created a class that represents a 2D Vector. But when I instanciate it inside another class, I get this error.
    Here is a little piece of code of my problem:
    public class Player extends MovieClip {
              private var position:Vector = new Vector();
              public function Player() {
                        // constructor code
    public class Vector {
              public var xValue:Number;
              public var yValue:Number;
              public function Vector() {
                        // constructor code
                        xValue = 0;
                        yValue = 0;
    These 2 classes are in separated files. The Player's class is a Movie Clip in the library, while Vector's class is just a class file. What can I be doing wrong?

    Vector is a native top level class in AS3.

  • Custom Component: Instantiation attempted on a non-constructor.

    Hi all, i've created an empty class that extends the Slider
    control. it compiles fine, but when i run it, i get the following
    error: Error #1007: Instantiation attempted on a non-constructor.
    this is how i'm calling it:
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:tix="com.tixsmart.flex.controls.*" >
    <tix:SeekBar x="91" y="223" width="424"
    height="11"/>

    Adobe Newsbot hopes that the following resources helps you.
    NewsBot is experimental and any feedback (reply to this post) on
    its utility will be appreciated:
    Flex 3 - Metadata tags:
    This MXML code generates an error because Flex cannot convert
    the Strings ' abc ' and ' def ' to a Number. You insert the
    [ArrayElementType] metadata tag
    Link:
    http://livedocs.adobe.com/flex/3/html/metadata_3.html
    How to highlight the ticks ina slider - Flex India Community:
    Apr 15, 2008 ... There was an error processing your request.
    Please try again. Standard view View as tree ... I am new to Flex
    and I have created a slider.
    Link:
    http://groups.google.com/group/flex_india/browse_thread/thread/f0f5b69c171ae859
    [#SDK-11271] A Flash Container can only take a Flex container
    as a:
    See code: <?xml version='1.0'?> <!--
    skins/PictureFrame.mxml --> <mx:Application xmlns:mx='
    http://www.adobe.com/2006/mxml'
    xmlns:myComps='*'>
    Link:
    http://bugs.adobe.com/jira/browse/SDK-11271
    Slider and Text Input Issue - Flex India Community | Google
    Groups:
    Aug 7, 2008 ... following code is solution for ur problem
    <?xml version='1.0' encoding='utf-8'?> <mx:Application
    xmlns:mx='
    http://www.adobe.com/2006/mxml'
    Link:
    http://groups.google.com/group/flex_india/browse_thread/thread/8bc9cccc3681711b?fwc=1
    HSlider and VSlider controls -- Flex 2:
    Flex provides two sliders: the HSlider (Horizontal Slider)
    control, which creates ... <mx:Application xmlns:mx='
    http://www.adobe.com/2006/mxml'>
    <mx:HSlider
    Link:
    http://livedocs.adobe.com/flex/2/docs/00000542.html
    Disclaimer: This response is generated automatically by the
    Adobe NewsBot based on Adobe
    Community
    Engine.

  • Android App Help TypeError: Error #1007

    Hi I am trying out Cirrus on Android mobile,
    If I open up a new Mobile Project on Flash Builder 4.6;
    copy and paste the Cirrus code base on,
    I received this Actionscript Error below:::
    I cannot find this anywere I am using 4.6 SDK
    Thanks in advance!!
    TypeError: Error #1007: Instantiation attempted on a non-constructor.
              at mx.controls::VideoDisplay/createBorder()[/Applications/Adobe Flash Builder 4.6/sdks/4.6.0/frameworks/projects/mx/src/mx/controls/VideoDisplay.as:1800]
              at mx.controls::VideoDisplay/createChildren()[/Applications/Adobe Flash Builder 4.6/sdks/4.6.0/frameworks/projects/mx/src/mx/controls/VideoDisplay.as:1484]
              at mx.core::UIComponent/initialize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:7634]
              at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:7495]
              at mx.core::UIComponent/addChildAt()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:7199]
              at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.y\frameworks\projects\sp ark\src\spark\components\Group.as:2037]
              at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Group.as:1628]
              at spark.components::Group/setMXMLContent()[E:\dev\4.y\frameworks\projects\spark\src\spark\c omponents\Group.as:633]
              at spark.components::Group/createChildren()[E:\dev\4.y\frameworks\projects\spark\src\spark\c omponents\Group.as:855]
              at mx.core::UIComponent/initialize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:7634]
              at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:7495]
              at mx.core::UIComponent/addChildAt()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:7199]
              at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.y\frameworks\projects\sp ark\src\spark\components\Group.as:2037]
              at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Group.as:1628]
              at spark.components::Group/setMXMLContent()[E:\dev\4.y\frameworks\projects\spark\src\spark\c omponents\Group.as:633]
              at spark.components::Group/set mxmlContent()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Group.as:573]
              at spark.components::SkinnableContainer/set mxmlContent()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\SkinnableContaine r.as:657]
              at spark.components::SkinnableContainer/createDeferredContent()[E:\dev\4.y\frameworks\projec ts\spark\src\spark\components\SkinnableContainer.as:1050]
              at spark.components::SkinnableContainer/createContentIfNeeded()[E:\dev\4.y\frameworks\projec ts\spark\src\spark\components\SkinnableContainer.as:1078]
              at spark.components::SkinnableContainer/createChildren()[E:\dev\4.y\frameworks\projects\spar k\src\spark\components\SkinnableContainer.as:885]
              at mx.core::UIComponent/initialize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:7634]
              at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:7495]
              at mx.core::UIComponent/addChildAt()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:7199]
              at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.y\frameworks\projects\sp ark\src\spark\components\Group.as:2037]
              at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Group.as:1628]
              at spark.components::Group/setMXMLContent()[E:\dev\4.y\frameworks\projects\spark\src\spark\c omponents\Group.as:633]
              at spark.components::Group/set mxmlContent()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Group.as:573]
              at spark.components::SkinnableContainer/set mxmlContent()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\SkinnableContaine r.as:657]
              at spark.components::SkinnableContainer/createDeferredContent()[E:\dev\4.y\frameworks\projec ts\spark\src\spark\components\SkinnableContainer.as:1050]
              at spark.components::SkinnableContainer/createContentIfNeeded()[E:\dev\4.y\frameworks\projec ts\spark\src\spark\components\SkinnableContainer.as:1078]
              at spark.components::SkinnableContainer/createChildren()[E:\dev\4.y\frameworks\projects\spar k\src\spark\components\SkinnableContainer.as:885]
              at spark.components::Application/createChildren()[E:\dev\4.y\frameworks\projects\spark\src\s park\components\Application.as:1504]
              at mx.core::UIComponent/initialize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:7634]
              at spark.components::Application/initialize()[E:\dev\4.y\frameworks\projects\spark\src\spark \components\Application.as:1355]
              at Main/initialize()
              at mx.managers.systemClasses::ChildManager/childAdded()[E:\dev\4.y\frameworks\projects\frame work\src\mx\managers\systemClasses\ChildManager.as:189]
              at mx.managers.systemClasses::ChildManager/initializeTopLevelWindow()[E:\dev\4.y\frameworks\ projects\framework\src\mx\managers\systemClasses\ChildManager.as:359]
              at mx.managers::SystemManager/initializeTopLevelWindow()[E:\dev\4.y\frameworks\projects\fram ework\src\mx\managers\SystemManager.as:3057]
              at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2843]
              at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2723]
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at mx.preloaders::Preloader/timerHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\p reloaders\Preloader.as:542]
              at flash.utils::Timer/_timerDispatch()
              at flash.utils::Timer/tick()

    I have the same problem HELP!!
    TypeError: Error #1007: Instantiation attempted on a non-constructor.
      at mx.controls::VideoDisplay/createBorder()[E:\dev\4.y\frameworks\projects\mx\src\mx\control s\VideoDisplay.as:1800]
      at mx.controls::VideoDisplay/createChildren()[E:\dev\4.y\frameworks\projects\mx\src\mx\contr ols\VideoDisplay.as:1484]
      at mx.core::UIComponent/initialize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:7634]
      at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.y\frameworks\projects\fr amework\src\mx\core\UIComponent.as:7495]
      at mx.core::UIComponent/addChildAt()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:7199]
      at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.y\frameworks\projects\sp ark\src\spark\components\Group.as:2037]
      at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.y\frameworks\projects\ spark\src\spark\components\Group.as:1628]
      at spark.components::Group/addElementAt()[E:\dev\4.y\frameworks\projects\spark\src\spark\com ponents\Group.as:1387]
      at mx.states::AddItems/addItemsToContentHolder()[E:\dev\4.y\frameworks\projects\framework\sr c\mx\states\AddItems.as:782]
      at mx.states::AddItems/apply()[E:\dev\4.y\frameworks\projects\framework\src\mx\states\AddIte ms.as:563]
      at mx.core::UIComponent/applyState()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:10741]
      at mx.core::UIComponent/commitCurrentState()[E:\dev\4.y\frameworks\projects\framework\src\mx \core\UIComponent.as:10487]
      at mx.core::UIComponent/commitProperties()[E:\dev\4.y\frameworks\projects\framework\src\mx\c ore\UIComponent.as:8304]
      at spark.components.supportClasses::GroupBase/commitProperties()[E:\dev\4.y\frameworks\proje cts\spark\src\spark\components\supportClasses\GroupBase.as:1128]
      at spark.components::Group/commitProperties()[E:\dev\4.y\frameworks\projects\spark\src\spark \components\Group.as:886]
      at mx.core::UIComponent/validateProperties()[E:\dev\4.y\frameworks\projects\framework\src\mx \core\UIComponent.as:8219]
      at spark.components::Group/validateProperties()[E:\dev\4.y\frameworks\projects\spark\src\spa rk\components\Group.as:864]
      at mx.managers::LayoutManager/validateClient()[E:\dev\4.y\frameworks\projects\framework\src\ mx\managers\LayoutManager.as:957]
      at mx.managers::PopUpManagerImpl/addPopUp()[E:\dev\4.y\frameworks\projects\framework\src\mx\ managers\PopUpManagerImpl.as:382]
      at mx.managers::PopUpManager$/addPopUp()[E:\dev\4.y\frameworks\projects\framework\src\mx\man agers\PopUpManager.as:193]
      at skins::itemRenderProducto/seleccionarFotoDesdeCamara()[C:\Users\Sphairo\Documents\GitHub\ venta\src\skins\itemRenderProducto.mxml:107]
      at skins::itemRenderProducto/___itemRenderProducto_renderFotoDesdeCamara1_click()[C:\Users\S phairo\Documents\GitHub\venta\src\skins\itemRenderProducto.mxml:123]

  • TypeError: Error #1007:Tried to create an instance in a no constructor

    Hello guys,
    Im stuck with actionscript error, i really need help here the error i got:-
    TypeError: Error #1007:Tried to create an instance in a no constructor.
    at Away3dScene/initObjects()
        at Away3dScene/init()
        at flash.display::DisplayObjectContainer/addChild()
        at Away3dProject()
    So use Away3d, however dont know really where is the error becouse every thing seems be okay, im using adobe flash cs5.5, flash player 10.
    main.as code:
    package
        import flash.display.Sprite;
        import flash.display.StageScaleMode;
        import flash.display.StageAlign;
        import net.hires.utils.Stats;
        public class Away3dProject extends Sprite
            public function Away3dProject()
                stage.scaleMode =  StageScaleMode.NO_SCALE;
                stage.align =  StageAlign.TOP_LEFT;
                var scene:Away3dScene = new Away3dScene();
                addChild(scene);
                var stats:Stats = new Stats();
                addChild(stats);
         and here Away3dscene.as:
    package
        import away3d.cameras.Camera3D;
        import away3d.containers.Scene3D;
        import away3d.containers.View3D;
        import away3d.core.base.Object3D;
        import away3d.core.clip.RectangleClipping;
        import away3d.core.math.Number3D;
        import away3d.materials.WireColorMaterial;
        import away3d.overlays.LensFlare;
        import away3d.primitives.Plane;
        import flash.display.BlendMode;
        import flash.display.Sprite;
        import flash.events.Event;
        public class Away3dScene extends Sprite
            //[Embed(source="assets/library.swf", symbol="Halo")]
            private var Halo:Class;
            //[Embed(source="assets/library.swf", symbol="Flare1")]
            private var Flare1:Class;
            //[Embed(source="assets/library.swf", symbol="Flare2")]
            private var Flare2:Class;
            //[Embed(source="assets/library.swf", symbol="Flare3")]
            private var Flare3:Class;
            private var _scene:Scene3D;
            private var _camera:Camera3D;
            private var _view:View3D;
            private var _flare:LensFlare;
            public function Away3dScene()
                this.addEventListener(Event.ADDED_TO_STAGE, init);
            private function init(evt:Event):void
                initScene();
                initObjects();
                this.addEventListener(Event.ENTER_FRAME, render);
            private function initObjects():void
                /*var floor:Plane = new Plane();
                floor.width = floor.height = 100000;
                floor.segmentsW = floor.segmentsH = 12;
                floor.y = -3500;
                floor.material = new WireColorMaterial(0x333333);
                _scene.addChild(floor);*/
                var flareSourceDummy:Object3D = new Object3D();
                flareSourceDummy.x = 1000;
                flareSourceDummy.y = 500;
                flareSourceDummy.z = 3000;
                _scene.addChild(flareSourceDummy);
                _flare = new LensFlare(flareSourceDummy, _camera);
                _flare.setBurnClip(_view);
                _flare.setHaloAsset(new Halo());
                _flare.addFlareAsset(new Flare1());
                _flare.addFlareAsset(new Flare3());
                _flare.addFlareAsset(new Flare1());
                _flare.addFlareAsset(new Flare2());
                _flare.useRotation = false;
                //_flare.useAlpha = false;
                //_flare.useScaling = false;
                //_flare.useBurning = false;
                //_flare.blendMode = BlendMode.SCREEN;
                //_flare.burnMethod = LensFlare.BURN_METHOD_COLOR_TRANSFORM;
                _view.addOverlay(_flare);
            private function hoverCamera():void
                var mX:Number = this.mouseX > 0 ? this.mouseX : 0;
                var mY:Number = this.mouseY > 0 ? this.mouseY : 0;
                var tarX:Number = 3*(mX - stage.stageWidth/2);
                var tarY:Number = -2*(mY - stage.stageHeight/2);
                var dX:Number = _camera.x - tarX;
                var dY:Number = _camera.y - tarY;
                _camera.x -= dX*0.25;
                _camera.y -= dY*0.25;
                _camera.lookAt(new Number3D(0, 0, 0));
            private function initScene():void
                _scene = new Scene3D();
                _camera = new Camera3D({z:-1500});
                _view = new View3D({scene:_scene, camera:_camera});
                _view.x = stage.stageWidth/2;
                _view.y = stage.stageHeight/2;
                _view.clipping = new RectangleClipping({minX:-stage.stageWidth/2, minY:-stage.stageHeight/2, maxX:stage.stageWidth/2, maxY:stage.stageHeight/2});
                _view.opaqueBackground = 0;
                addChild(_view);
            private function render(evt:Event):void
                hoverCamera();
                _view.render();
          Please guys, any idea will be helpful to me.
        Best,

    Yes, you right, now after i do what you explain appear more informations. 
      at Away3dScene/initObjects()[C:\Users\ahmed\Desktop\3d\Away3dScene.as:65]
        at Away3dScene/init()[C:\Users\ahmed\Desktop\3d\Away3dScene.as:44]
        at flash.display::DisplayObjectContainer/addChild()
        at Away3dProject()[C:\Users\ahmed\Desktop\3d\Away3dProject.as:17]
    error number 65 in Away3dScene is: _flare.setHaloAsset(new Halo());
    error number 44 in Away3dScene is: initObjects();
    error number 17 in Away3dProject.as is: addChild(scene);
    and the last error is: at flash.display::DisplayObjectContainer/addChild()
    But what is strange i test project at flash builder and he work fine, i just want move from flash builder to run in flash cs5.5, so i move Away3dProject.as, Away3dScene.as, and i add Away3d classes to flash cs5.5 and also   add net class to flash cs5.5.
    also i add all movies clips to my libriry project, please could you help me to find why i got this error with flash cs5.5.
    Best,

  • Voting poll using PHP & MySQL TypeError: Error #2007: Parameter text must be non-null.

    I am getting this back:
    TypeError: Error #2007: Parameter text must be non-null.
    at flash.text::TextField/set text()
    at AS3_Flash_Poll_PHP_MySQL_fla::WholePoll_1/completeHandler()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    PHP code:
    <?php
    // ---------------------------------------- Section 1 -----------------------------------------------
    //  IMPORTANT!!!! Connect to MySQL database here(put your connection data here)
    mysql_connect("ginaty05.fatcowmysql.com","fall2010","@regina") or die (mysql_error());
    mysql_select_db("poll_2010") or die (mysql_error());
    // When Flash requests the totals initially we run this code
    if ($_POST['myRequest'] == "load_numbers") {
    // Query the totals from the database
        $sql1 = mysql_query("SELECT id FROM votingPoll WHERE choice='1'");
        $choice1Count = mysql_num_rows($sql1);
        $sql2 = mysql_query("SELECT id FROM votingPoll WHERE choice='2'");
        $choice2Count = mysql_num_rows($sql2);
        $sql3 = mysql_query("SELECT id FROM votingPoll WHERE choice='3'");
        $choice3Count = mysql_num_rows($sql3);
        echo "choice1Count=$choice1Count";
        echo "&choice2Count=$choice2Count";
        echo "&choice3Count=$choice3Count";
    // ---------------------------------------- Section 2 -----------------------------------------------
    // IF POSTING A USER'S CHOICE
    if ($_POST['myRequest'] == "store_choice") {
        //Obtain user IP address
        $ip = $_SERVER['REMOTE_ADDR'];
        // Create local variable from the Flash ActionScript posted variable
        $userChoice = $_POST['userChoice'];
        $sql = mysql_query("SELECT id FROM votingPoll WHERE ipaddress='$ip'");
        $rowCount = mysql_num_rows($sql);
        if ($rowCount == 1) {
    $my_msg = "You have already voted in this poll.";
    print "return_msg=$my_msg";
        } else {
    $sql_insert = mysql_query("INSERT INTO votingPoll (choice, ipaddress) VALUES('$userChoice','$ip')")  or die (mysql_error());
    $sql1 = mysql_query("SELECT * FROM votingPoll WHERE choice='1'");
    $choice1Count = mysql_num_rows($sql1);
    $sql2 = mysql_query("SELECT * FROM votingPoll WHERE choice='2'");
    $choice2Count = mysql_num_rows($sql2);
    $sql3 = mysql_query("SELECT * FROM votingPoll WHERE choice='3'");
    $choice3Count = mysql_num_rows($sql3);
    $my_msg = "Thanks for voting!";
            echo "return_msg=$my_msg";
            echo "&choice1Count=$choice1Count";
    echo "&choice2Count=$choice2Count";
    echo "&choice3Count=$choice3Count";
    ?>
    AS3 code:
    stop(); // Stop the timeline since it does not need to travel for this to run
    // Assign a variable name for our URLVariables object
    var variables1:URLVariables = new URLVariables();
    //  Build the varSend variable
    var varSend1:URLRequest = new URLRequest("parse_my_poll.php");
    varSend1.method = URLRequestMethod.POST;
    varSend1.data = variables1;
    // Build the varLoader variable
    var varLoader1:URLLoader = new URLLoader;
    varLoader1.dataFormat = URLLoaderDataFormat.VARIABLES;
    varLoader1.addEventListener(Event.COMPLETE, completeHandler1);
    // Set variable to send to PHP here for the varloader below
    variables1.myRequest = "load_numbers";  
    // Send data to php file now, and wait for response using the COMPLETE event
    varLoader1.load(varSend1);
    function completeHandler1(event:Event):void{
        count1_txt.text = "" + event.target.data.choice1Count;
        count2_txt.text = "" + event.target.data.choice2Count;
        count3_txt.text = "" + event.target.data.choice3Count;
    // hide the little processing movieclip
    processing_mc.visible = false;
    // Initialize the choiceNum variable that we will use below
    var choiceNum:Number = 0;
    // Set text formatting colors for errors and success messages
    var errorsFormat:TextFormat = new TextFormat();
    errorsFormat.color = 0xFF0000; // bright red
    var successFormat:TextFormat = new TextFormat();
    successFormat.color = 0x00FF00; // bright green
    // Button Click Functions
    function btn1Click(event:MouseEvent):void{
        choiceNum = 1;
        choice_txt.text = choice1_txt.text;
    function btn2Click(event:MouseEvent):void{
        choiceNum = 2;
        choice_txt.text = choice2_txt.text;
    function btn3Click(event:MouseEvent):void{
        choiceNum = 3;
        choice_txt.text = choice3_txt.text;
    // Button Click Listeners
    btn1.addEventListener(MouseEvent.CLICK, btn1Click);
    btn2.addEventListener(MouseEvent.CLICK, btn2Click);
    btn3.addEventListener(MouseEvent.CLICK, btn3Click);
    // Assign a variable name for our URLVariables object
    var variables:URLVariables = new URLVariables();
    //  Build the varSend variable
    var varSend:URLRequest = new URLRequest("parse_my_poll.php");
    varSend.method = URLRequestMethod.POST;
    varSend.data = variables;
    // Build the varLoader variable
    var varLoader:URLLoader = new URLLoader;
    varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    varLoader.addEventListener(Event.COMPLETE, completeHandler);
    // Handler for PHP script completion and return
    function completeHandler(event:Event):void{
        // remove processing movieclip
        processing_mc.visible = false;
        // Clear the form fields
        choice_txt.text = "";
        choiceNum = 0;
        // Load the response from the PHP file
        status_txt.text = event.target.data.return_msg;
        status_txt.setTextFormat(errorsFormat);
        if (event.target.data.return_msg == "Thanks for voting!") {
            // Reload new values into the count texts only if we get a proper response and new values
            status_txt.setTextFormat(successFormat);
            count1_txt.text = "" + event.target.data.choice1Count;
            count2_txt.text = "" + event.target.data.choice2Count;
            count3_txt.text = "" + event.target.data.choice3Count;
    // Add an event listener for the submit button and what function to run
    vote_btn.addEventListener(MouseEvent.CLICK, ValidateAndSend);
    // Validate form fields and send the variables when submit button is clicked
    function ValidateAndSend(event:MouseEvent):void {
        //validate form fields
        if(!choice_txt.length) {  
            // if they forgot to choose before pressing the vote button
            status_txt.text = "Please choose before you press vote.";  
            status_txt.setTextFormat(errorsFormat);
        } else {
            status_txt.text = "Sending...";
            processing_mc.visible = true;
            // Ready the variables for sending
            variables.userChoice = choiceNum;
            variables.myRequest = "store_choice";  
            // Send the data to the php file
            varLoader.load(varSend);
        } // close else after form validation
    } // Close ValidateAndSend function ////////////////////////

    This error means that you are trying to set the text field but there is no data in the variable. As a first step, try to identify where this is happening, eg Is it the first call, or once you have submitted your data or only if you try to submit data second time?
    Trace out the data that is returned for both completeHandlers to see if there is a missing var. Try this for "load_numbers" and "store_choice". Do it twice for "store_choice". Do you get back what you expected?
    You could also try altering the php to return some fixed dummy variables, eg  choice1Count=11&choice2Count=22&choice3Count=33, etc. If this works then you know that the error is in the PHP.
    It looks to me like the issue is when you submit the data a second time and just get back the return_msg - the handler then tries to assign the choice1Count etc but doesn't have any count data back from the poll.php.
    Test that there is data before assigning it, eg
        if(event.target.data.choice1Count){
            count1_txt.text =  event.target.data.choice1Count;
            count2_txt.text =  event.target.data.choice2Count;
            count3_txt.text =  event.target.data.choice3Count;

  • ActionScript 3 + PHP: TypeError: Error #2007: Parameter text must be non-null.

    Hi - Still new to flash as3 and php -
    it is a contact form page - user puts in information - i am to receive it in an email address their information
    as well the variables get sent back from the php to the .swf file.
    I am receiving these errors and not knowing how to fix them.
    any help would be much appreciated. thank you in advance really.
    below are the errors in flash - as3 code - and php code setup.
    errors:
    ActionScript 3 + PHP: TypeError: Error #2007: Parameter text must be non-null:
      at flash.text::TextField/set text()
              at kwangjaekim_fla::wholeform_16/completeHandler()
              at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    my as3 code is the following:
    // build variable name for the URL Variables loader
    var variables:URLVariables = new URLVariables();
    //Build the varSend variable
    var varSend:URLRequest = new URLRequest("contact_parse.php");
    varSend.method = URLRequestMethod.POST;
    varSend.data = variables;
    //Build the varLoader variable
    var varLoader:URLLoader = new URLLoader;
    varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    varLoader.addEventListener(Event.COMPLETE, completeHandler);
    //handler for the PHP  script completion and return of status
    function completeHandler(event:Event):void{
              //value is cleared at ""
              name_txt.text = "";
              contact_txt.text = "";
              msg_txt.text = "";
              //Load the response PHP here
              status_txt.text = event.target.data.return_msg;
    //Add event listener for submit button click
    submit_btn.addEventListener(MouseEvent.CLICK, ValidateAndSend);
    //function ValidateAndSend
    function ValidateAndSend(event:MouseEvent):void{
              //validate fields
              if(!name_txt.length){
                        status_txt.text = "Please Enter Your Name";
              }else if(!contact_txt.length){
                        status_txt.text = "Please Enter Your Contact Detail";
              }else if(!msg_txt.length){
                        status_txt.text = "Please Enter Your Message";
              }else {
              // ready the variables in form for sending
      variables.userName = name_txt.text;
              variables.userContact = contact_txt.text;
              variables.userMsg = msg_txt.text;
              // Send the data to PHP now
    varLoader.load(varSend);
    submit_btn.addEventListener(MouseEvent.CLICK, function(){MovieClip(parent).gotoAndPlay(151)});
              } // Close else condition for error handling
    } // Close validate and send function
    my php code is the following:
    <?php
    // Create local PHP variables from the info the user gave in the Flash form
    $senderName   = $_POST['userName'];
    $senderEmail     = $_POST['userContact'];
    $senderMessage = $_POST['userMsg'];
    // Strip slashes on the Local variables
    $senderName   = stripslashes($senderName);
    $senderContact     = stripslashes($senderContact);
    $senderMessage   = stripslashes($senderMessage);
    //!!!!!!!!!!!!!!!!!!!!!!!!!     change this to my email address     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                              $to = "put iny me email address";
         // Place sender Email address here
        $from = "$senderContact ";
        $subject = "Contact from your site";
        //Begin HTML Email Message
        $message = <<<EOF
    <html>
      <body bgcolor="#FFFFFF">
    <b>Name</b> = $senderName<br /><br />
    <b>Contact</b> = <a href="mailto:$senderContact">$senderEmail</a><br /><br />
    <b>Message</b> = $senderMessage<br />
      </body>
    </html>
    EOF;
       //end of message
        $headers  = "From: $from\r\n";
        $headers .= "Content-type: text/html\r\n";
        $to = "$to";
        mail($to, $subject, $message, $headers);
    exit();
    ?>
    thank you once again
    jay

    thank you Ned -
    i put in the trace line as you mentioned -
    and this is what i received -
    returns: undefined
    TypeError: Error #2007: Parameter text must be non-null
              at flash.text::TextField/set text()
              at kwangjaekim_fla::wholeform_16/completeHandler()
              at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    what does this mean exactly?
    thank you for the help really

  • UIComponent+Button=TypeError: Error #2007: Parameter child must be non-null.

    I have created a super-simple Flash Component, -just a Button and TextArea together. These are both placed in 'assets' layer frame 2, with avatar in Frame 1, etc, and tied this to an ActionScript3 class, TestComponent.
    When I use this component, in say, Tester.fla, I get the following error,
    TestComponent1 Constructor called
    TypeError: Error #2007: Parameter child must be non-null.
        at flash.display::DisplayObjectContainer/addChildAt()
        at fl.controls::BaseButton/drawBackground()
        at fl.controls::LabelButton/draw()
        at fl.controls::Button/draw()
        at fl.core::UIComponent/callLaterDispatcher()
    If I include the 'Button' in Tester.fla library, the error goes away. But I don't have to do this for the TestArea.
    It appears that 'Button' need special treatment in Flash. I have seen this question asked several times before in different ways, and never answered.
    I would appreciate some explanation for this strange behavior, or if I designed my TestComponent incorrectly, then please advise on the correct design.
    Thanks
    Andrew

    click file/publish settings/flash and tick "permit debugging".   retest.  if you're lucky the line number of the problematic line of code will be in your error message.

  • TypeError: Error #2007: Parameter child must be non-null.

    Hello,
    I am new to actionscript 3.0, I have Adobe Flash Builder 4.7 installed and I am creating a ActionScript project (File -> New -> ActionScript Project) named as Test. As you know flash builder does not include fl.controls package by default. I have added this package to my project as source path or swc file so that I can use the default components (e.g. Buttons, RadioButtons, Checkboxes) and now I am writing the following code.
    package
              import flash.display.Sprite;
              import fl.controls.Button;
              [SWF(width = "640", height = "480", frameRate = "60", backgroundColor = "#FFFFFF")]
              public class Test extends Sprite
                             private var btn:Button;
           public function Test()
                                  btn = new Button();
                                  btn.label = "CLICK ME!";
                                  btn.x = 100;
                                  btn.y = 100;
                   addChild(btn);
    I am creating a fl.controls.Button instance in Test class and trying to add it on stage. When I run the project, it always gives me the following error for the bold red line.
    TypeError: Error #2007: Parameter child must be non-null.
              at flash.display::DisplayObjectContainer/addChildAt()
              at fl.controls::BaseButton/drawBackground()[C:\Program Files (x86)\Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\controls\BaseButton.as:615]
              at fl.controls::LabelButton/draw()[C:\Program Files (x86)\Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\controls\LabelButton.as:724]
              at fl.controls::Button/draw()[C:\Program Files (x86)\Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\controls\Button.as:191]
              at fl.core::UIComponent/callLaterDispatcher()[C:\Program Files (x86)\Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\core\UIComponent.as:1511]
    Pleae help me out to get rid of this problem. Thanks in advance.
    Thanks,
    momersaleem

    I know you are talking about Flash Builder but the same has to be true of Flash Builder as far as having the objects that go with the classes, especially if they are the objects that Flash Pro utilizes.
    I do not use Flash Builder so I can't answer from experience how you go about getting the components into the library.  What I normally do to find answers to desgn issues is to start looking thru Google.
    If I search Google using the terms "Flash Builder use AS3 components" I get several results that might provide a solution.  Here's one...
    http://stackoverflow.com/questions/5602962/getting-flash-ui-components-into-builder
    See if the answer for that one works for you, and if not, try some of the others in that search's results.

  • TypeError: Error #2007: Parameter text must be non-null

    I am new to AS period, but I am following some training videos for AS 3.0 to create a portfolio site where the images and text are loaded by xml.
    I have followed the instructions to the letter; however I am getting the #2007 Parameter text must be not-null error.
    I have pasted my code below:
    var titleArray:Array = new Array();
    var descriptionArray:Array = new Array();
    var largeImageArray:Array = new Array();
    var thumbnailImageArray:Array = new Array();
    var imageNum:Number=0;
    var totalImages:Number;
    //XML
    //load in XML
    var XMLURLLoader:URLLoader = new URLLoader();
    XMLURLLoader.load(new URLRequest("assets/portfolio/portfolio.xml"));
    XMLURLLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(event:Event):void {
    var theXMLData:XML=new XML(XMLURLLoader.data);
    totalImages=theXMLData.title.length();
    for (var i:Number = 0; i < totalImages; i++) {
    titleArray.push(theXMLData.title[i]);
    descriptionArray.push(theXMLData.description[i]);
    largeImageArray.push(theXMLData.largeImage[i]);
    thumbnailImageArray.push(theXMLData.thumbImage[i]);
    loadThumbnail();
    myScrollPane.source=allThumbnails;
    //LOAD THE THUMBNAILS
    function loadThumbnail():void {
    trace(imageNum);
    var thumbLoader:Loader = new Loader();
    thumbLoader.load(new URLRequest(thumbnailImageArray[imageNum]));
    thumbLoader.x = 90*imageNum;
    //stores the appropriate info for thumbnail
    var thisLargeImage:String = largeImageArray[imageNum];
    var thisTitle:String = titleArray[imageNum];
    var thisDescription:String = descriptionArray[imageNum];
    thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);
    function thumbLoaded(event:Event):void {
    //add the thumbnails to the allThumbnails instance
    allThumbnails.addChild(thumbLoader);
    allThumbnails.buttonMode = true;
    myScrollPane.update();
    thumbLoader.addEventListener(MouseEvent.CLICK, loadMainImage1);
    function loadMainImage1(event:MouseEvent):void {
    largeUILoader.source=thisLargeImage;
    selectedTitle.text=thisTitle;
    selectedDesc.text=thisDescription;
    //add to imageNum (1);
    imageNum++;
    if (imageNum<totalImages) {
    loadThumbnail();
    I know my error has something to do with this part of the code:
    //stores the appropriate info for thumbnail
    var thisLargeImage:String = largeImageArray[imageNum];
    var thisTitle:String = titleArray[imageNum];
    var thisDescription:String = descriptionArray[imageNum];
    but I can't figure out what's wrong. When I test my movie, everything functions correctly except when I click on a different thumbnail, the proper description does not load. My xml file is set up correctly. Here is a bit of that code:
    <?xml version="1.0" encoding="UTF-8"?>
    <portfolio>
    <!--Image 1-->
    <title>Spark Your Imagination Ad</title>
    <![CDATA[<description>These black & white ads were designed to run in the trade publication The Green Sheet in the Merchant Acquiring Industry</description>]]>
    <largeImage>assets/portfolio/lg/1.jpg</largeImage>
    <thumbImage>assets/portfolio/thumbs/1.jpg</thumbImage>
    <!--Image 2-->
    <title>Corporate Business Card - iMax Bancard</title>
    <![CDATA[<description>This full color double-sided business card is the current standard card being used by employees and agents of iMax Bancard</description>]]>
    <largeImage>assets/portfolio/lg/2.jpg</largeImage>
    <thumbImage>assets/portfolio/thumbs/2.jpg</thumbImage>
    </portfolio>
    The only thing different with my xml code is that in the tutorial I am following, the <description></description> tags are on the outside of the CDATA tags (which I have seen examples of both)... but when I put the code that way, it causes breaks in my code at the first special character I use.
    Any help is appreciated. Thanks, Jen

    click file/publish settings/flash and tick "permit debugging".  retest.  the line number with the non-existant object will be in the error message.

  • Error #1007 - attempting to instantiate a non-constructor

    I am receiving said message on an actionscript-only project. I tried to reduce the application to a nonsensical example:
    package
    {       import flash.display.Sprite;
            public class zz extends Sprite
                    public function zz()
                            var dummies:Array = [];
                            dummies.push(new dummy());
                            dummies.push(new dummy());
                            var newdata:Array = dummy.mixup(dummies);
    package
            import flash.geom.Point;
            public dynamic class dummy extends Array
                    public function addp(pt:Point):void
                            this.push(pt.clone());
                    public static function mixup(dummies:Array):Array
                            var ret:Array = [];
                            function local_makeresult():void
                            {       for(var n:int = 0 ; n < 3 ; n++)
                                    {       var b:dummy = new dummy();
                                            ret.push(b);
                            local_makeresult();
                            for(var m:int = 0 ; m < dummies.length ; m++)
                            {       for(var n:int = 0 ; n < 3 ; n++)
                                    {       var i:int = int(dummies[m].length * Math.random());
                                            var j:int = int(3 * Math.random());
                                            ret[j].push(dummies[m][i]);
                            return ret;
    So the problem class
    a) extends array
    b) includes a static utility function (converting an array of class objects into another one)
    c) that utility function includes nested functions
    Tge error message looks like this
    TypeError: Error #1007: Instantiation attempted on a non-constructor.
        at dummy/mixup/local_makeresult()
        at dummy$/mixup()
    Does this mean we cannot use nested functions inside static ones?

    Hi
    as I said this is not actual code (several hundred lines) but just a contrived example modelling the application structure. While it is still something different, lets assume that the dummy class represents polygons (so it derives from array and would implement useful methods like finding total length, area, center of gravity).
    The static function could be intersection
    I am using quite a few nested functions in this project - they have access to local variables of the enclosing function. Without the m I wouldhave to pass in a handful of variables (or an object grouping them together)
    I have already noticed that nested functions are a mixed blessing, because there are fewer compile-time checks (such as number and type of arguments). However, they exist, so why shouldn't I use them?
    One of the things I stumbled over: when I got the error, I tried one thing ... that did make the code work in the end: I removed the static attribute from the function and changed the main class to call it as a method of the first element of the array (which is certainly making it unreadable)

Maybe you are looking for

  • SRM 7.0 Web Dynpro ABAP Customization

    Hi , Upgrading from SRM 5.0 to SRM 7.0 and would require customization at the Web Dynpro ABAP Component for RFx. I need to put a pop-up screen when the Buyer clicks on the "AWARD" button on the Bid Screen. Now I am not able to find the award action/e

  • Internal Requisition Line not appears in receipts form

    Hi, I have created an internal req. with 3 lines. After that the internal requisition was approved. Then one of the lines was cancelled (line 1). After that the ohter 2 lines (line 2 and 3) where received in Receipts form. As I want to receive also L

  • Custom Extractor FM with Delta mode

    I have looked a few blogs that dont seem to address the whole picture. the online help looks to be wrong? http://help.sap.com/saphelp_nw70/helpdata/en/3f/548c9ec754ee4d90188a4f108e0121/frameset.htm Im trying to set up an FM to do generic extraction.

  • Newblue Noise Reducer Offline in Premiere Elements 12

    I've been using the Newblue Noise Reducer in Premiere Elements 12, but it's all the sudden gone offline. Does anyone know how I get it back? When I open a new project, the effect won't even show up under audio effects anymore, and when I open a proje

  • How can I get Flash cs5 to open a separate window

    Hi all, I have a project that has buttons, which I would like to open external SWF within a separate window. I would open them up within the project file, but the dimensions are to big (1024x768) and I don't know how to scale the SWF for the area of