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.

Similar Messages

  • 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.

  • As3 TypeError:#2007 Parameter text must be non-null can't fix.

    I have comment box project. As3+php based project.And have #2007 Error.Try to fix but can't do anything.If can help it would be very helpful.Error part like this:
    TypeError: Error #2007: Parameter text must be non-null. at flash.text::TextField/set text() at comment2_fla::mc_1/completeHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete()
    First Part of Code:
    var variables_re:URLVariables = new URLVariables();
    var varSend_re:URLRequest = new URLRequest("guestbookParse.php");
    varSend_re.method = URLRequestMethod.POST;
    varSend_re.data = variables_re;
    var varLoader_re:URLLoader = new URLLoader;
    varLoader_re.dataFormat = URLLoaderDataFormat.VARIABLES;
    varLoader_re.addEventListener(Event.COMPLETE,completeHandler_re);
    function completeHandler_re(event:Event):void{
              if(event.target.data.returnBody==""){
                 gbOutput_txt.text = "no data";
                 } else {
                           gbOutput_txt.condenseWhite = true;
                           gbOutput_txt.htmlText = "" + event.target.data.returnBody;
    variables_re.comType = "requestEntries";
    varLoader_re.load(varSend_re);
    Second Part of Code:
    msg_txt.restrict = "ığüşöç A-Za-z 0-9";
    name_txt.restrict = "ığüşöç A-Za-z 0-9";
    var errorsFormat:TextFormat = new TextFormat();
    errorsFormat.color = 0XFF0000;
    processing_mc.visible = false;
    var variables:URLVariables = new URLVariables();
    var varSend:URLRequest = new URLRequest("guestbookParse.php");
    varSend.method = URLRequestMethod.POST;
    varSend.data = variables;
    var varLoader:URLLoader = new URLLoader;
    varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    varLoader.addEventListener(Event.COMPLETE,completeHandler);
    function completeHandler(event:Event):void{
              processing_mc.visible = false;
              name_txt.text = "";
              msg_txt.text = "";
              status_txt.text = event.target.data.return_msg;
              gbOutput_txt.condenseWhite = true;
              gbOutput_txt.htmlText=""+event.target.data.returnBody;
    submit_btn.addEventListener(MouseEvent.CLICK,ValidateAndSend);
    function ValidateAndSend(event:MouseEvent):void{
              if(!name_txt.length){
                        status_txt.text = "İsminizi Girin";
                        status_txt.setTextFormat(errorsFormat);
              } else if (!msg_txt.length){
                        status_txt.text = "Yorum Girin";
                        status_txt.setTextFormat(errorsFormat);
              }else{
                        processing_mc.visible = true;
                        variables.comType = "parseComment";
                        variables.userName = name_txt.text;
                        variables.userMsg = msg_txt.text;
                        varLoader.load(varSend);
                        status_txt.text = "Yorumunuz Eklendi...";
    Php Part:
    <?php
    mysql_connect("localhost","root","") or die (mysql_error());
    mysql_select_db("yorum") or die (mysql_error());
    if ($_POST['comType'] == "parseComment") {
        $name = $_POST['userName'];
              $location = $_POST['userLocation'];
        $comment = $_POST['userMsg'];
        $sql = mysql_query("INSERT INTO guestbook (name, post_date, comment, location)
            VALUES('$name', now(),'$comment','$location')") 
            or die (mysql_error());
              $body = "";
        $sql = mysql_query("SELECT * FROM guestbook ORDER BY post_date DESC");
        while($row = mysql_fetch_array($sql)) {
                        $id = $row["id"];
                        $name = $row["name"];
                        $post_date = $row["post_date"];
                        $comment = $row["comment"];
                        $location = $row["location"];
                        $comment = stripslashes($comment);
                        $name = eregi_replace("&#39;", "'",  $name);
                        $location = eregi_replace("&#39;", "'",  $location);
                        $comment = eregi_replace("&#39;", "'", $comment);
                        $post_date = strftime("%b %d, %y", strtotime($post_date));
                        $body .= '<u><b><font color="#790000">' . $name . '</font>    |    <font color="#9B9B9B">' . $location . '</font>      |      <font color="#9B9B9B">' . $post_date . '</font></b></u>
                        <br />
                        '.$comment.'
                        <br />
                        <br />
        mysql_free_result($sql);
        mysql_close();
         echo "return_msg=Entry has been added successfully $name, thanks!&returnBody=$body";
         exit();
    if ($_POST['comType'] == "requestEntries") {
        $body = "";
        $sql = mysql_query("SELECT * FROM guestbook ORDER BY post_date DESC");
        while($row = mysql_fetch_array($sql)) {
                        $id = $row["id"];
                        $name = $row["name"];
                        $post_date = $row["post_date"];
                        $comment = $row["comment"];
                        $location = $row["location"];
                        $comment = stripslashes($comment);
                        $post_date = strftime("%b %d, %y", strtotime($post_date));
                        $body .= '<u><b><font color="#790000">' . $name . '</font>    |    <font color="#9B9B9B">' . $location . '</font>      |      <font color="#9B9B9B">' . $post_date . '</font></b></u>
                        <br />
                        '.$comment.'
                        <br />
                        <br />
        mysql_free_result($sql);
        mysql_close();
        echo "returnBody=$body";
        exit();
    ?>

    use the trace function to debug:
    function completeHandler(event:Event):void{
              processing_mc.visible = false;
              name_txt.text = "";
              msg_txt.text = "";
              status_txt.text = event.target.data.return_msg;
              gbOutput_txt.condenseWhite = true;
    trace("::"+event.target.data.returnBody+"::");
              gbOutput_txt.htmlText=""+event.target.data.returnBody;
    // and then initialize $body outside those if-statements or ensure you're sending an appropriate comType variable and value. 
    // right now it doesn't look like you're even sending comType with varSend.
    // ie, you must assign the urlrequest data property AFTER urlvariable variables/values are assigned.

  • How to solve the error Type Error #2007: Parameter hitTestObject must be non-null.

    When I combine the storytelling part(storytelling that run frame by frame) with platform game, this error appear:
    TypeError: Error #2007: Parameter hitTestObject must be non-null.
    at flash.display:: DisplayObject/_hitTest()
    at flash.display:: DisplayObject/hitTestObject()
    at SaveMyBaby4_fla::Background_27/frame1()
    at flash.display::MovieClip/gotoAndPlay()
    at SaveMyBaby4_fla::Mainmenu_20/clickStart()
    How can i solve it? As i use this coding:
    var leftDown:Boolean = false;
    var rightDown:Boolean = false;
    var upDown:Boolean = false;
    var downDown:Boolean = false;
    var leftBumping:Boolean = false;
    var rightBumping:Boolean = false;
    var upBumping:Boolean = false;
    var downBumping:Boolean = false;
    var leftBumpPoint:Point = new Point(0, 0);
    var rightBumpPoint:Point = new Point(0, 0);
    var upBumpPoint:Point = new Point(0, 0);
    var downBumpPoint:Point = new Point(0, 0);
    var scrollX:Number = 500;
    var scrollY:Number = 0;
    var xSpeed:Number = 0;
    var ySpeed:Number = 0;
    var speedConstant:Number = 2;
    var frictionConstant:Number = 0.9;
    var gravityConstant:Number = 1.5;
    var jumpConstant:Number = -35;
    var maxSpeedConstant:Number = 18;
    var doubleJumpReady:Boolean = false;
    var upReleasedInAir:Boolean = false;
    var door:Boolean = false;
    var currentLevel:int = 1;
    var animationState:String="rest";
    function loop(e:Event):void{
    if(back.block.hitTestPoint(player.x + leftBumpPoint.x, player.y + leftBumpPoint.y, true)){
    //trace("leftBumping");
    leftBumping = true;
    } else {
    leftBumping = false;
    if(back.block.hitTestPoint(player.x + rightBumpPoint.x, player.y + rightBumpPoint.y, true)){
    //trace("rightBumping");
    rightBumping = true;
    } else {
    rightBumping = false;
    if(back.block.hitTestPoint(player.x + upBumpPoint.x, player.y + upBumpPoint.y, true)){
    //trace("upBumping");
    upBumping = true;
    } else {
    upBumping = false;
    if(back.block.hitTestPoint(player.x + downBumpPoint.x, player.y + downBumpPoint.y, true)){
    //trace("downBumping");
    downBumping = true;
    } else {
    downBumping = false;
    if(leftDown){
    xSpeed -= speedConstant;
    player.scaleX = -1;
    } else if(rightDown){
    xSpeed += speedConstant;
    player.scaleX = 1;
    /*if(upPressed){
    ySpeed -= speedConstant;
    } else if(downPressed){
    ySpeed += speedConstant;
    if(leftBumping){
    if(xSpeed < 0){
    xSpeed *= -0.5;
    if(rightBumping){
    if(xSpeed > 0){
    xSpeed *= -0.5;
    if(upBumping){
    if(ySpeed < 0){
    ySpeed *= -0.5;
    if(downBumping){ //if we are touching the floor
    if(ySpeed > 0){
    ySpeed = 0; //set the y speed to zero
    if(upDown){ //and if the up arrow is pressed
    ySpeed = jumpConstant; //set the y speed to the jump constant
    //DOUBLE JUMP
    if(upReleasedInAir == true){
    upReleasedInAir = false;
    if(doubleJumpReady == false){
    doubleJumpReady = true;
    } else { //if we are not touching the floor
    ySpeed += gravityConstant; //accelerate downwards
    //DOUBLE JUMP
    if(upDown == false && upReleasedInAir == false){
    upReleasedInAir = true;
    //trace("upReleasedInAir");
    if(doubleJumpReady && upReleasedInAir){
    if(upDown){ //and if the up arrow is pressed
    //trace("doubleJump!");
    doubleJumpReady = false;
    ySpeed = jumpConstant; //set the y speed to the jump constant
    if(door == false)
    if(player.hitTestObject(back.door))
    door = true;
    if(xSpeed > maxSpeedConstant){ //moving right
    xSpeed = maxSpeedConstant;
    } else if(xSpeed < (maxSpeedConstant * -1)){ //moving left
    xSpeed = (maxSpeedConstant * -1);
    xSpeed *= frictionConstant;
    ySpeed *= frictionConstant;
    if(Math.abs(xSpeed) < 0.5){
    xSpeed = 0;
    scrollX -= xSpeed;
    scrollY -= ySpeed;
    back.x = scrollX;
    back.y = scrollY;
    sky.x = scrollX * 0.2;
    sky.y = scrollY * 0.2;
    if((leftDown||rightDown||xSpeed>speedConstant||xSp eed<speedConstant*-1)&&downBumping){
    animationState="playerrun";
    else if(downBumping){
    animationState="rest";
    else{
    animationState="jump";
    if(player.currentLable!=animationState){
    player.gotoAndStop(animationState);
    function nextLevel():void{
    currentLevel++;
    gotoAndPlay(4, "Scene 1");
    door = false;
    function keyDownHandler(e:KeyboardEvent):void
    if(e.keyCode == Keyboard.LEFT)
    leftDown = true;
    else if(e.keyCode == Keyboard.RIGHT)
    rightDown = true;
    else if(e.keyCode == Keyboard.UP)
    upDown = true;
    else if(e.keyCode == Keyboard.DOWN)
    downDown= true;
    if(player.hitTestObject(back.door))
    //proceed to the next level if the player is touching an open door
    door = true;
    gotoAndPlay(5, "Scene 1");
    function keyUpHandler(e:KeyboardEvent):void{
    if(e.keyCode == Keyboard.LEFT){
    leftDown = false;
    } else if(e.keyCode == Keyboard.RIGHT){
    rightDown = false;
    } else if(e.keyCode == Keyboard.UP){
    upDown = false;
    } else if(e.keyCode == Keyboard.DOWN){
    downDown = false;

    The code I say to add is to troubleshoot the problem, it will not solve it, but it could help lead to solving it if the file is able to compile.  Does the trace show up in your output panel?  If so, what does it indicate?
    You should also go into your Flash section of the Publish Settings and select the option to Permit Debugging... that can help by adding a line number to the error message.
    What is the 'door' object that is associated with the 'back' object?  Does it exist in a frame that is not present when you try to run the file?  If so, check to make sure that it has its instance name assigned in every keyframe it occupies.

  • CS3 All Buttons give error #2007: Parameter child must be non-null

    Using CS3 actionscript all buttons give the following code. I
    have tried it myself and used the examples with CS3 and on
    livedocs.
    Here is the button code:*************************
    import fl.controls.Button;
    var myButton:Button = new Button();
    myButton.toggle = true;
    myButton.move(10, 10);
    myButton.addEventListener(Event.CHANGE, changeHandler);
    addChild(myButton);
    function changeHandler(event:Event):void {
    trace("Button toggled (selected:" +
    event.currentTarget.selected + ")");
    **************Error ***************************
    TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/addChildAt()
    at
    fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
    at fl.controls::LabelButton/fl.controls:LabelButton::draw()
    at fl.controls::Button/fl.controls:Button::draw()
    at fl.core::UIComponent/::callLaterDispatcher()
    Button toggled (selected:true)
    Can anyone help me with correcting this problem. I can't find
    it by googling, searching livedocs, help, etc.

    Thanks that worked. I didn't add other components directly to
    the library, just called them in the actionscript. Do you know why
    the button would be different?

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

    I got this error in a for loop:
    for (var i=0; i<=4; i++)
    var titleLength:int = sensors[i].name.indexOf("S");
    var title:String = sensors[i].name.slice(0,titleLength);
    trace(title);                                                            //test;
    sensors[i].addEventListener(MouseEvent.CLICK,s_thClick);
    function s_thClick(event:MouseEvent):void
      trace(event.currentTarget.name);                            //shows the right name
      event.currentTarget.removeEventListener(MouseEvent.MOUSE_OUT, ("f_"+title+"Go") as Function);
      event.currentTarget.removeEventListener(MouseEvent.MOUSE_OVER, ("f_"+title+"Display")as Function );
    the second trace() in this code shows exactly what I wanted but a 2007 error occurs at the line of the code.
    Can someone help me figure this out?

    I mean get that function out of the loop altogether... there can only be one function, where the variables used remain as variables, so when you start using it, the value of "i" at that time will be 5 (where the loop ended).  It does not remember a specific value of i for each object you ran thru the loop.
    for (var i=0; i<=4; i++)
       sensors[i].addEventListener(MouseEvent.CLICK,s_thClick);
    function s_thClick(event:MouseEvent):void
       var sensor = event.currentTarget; // might need to be... = MovieClip(event.currentTarget)
       var titleLength:int = sensor.name.indexOf("S");
       var title:String = sensor.name.slice(0,titleLength);
      sensor.removeEventListener(MouseEvent.MOUSE_OUT, ("f_"+title+"Go") as Function);
      sensor.removeEventListener(MouseEvent.MOUSE_OVER, ("f_"+title+"Display")as Function );
      switch (sensor)
       case homeS :
        break;
       case portS :
        maskParent2.portMsk.scaleY = -20;
        break;
       case contactS :
        maskParent2.contactMsk.scaleY = -20;
        break;
       case galleryS:
        maskParent.galleryMsk.scaleY = -20;
           break;
       case resumeS:
           maskParent.resumeMsk.scaleY=-20;
        break;
       default :
        break;
      sensor.y = -544;
      MovieClip(title + "Btn").gotoAndStop("show"+title);

  • AIR for IOS, ApplicationDomain problem: Error #2007: Parameter Possible symbol clash in multiple swf

    I am exporting a game for IOS in Flash CS6.
    I have isolated classes, except a framework for static utilities that do not clash, but I still get this message when exporting for IOS.
    AIR for desktop, even with ApplicationDomain.currentDomain works and does not give any error. Same on android.
    When I export the same exact project for IOS, it triggers that error randomly in different parts.
    All related with a call to a method on superclass, the instantiation of an internal class, or of a Vector typed to a custom internal class.
    TypeError: Error #2007: Parameter Possible symbol clash in multiple swfs, abcenv must be non-null.
    The line that triggers the error:
    return new RouletteChoserItemDev(num, data);
    Any help is appreciated.
    UPDATE
    I have changed the code into:
    var item:RouletteChoserItemDev;
    var MyClass:Class = RouletteChoserItemDev;
    item = new MyClass(num, data);
    Now I get this funny error:
    Error #1034: Type Coercion failed: cannot convert device.plugins.rouletteLobby::RouletteChoserItemDev@6284bc9 to .
    Yes, cannot convert to ".", a dot!

    *FOUND A SOLUTION*
    The way ApplicationDomain.sameDomain works on Android and Desktop, and on IOS, IS DIFFERENT!!!
    I probably have to file this under AIR bugs.
    Anyway:
    - In loaded SWFs, classes which are not already stored in parent SWF CANNOT be instantiated.
    I.E.
    var c:MyClass = new MyClass(); // Will not work
    var c = new MyClass(); // Will not work
    var c:MyClass = getDefinitionByName("fullpackage.MyClass"); // Will not work
    var c = getDefinitionByName("fullpackage.MyClass"); // WORKS!!!!!
    var c:DisplayItem = getDefinitionByName("fullpackage.MyClass"); // WORKS!!!!!
    So, it seems that classes stored in local loaded SWF will not be accessible directly. Even though tracing it trace(MyClass) works well, the class cannot be used in code in any place. Variables cannot be typed, and class can only be instantiated with getDefinitionByName();
    All this, is true ONLY on IOS, same exact project and settings, will not trigger any error in AIR for Desktop or for Android.
    But since obviously we use the same codebase for all devices, this IOS *feature* has to guide the way we code, even though we break a few important OOP best practices.
    Hope I spared someone else the 3 days including an entire weekend I had to invest to find this out.

  • 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 #2022: Class DS0$ must inherit from DisplayObject to link to a symbol

    Hello,
    When I tried AIR 3.7.0.1410 (ASC 2.0) to make an instance of a class that has AS linkage compiled as swc by Flash Pro,  it fails on
    TypeError: Error #2022: Class DS0$ must inherit from DisplayObject to link to a symbol
    at flash.display::Sprite/constructChildren()
        at flash.display::Sprite()
        at flash.display::MovieClip()
        at flash.display::Sprite/constructChildren()
        at flash.display::Sprite()
        at (AS-linkaged class name)
    while it's OK with AIR 3.6.0.6090.
    I'm on Windows 7 and Flash Builder 4.7. Does anyone see this issue?
    As for bug I put it here (Bug 3520793)
    https://bugbase.adobe.com/index.cfm?event=bug&id=3520793

    Hi Colin,
    Can you show me how you're embedding the asset in ASC 2.0?
    In Flash Pro, I imported a wav file into my library, configured the sound's linkage properties to export the asset, using the class name "ding". I then published the project as a .swc.
    In Flash Builder 4.7 Beta 1 (updated to ASC 2.0 Preview 3, though I don't think this is necessary for this particular test case), I created a new ActionScript Project, added the swc to my project library path, and then instantiated an instance of ding and played it. It seemed to work fine:
    package
        import flash.display.Sprite;
        import flash.media.Sound;
        public class SoundTest extends Sprite
            public function SoundTest()
                var s:Sound = new ding();
                s.play(0, 10);

  • 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.

  • 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

  • Fl.* components not displaying correctly, getting error 2007 and 1009. help me please

    Hi guys,
    I am trying to make my application use Flash components, but I have a problem with displaying them correctly. I've used Flash CS5 to export them into .SWC. In Flex it seems that their graphics doesn't load, and below is a screenshot how it looks with a Button and UILoader. I couldn't find any solution, as I've searched other forums.
    And also I've selected all flash components to be included in the .SWC library, but almost half of them is missing when I include the file in Flex. Is maybe some catalog corrupted or is it an issue with Flash CS5? I hope somebody can help please!
    I when I try to use the .SWC in in Flash I get this:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at fl.containers::ScrollPane/drawBackground()
    at fl.containers::ScrollPane/draw()
    at fl.core::UIComponent/callLaterDispatcher()
    TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/addChildAt()
    at fl.controls::BaseButton/drawBackground()
    at fl.controls::BaseButton/draw()
    at fl.core::UIComponent/drawNow()
    at fl.controls::ScrollBar/draw()
    at fl.core::UIComponent/callLaterDispatcher()

    Hi guys,
    I am trying to make my application use Flash components, but I have a problem with displaying them correctly. I've used Flash CS5 to export them into .SWC. In Flex it seems that their graphics doesn't load, and below is a screenshot how it looks with a Button and UILoader. I couldn't find any solution, as I've searched other forums.
    And also I've selected all flash components to be included in the .SWC library, but almost half of them is missing when I include the file in Flex. Is maybe some catalog corrupted or is it an issue with Flash CS5? I hope somebody can help please!
    I when I try to use the .SWC in in Flash I get this:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at fl.containers::ScrollPane/drawBackground()
    at fl.containers::ScrollPane/draw()
    at fl.core::UIComponent/callLaterDispatcher()
    TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/addChildAt()
    at fl.controls::BaseButton/drawBackground()
    at fl.controls::BaseButton/draw()
    at fl.core::UIComponent/drawNow()
    at fl.controls::ScrollBar/draw()
    at fl.core::UIComponent/callLaterDispatcher()

Maybe you are looking for

  • Incorporation of PNG files in the view

    Hello All, As an example let us consider that I want to make a very simple application that just displays a pre-existing PNG graphics file filling the window and a text area over it. How do I go about doing that? I assume the solution begins with mak

  • IMessage and FaceTime not working, Urgent Help please!!!

    Hi guys, Need help urgently, my iMessage and FaceTime are both not working on my Macbook Pro. The iMessage gives giving this message "Could not sign in. Please check your network connection and try again.", while FaceTime just simply cannot login. Pl

  • Error while firing a WD Exit Plug in Portal :(

    Hello All, Am new in WD and created the Quiz Demo Application referring to help.sap.com. I have added a URL to the Exit plug as: wdThis.wdGetQuizInterfaceViewController().wdFirePlugGotoUrl("http://toyouamit.googlepages.com/home") The application is w

  • Results Analysis cost elements

    Hello, The Results Analysis saves the Results Analysis data under secondary cost elements. These cost elements can be determined thru assignment to Line IDs in the transaction OKG4 (OKGA) u201CUpdate of WIP Calculation and Results Analysisu201D, or t

  • Hot Backup & Archive log

    I got a doubt here. I am scheduling a online backup everynight.Is it enough to keep the archive log files upto nextdays backup. 10PM backup starts then archive logs will be backed up.next day 10PM again full backup starts so is it just enough to main