2007 error

What this application does is it receives input numbers from the user like length, width, height, velocity and time, and then it calculates the volume of the basin and the error that it has while gaining or losing water (it changes in time).
The thing is I am getting error 2007 and don't know what to do.
Any help to solve this problem will be greatly appreciated.
I've attached the code for this application, the code is in as3 and you just have to copy/paste and it will work, the only thing you have to drag and drop in flash is the progress bar with instance name bar, and a dynamic text field with instance name p.
Please someone help me out, I need this for a homework!

Posted On: Friday 19th of October 2012 03:19:31 AM Total Views:  136
View Complete with Replies

Related Messages:

Error #2007: Parameter listener must be non-null.   (42 Views)
Hi I'm creating a winnie the pooh colouring in game and I'm getting TypeError: Error #2007: Parameter listener must be non-null. at at ColouringinGame_fla::MainTimeline/frame1() The Code on the main time line is import; var myColor = 0xFFFFFF; function getBlack(event:MouseEvent):void { myColor = 0x000000; } function getLightBlue(event:MouseEvent):void { myColor = 0x33CCFF; } function getDarkBlue(event:MouseEvent):void { myColor = 0x3300CC; } function getGrey(event:MouseEvent):void { myColor = 0x666666; } function getLightGreen(event:MouseEvent):void { myColor = 0x66CC66; } function getDarkGreen(event:MouseEvent):void { myColor = 0x003300; } function getBrown(event:MouseEvent):void { myColor = 0x663300; } function getOrange(event:MouseEvent):void { myColor = 0xFF9900; } function getPink(event:MouseEvent):void { myColor = 0xFF66FF; } function getSkin(event:MouseEvent):void { myColor = 0xFFCCCC; } function getPurple(event:MouseEvent):void { myColor = 0x6600CC; } function getRed(event:MouseEvent):void { myColor = 0xFF0000; } function getWhite(event:MouseEvent):void { myColor = 0xFFFFFF; } function getYellow(event:MouseEvent):void { myColor = 0xFFFF00; } this.b_black.addEventListener(MouseEvent.MOUSE_DOW N, getBlack); this.b_grey.addEventListener(MouseEvent.MOUSE_DOWN , getGrey); this.b_dgreen.addEventListener(MouseEvent.MOUSE_DO WN, getDarkGreen); this.b_lblue.addEventListener(MouseEvent.MOUSE_DOW N, getLightBlue); this.b_dblue.addEventListener(MouseEvent.MOUSE_DOW N, getDarkBlue); this.b_lgreen.addEventListener(MouseEvent.MOUSE_DO WN, getLightGreen); this.b_brown.addEventListener(MouseEvent.MOUSE_DOW N, getBrown); this.b_orange.addEventListener(MouseEvent.MOUSE_DO WN, getOrange); this.b_pink.addEventListener(MouseEvent.MOUSE_DOWN , getPink); this.b_purple.addEventListener(MouseEvent.MOUSE_DO WN, getPurple); this.b_red.addEventListener(MouseEvent.MOUSE_DOWN, getRed); this.b_white.addEventListener(MouseEvent.MOUSE_DOW N, getWhite); this.b_yellow.addEventListener(MouseEvent.MOUSE_DO WN, getYellow); this.b_skin.addEventListener(MouseEvent.MOUSE_DOWN , getSkin); this.b_black.addEventListener(MouseEvent.MOUSE_UP, this.brush.colorMe); this.b_grey.addEventListener(MouseEvent.MOUSE_UP, this.brush.colorMe); this.b_dgreen.addEventListener(MouseEvent.MOUSE_UP , this.brush.colorMe); this.b_lblue.addEventListener(MouseEvent.MOUSE_UP, this.brush.colorMe); this.b_dblue.addEventListener(MouseEvent.MOUSE_UP, this.brush.colorMe); this.b_lgreen.addEventListener(MouseEvent.MOUSE_UP , this.brush.colorMe); this.b_brown.addEventListener(MouseEvent.MOUSE_UP, this.brush.colorMe); this.b_orange.addEventListener(MouseEvent.MOUSE_UP , this.brush.colorMe); this.b_pink.addEventListener(MouseEvent.MOUSE_UP, this.brush.colorMe); this.b_purple.addEventListener(MouseEvent.MOUSE_UP , this.brush.colorMe); this.b_red.addEventListener(MouseEvent.MOUSE_UP, this.brush.colorMe); this.b_white.addEventListener(MouseEvent.MOUSE_UP, this.brush.colorMe); this.b_yellow.addEventListener(MouseEvent.MOUSE_UP , this.brush.colorMe); this.b_skin.addEventListener(MouseEvent.MOUSE_UP, this.brush.colorMe); this.Pooh.P_legs.addEventListener(MouseEvent.MOUSE _UP, this.Pooh.P_legs.colorMe); this.Pooh.P_arms.addEventListener(MouseEvent.MOUSE _UP, this.Pooh.P_arms.colorMe); this.Pooh.P_shirt.addEventListener(MouseEvent.MOUS E_UP, this.Pooh.P_shirt.colorMe); this.Pooh.P_body.addEventListener(MouseEvent.MOUSE _UP, this.Pooh.P_body.colorMe); this.Pooh.P_head.addEventListener(MouseEvent.MOUSE _UP, this.Pooh.P_head.colorMe); this.Pooh.P_tounge.addEventListener(MouseEvent.MOU SE_UP, this.Pooh.P_tounge.colorMe); this.Pooh.P_Tjar.addEventListener(MouseEvent.MOUSE _UP, this.Pooh.P_Tjar.colorMe); this.Pooh.P_bjar.addEventListener(MouseEvent.MOUSE _UP, this.Pooh.P_bjar.colorMe); function moveBrush (event:Event) : void { this.brush.startDrag (true); Mouse.hide(); } this.addEventListener(Event.ENTER_FRAME, moveBrush); And the code on the brush is function paint(obj:Object,myColor:Number):void { var newColor:ColorTransform = new ColorTransform(); newColor.color = myColor; obj.transform.colorTransform = newColor; } function colorMe(event:MouseEvent):void { this.paint(this.tip,; } mouseEnabled = false;
Flash Error 2007 & 1009   (46 Views)
, when I run this I get this: TypeError: Error #2007: Parameter hitTestObject must be non-null. at flash.display:isplayObject/_hitTest() at flash.display:isplayObject/hitTestObject() at Untitled_fla::MainTimeline/die() TypeError: Error #2007: Parameter hitTestObject must be non-null. at flash.display:isplayObject/_hitTest() at flash.display:isplayObject/hitTestObject() at Untitled_fla::MainTimeline/bounce() TypeError: Error #1009: Cannot access a property or method of a null object reference. at Untitled_fla::MainTimeline/fl_AccelerometerUpdateHandler_2() import fl.motion.easing.Circular; import; flash.display.MovieClip; death.addEventListener(Event.ENTER_FRAME, die,false); platform.addEventListener(Event.ENTER_FRAME, bounce); top.addEventListener(Event.ENTER_FRAME, bounce); var ball:cir = new cir ; var dy:Number = 5; var dx:Number = 0; var score:Number = 0; var vita:Number = 3; var max:Number = 20; var gameOver:Boolean = false; var myFont = new Font1(); var myFormat:TextFormat = new TextFormat(); myFormat.size = 15; myFormat.font = myFont.fontName; var myText1:TextField = new TextField(); myText1.defaultTextFormat = myFormat; myText1.embedFonts = true; myText1.text = "Lifes:" + vita; addChild(myText1); myText1.textColor = 0xFFFFFF; myText1.x = 230; myText1.y = 0; var myText:TextField = new TextField(); myText.defaultTextFormat = myFormat; myText.embedFonts = true; myText.text = "Your Score:"; addChild(myText); myText.textColor = 0xFFFFFF; myText.x = 0; myText.y = 0; addChild(ball); ball.x = 160; var fl_Accelerometer_2:Accelerometer = new Accelerometer(); fl_Accelerometer_2.addEventListener(AccelerometerE vent.UPDATE, fl_AccelerometerUpdateHandler_2); function fl_AccelerometerUpdateHandler_2(event:Acceleromete rEvent):void { platform.x -= event.accelerationX * 30; if (event.accelerationX > platform.x) { //Keep the paddle on stage platform.x = 0; } if (event.accelerationX > stage.stageWidth - platform.x) { platform.x = stage.stageWidth; } } function bounce(evt:Event) { ball.x += dx; ball.y += dy; myText.text = ("Your Score:" + score); if (ball.hitTestObject(platform)) { var ballPosition:Number = ball.x - platform.x; var hitPercent:Number = (ballPosition / (platform.width - ball.width)) - .5; dx = hitPercent * 10; dy *= -1; score++; } if(ball.x = stage.stageWidth-ball.width){ dx*= -1; } if(dy>=20) { dy = max; } if (ball.hitTestObject(top)) { dy *= -1; dy += 0.2; } trace(dx) } function die(evt:Event):void { if (ball.hitTestObject(death)) { ball.x = 100; ball.y = 0; dx=0; vita--; myText1.text = "Lifes:" + vita; if (vita
Fixing a 2007 error for an array not populating correctly: null   (103 Views)
Thank you for your suggestion. Tried it, and it works! Kind
Error #2007: Parameter child must be non-null.   (66 Views)
I am still a newbie at actionscript class. I have no idea on what's the error. If you can please help me that would be thankful. The error says: TypeError: Error #2007: Parameter child must be non-null. at flash.display: : DisplayObjectContainer/addChild() at Movement/init() ActionScript Code: package { import flash.display.MovieClip; import; import import Input; public class Movement extends MovieClip { public var square:MovieClip; public var start_btn:MovieClip private var _max:Number = 10; private var dx:Number = 0; private var dy:Number = 0; public function Movement():void { this.stop(); addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event):void { removeEventListener(Event.ADDED_TO_STAGE, init); //adding Childs addChild(square); addChild(start_btn); //Initialize the Class with handler on stage Input.initialize(stage); //Add Events Listeners addEventListener(Event.ENTER_FRAME, refresh); start_btn.addEventListener(MouseEvent.CLICK, startingGame); } private function refresh(e:Event):void { //Key Handler if (Input.kd("A", "LEFT")) { dx = dx < 1 - _max _max * -1 : dx - 1; } if (Input.kd("D", "RIGHT")) { dx = dx > _max - 1 _max : dx + 1; } if (!Input.kd("A", "LEFT", "D", "RIGHT")) { if (dx > 1) { dx = dx < 1 0 : dx - 1; } else { dx = dx > -1 0 : dx + 1; } } if (Input.kd("W", "UP")) { dy = dy < 1 - _max _max * -1 : dy - 1; } if (Input.kd("S", "DOWN")) { dy = dy > _max - 1 _max : dy + 1; } if (!Input.kd("W", "UP", "S", "DOWN")) { if (dy > 1) { dy = dy < 1 0 : dy - 1; } else { dy = dy > -1 0 : dy + 1; } } //Margin detection if (square.x - dx < -dx || square.x + dx + square.width > stage.stageWidth) { //x axis detection square.x = square.x - dx < -dx 0 : stage.stageWidth - square.width; dx *= -1; } if (square.y - dy < -dy || square.y + dy + square.height > stage.stageHeight) { //y axis detection square.y = square.y - dy < -dy 0 : stage.stageHeight - square.height; dy *= -1; } //Apply the dynamic variables square.x += dx; square.y += dy; } public function startingGame(e:MouseEvent):void { gotoAndStop(2); } } }
Error #2007: Parameter hitTestObject must be non-null   (64 Views)
, this is my first time here so please be gentle. I've been given an assignment to recreate a Mario game. Currently I am trying to figure out collision data with blocks and enemies. I was making good progress on it until I came about this error: TypeError: Error #2007: Parameter hitTestObject must be non-null. at flash.display:: DisplayObject/_hitTest() at flash.display:: DisplayObject/hitTestObject() at Main/onEnterFrame() Tracing back, I found this: Value of _bricks[0] == [object Brick] Value of _bricks[0] == [object Brick] Value of _bricks[0] == [object Brick] Value of _bricks[1] == [object Brick] Value of _bricks[1] == [object Brick] Value of _bricks[1] == [object Brick] Value of _bricks[2] == [object Brick] Value of _bricks[2] == [object Brick] Value of _bricks[2] == [object Brick] Value of _bricks[3] == [object Brick] Value of _bricks[3] == [object Brick] Value of _bricks[3] == [object Brick] Value of _bricks[4] == [object Brick] Value of _bricks[4] == [object Brick] Value of _bricks[4] == [object Brick] Value of _bricks[5] == [object Brick] Value of _bricks[5] == [object Brick] Value of _bricks[5] == [object Brick] Value of _bricks[6] == [object Brick] Value of _bricks[6] == [object Brick] Value of _bricks[6] == [object Brick] Value of _bricks[7] == [object Brick] Value of _bricks[7] == [object Brick] Value of _bricks[7] == [object Brick] Value of _bricks[8] == [object Brick] Value of _bricks[8] == [object Brick] Value of _bricks[8] == [object Brick] Value of _bricks[9] == [object Brick] Value of _bricks[9] == [object Brick] Value of _bricks[9] == [object Brick] Value of _bricks[10] == undefined In order to solve the hitTestObject problem, I have been trying to figure out what this hidden 11th object is that is undefined, but I simply cannot do it. If it is obvious in others' eyes, it isn't in mine. Here is the code for my below: ActionScript Code: package { import flash.display.MovieClip; import; import flash.ui.Keyboard; import; public class Main extends MovieClip { private var _bricks:Array; private var _goombas:Array; private var _jumpHigher:Boolean; public function Main() { init(); } function init():void { _bricks = new Array(); _bricks = [brick0,brick1,brick2,brick3,brick4,brick5,brick6,brick7,brick8,brick9]; _goombas = new Array(); _goombas = [goomba0,goomba1,goomba2]; } function onEnterFrame(event:Event):void { for (var j:int = 0; j
TypeError: Error #2007: Parameter hitTestObject must be non-null.   (74 Views)
I've been trying to figure this out for some time now, I have this flash game I'm trying to make, nothing special, apples are falling from trees and I made a object to catch them, etc, etc. When I made the game it ran fine, up until the point where I added Scnes to my flash. I made a title scene and game scene, and was going to make a game over, win/lose screen. But the button on my TitleScene as soon as it's clicked it gives me this error: TypeError: Error #2007: Parameter hitTestObject must be non-null. I'm sure it has to do with the code on the GameScene but I couldn't pinpoint it. Any help would be appreciated Below is my code for the Title Page: stop(); start_btn.addEventListener(MouseEvent.CLICK, startGame); function startGame(event:MouseEvent):void { gotoAndPlay("GameStart", "Game"); } And Below is the code for the GameScene I'm trying to access: var fruitArray:Array = new Array(Apple1,Apple2,Apple3,Apple4,Apple5,Apple6); var fruitsOnstage:Array = new Array(); var fruitsCollected:int = 0; var fruitsLost:int = 0; for (var i:int = 0; i -1; i--) { var currentFruit:MovieClip = fruitsOnstage[i]; currentFruit.y += currentFruit.speed; if (currentFruit.y > stage.stageHeight - currentFruit.height) { currentFruit.y = 0 - currentFruit.height; fruitsLost++; field2_txt.text = "Total Fruit Lost: " + fruitsLost; } if (currentFruit.hitTestObject(basket_mc)) { fruitsCollected++; removeChild(currentFruit); fruitsOnstage.splice(i,1); field1_txt.text = "Total Fruit Collected: " + fruitsCollected; } } if (fruitsOnstage.length = 20) { basket_mc.gotoAndStop(20); } else if (fruitsCollected > 15) { basket_mc.gotoAndStop(15); } else if (fruitsCollected>10) { basket_mc.gotoAndStop(10); } else if (fruitsCollected>5) { basket_mc.gotoAndStop(5); } } if (fruitsLost >= 20) { field1_txt.text = "Too bad Sugar cube, that's not enough."; field2_txt.text = ""; stage.removeEventListener(Event.ENTER_FRAME, catchFruit); for (var j:int = fruitsOnstage.length-1; j > -1; j--) { currentFruit = fruitsOnstage[j]; removeChild(currentFruit); fruitsOnstage.splice(j,1); } } }
removeChild error 2007   (93 Views)
First off I'd like to say I did a search on this and although there are many subjects on the matter, none really apply to mine. My problem is this: There is an enemy on the stage(enemyTwo) in which I remove if its health meter gets below a certain point. You lower the enemy's health by hitting it with little daggers that you throw. Everything works fine up to a point, the health bar slowly goes down and the enemy even seems to disappear when the removeChild/enemyTwo = null directives are called, however, there seems to be a small window of time where the daggers will hit an invisible version of the enemy which in turn gives me the "Error #2007: Parameter hitTestObject must be non-null" error which in turn causes other things to go awry or Id just ignore it =). ActionScript Code: public function checkCollisionWithEnemies(bullet:MovieClip) { if(enemyTwo != null) { if(enemyTwo.hitTestObject(bullet)) { enemyTwo.subObject.meter.width -= 10; removeChild(bullet); if(enemyTwo.subObject.meter.width < 3) { enemyTwo.stop(); removeChild(enemyTwo); enemyTwo = null; } } } } ActionScript Code: private function onEnter(evt:Event):void { y -= 10; rotation += 20; MovieClip(parent).checkCollisionWithEnemies(this); } Any insight would be appreciated.
Flash Error #2007: Parameter text must be non-null.   (78 Views)
, My .swf file show the following error TypeError: Error #2007: Parameter text must be non-null. at flash.text::TextField/set text() at Xml/xmlDone()[C:\Users\TaiLT01319\Desktop\xml\] at Xml/onStopWatch()[C:\Users\TaiLT01319\Desktop\xml\] at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick() And this here is as3 code: Code: package { import flash.display.*; import*; import; import; import flash.xml.XMLDocument; import fl.transitions.Tween; import fl.transitions.easing.*; import flash.utils.Timer; public class Xml extends MovieClip { private var myXML:XML = new XML(); private var XML_URL:String = "flash_game.xml"; private var mangThuTu:Array = new Array(); private var mangChu:Array = new Array(); private var myXMLURL:URLRequest = new URLRequest(XML_URL); private var myLoader:URLLoader = new URLLoader(myXMLURL); private var _timer:Timer; private var timeAuto = 5000; public function Xml() { // constructor code myLoader.addEventListener("complete", xmlLoaded); } private var khungChu:Array = new Array(); private var myTween:Array = new Array(); public function xmlLoaded(event:Event) { myXML = XML(; var xmlDoc:XMLDocument = new XMLDocument(); xmlDoc.ignoreWhite = true; var menuXML:XML = XML(; xmlDoc.parseXML(menuXML.toXMLString()); for each (var Data:XML in myXML..Data) { var ID:String = Data.ID.toString(); var Alphabet:String = Data.Alphabet.toString(); mangThuTu.push(ID); mangChu.push(Alphabet); } xmlDone(); } public function xmlDone() { for (var i = 0; i
TypeError: Error #2007: parameter must be not null ...   (80 Views)
I have an object and thtrows me an error when click the object by a second time... TypeError: Error #2007: El valor del parmetro child debe ser distinto de null. at flash.display:isplayObjectContainer/removeChild() at Tab1/changeStateTab() PHP Code: importflash.display.Shape;importFichaTecnica.Estruct.*;vartabMenu:Shape;varitmSelected:int;varsXML:XML;functionchangeStateTab(e:MouseEvent):void{ varcont:uint=0; if(this.getChildByName("tabmenu")==null){ this.addChild(tabMenu); this.setChildIndex(tabMenu,8); //generateLabels(); } else{ tabMenu=Shape(this.getChildByName("tabmenu")); //this.removeChild(tabMenu); if(this.getChildByName("tabLink")==null) this.removeChild(this.getChildByName("tabLink")); }}functionsetPage(e:MouseEvent):void{ itmSelected=-1; if(e.currentTarget!=null){ this.tabTitle.text=e.currentTarget.text; itmSelected=this.getChildIndex(this.getChildByName(; updateFields(e.currentTarget.text); setVisible(true); changeStateTab(e); }}functionRenderLabel(sText:String,idx:uint):void{ varlabelz:TextField; labelz=newTextField(); labelz.autoSize=TextFieldAutoSize.LEFT; labelz.background=false; labelz.border=false; varformat:TextFormat=newTextFormat(); format.font="Verdana"; format.color=0x0000FF; format.size=12; format.underline=true;"tabLink"; labelz.defaultTextFormat=format; labelz.text=sText; labelz.x=-122.0; labelz.y=-118.0+(idx*18.0); labelz.height=18.5; labelz.width=104.0; addChild(labelz); setChildIndex(labelz,this.numChildren-1); labelz.addEventListener(MouseEvent.CLICK,setPage);}functionCreateLabels(oFicha:FichaTec):void{ varcont:uint; varstrLabel:String=""; for(cont=0;cont
External image loading & showing; Error #2007   (74 Views)
! Just joined kirupaForum and I'm in aid of some help here... I'm currently working on a game and I'm trying to work out a way to load images externally and display them on the screen. But the problem is it won't load them correctly and display them, as seen below... ERROR: Code: TypeError: Error #2007: Parameter child must be non-null. at flash.display::DisplayObjectContainer/addChild() at main_fla::MainTimeline/frame2() at flash.display::MovieClip/gotoAndStop() at main_fla::MainTimeline/loaded() at at at And my code (first frame): Code: stop(); // Loader - Graphics \\ var gfx_load:URLLoader = new URLLoader(); var gfx_req:URLRequest = new URLRequest("gfx/ind.x"); var weapons:Array = new Array(), bodies:Array = new Array(), env:Array = new Array(); gfx_load.load(gfx_req); gfx_load.addEventListener(Event.COMPLETE, loaded); var contentLoad = 0; addEventListener(Event.ENTER_FRAME, main); function loaded(event:Event):void { var preArr:Array ="*"); var count = preArr[0].split(";").length; var gfxArr:Array = new Array(preArr[0].split(";"), preArr[1].split(";"), preArr[2].split(";")); for(var i=0;i
navigation buttons: Error #2007:   (69 Views)
Hi ,i tried to make this code for my image gallery. on the stage i have two two navigation buttons next_btn,prev_btn. and a set of 5 buttons (one for each image in the array , so i can jump directly on the image i want). the problem is when i click the next button to go over the last image in "images_array" i receive the error TypeError: Error #2007: Parameter url must be non-null. the same when i click prev button to go before the first image in the array where-s the problem thanks! here is the code: next_btn.addEventListener(MouseEvent.CLICK,nextCli cked); prev_btn.addEventListener(MouseEvent.CLICK,prevCli cked); function nextClicked(event:MouseEvent):void { showPicture(currentImage + 1); } function prevClicked(event:MouseEvent):void { showPicture(currentImage - 1); } function showPicture(reference:Number):void { var urlRequest:URLRequest=new URLRequest(images_array[reference]); loader.load(urlRequest); container.addChild(loader); currentImage = reference; if (reference < 0) reference = images_array.length - 1; else if (reference >= images_array.length) reference = 0; }
TypeError: Error #2007: Parameter type must be non-null.   (94 Views)
It's monday morning and somehow my brain won't comprehend why this error is happening...... could anyone take a look and shed some light on this please TypeError: Error #2007: Parameter type must be non-null. at at pages::MyProfile/initListeners() at pages::MyProfile() here is my code ActionScript Code: package business.types { import; /** * @author Erik */ public class ServerConnectionEvent extends Event { public static const AUTHENTICATION_BY_ACCOUNT_COMPLETE : String = "authentication_by_account_complete"; public static const AUTHENTICATION_BY_ACCOUNT_FAIL : String = "authentication_by_account_fail"; public static const AUTHENTICATION_BY_COOKIE_COMPLETE : String = "authentication_by_cookie_complete"; public static const AUTHENTICATION_BY_COOKIE_FAIL : String = "authentication_by_cookie_fail"; public static const LOGOUT_COMPLETE : String = "logout_complete"; public static const LOGOUT_FAIL : String = "logout_fail"; public static const REGISTRATION_COMPLETE : String = "registration_complete"; public static const REGISTRATION_FAIL : String = "registration_fail"; public static const PROFILE_RETRIEVE_COMPLETE : String = "profile_retrieve_complete"; public static const PROFILE_RETRIEVE_FAIL : String = "profile_retrieve_fail"; public var isSuccess : Boolean; public var data : Object; public function ServerConnectionEvent ( type : String, isSuccess : Boolean = true, data : Object = null ) { super( type ); this.isSuccess = isSuccess; = data; } } } This is the other class, which is using this custom Event: ActionScript Code: private function onGetProfileComplete ( lObj : Object ) : void { trace( "business.ServerConnection.onGetProfileComplet e(" + [ lObj ] + ")" ); dispatchEvent( new ServerConnectionEvent( ServerConnectionEvent.PROFILE_RETRIEVE_COMPLETE, true , lObj ) ); } And this is the method where the error is thrown: ActionScript Code: private function initListeners () : void { trace( "pages.MyProfile.initListeners(" + [] + ")" ); ServerConnection.getInstance( ).addEventListener( ServerConnectionEvent.PROFILE_RETRIEVE_COMPLETE , onProfileDownloadComplete ); ServerConnection.getInstance( ).addEventListener( ServerConnectionEvent.PROFILE_RETRIEVE_FAIL , onProfileDownloadFail ); } private function onProfileDownloadComplete ( pEvt : ServerConnectionEvent ) : void { trace( "pages.MyProfile.onProfileDownloadComplete(" + [ pEvt ] + ")" ); var lData : Object =; } private function onProfileDownloadFail ( pEvt : ServerConnectionEvent ) : void { trace( "pages.MyProfile.onProfileDownloadFail(" + [] + ")" ); }
TypeError: Error #2007: Parameter text must be non-null. AS3 and PHP   (117 Views)
, Im very new to flash and im trying to send a contact form. Ive modified a template that was working originally... using flash cs4, actionscript 3 and php This is the error I'm getting Code: TypeError: Error #2007: Parameter text must be non-null. at flash.text::TextField/set text() at moviebak_fla::contactus_12/completeHandler() at at at Thisis the AS3 Code: // Set text formatting colors for errors, waiting..., and success mechanisms var errorsFormat:TextFormat = new TextFormat(); errorsFormat.color = 0xFF0000; var waitingFormat:TextFormat = new TextFormat(); waitingFormat.color = 0x339900; var successFormat:TextFormat = new TextFormat(); successFormat.color = 0x3366FF; // hide the little processing movieclip processing_mc.visible = false; // Assign a variable name for our URLVariables object var variables:URLVariables = new URLVariables(); // Build the varSend variable var varSend:URLRequest = new URLRequest(""); varSend.method = URLRequestMethod.POST; = 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 theName.text = ""; theEmail.text = ""; theHome.text = ""; theCity.text = ""; theState.text = ""; theZip.text = ""; thePhone.text = ""; theSubject.text = ""; theMessage.text = ""; // Load the response from the PHP file status_txt.text =; status_txt.setTextFormat(successFormat); } // Add an event listener for the submit button and what function to run submit_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(!theName.length) { status_txt.text = "Please enter your name."; status_txt.setTextFormat(errorsFormat); } else if(!theEmail.length) { status_txt.text = "Please enter an email address"; status_txt.setTextFormat(errorsFormat); } else if(!validateEmail(theEmail.text)) { status_txt.text = "Please enter a VALID email address"; status_txt.setTextFormat(errorsFormat); } else if(!theMessage.length) { status_txt.text = "Please enter a message."; status_txt.setTextFormat(errorsFormat); } else { // is good so send the message to the parse file // Show the little "processing_mc" movieclip processing_mc.visible = true; // Ready the variables for sending variables.userName = theName.text; variables.userEmail = theEmail.text; variables.userHome = theHome.text; variables.userCity = theCity.text; variables.userState = theState.text; variables.userZip = theZip.text; variables.userPhone = thePhone.text; variables.userSubject = theSubject; variables.userMessage = theMessage.text; // Send the data to the php file varLoader.load(varSend); // Put a temporary message in the response field while the PHP file sends back // If the code does not connect to the PHP file this message will remain visible to user status_txt.text = "Waiting for server connection..."; status_txt.setTextFormat(waitingFormat); } // close else after form validation } // Close ValidateAndSend function ////////////////////////////////////////////////////////////// // Validate email function function validateEmail(str:String):Boolean { var pattern:RegExp = /(\w|[_.\-])+@((\w|-)+\.)+\w{2,4}+/; var result:Object = pattern.exec(str); if(result == null) { return false; } return true; } //////////////////////////////////// and my php.. PHP Code: as i said im very new so please excuse me if ive left anything important out...
Error #2007: Parameter text must be non-null   (186 Views)
this may be somehow a common error, but I couldn't track down where is the problem. I'm getting the following error trying to use a code to randomly pick a quote from a xml file. The flash/code works fine, however in IE eventually the error shows up which is really annoying. In Firefox it seems like everything is working fine. The error is: TypeError: Error #2007: Parameter text must be non-null. at flash.text::TextField/set text() at quotes_fla::MainTimeline/rotateQuote() at flash.utils::Timer/flash.utils:Timer::_timerDispatch() at flash.utils::Timer/flash.utils:Timer::tick() Code: import caurina.transitions.Tweener; var quote:Array = new Array(); var totalQuotes:Number; quoteMC.alpha = 0; var rotateTimer:Timer = new Timer(5000, 100);//rotates the quote every 2 seconds for 100 times rotateTimer.addEventListener("timer", rotateQuote);//add a listener to the timer rotateTimer.start();// start the timer function init():void { var quotesXML:XML = new XML(); quotesXML.ignoreWhitespace = true; var XMLURL:URLRequest = new URLRequest("flash/quotes1.xml"); var myLoader:URLLoader = new URLLoader(XMLURL); myLoader.addEventListener("complete", xmlLoaded); function xmlLoaded(event:Event):void { quotesXML = XML(; totalQuotes = quotesXML.quote.length(); for (var i:int = 0; i < quotesXML.quote.length(); i++) { quote[i] = quotesXML.quote[i].text; } var initRandom:Number = randomNumber(0, totalQuotes); Tweener.addTween(quoteMC, {alpha:1, time:5}); quoteMC.quote_txt.text = String(quote[initRandom]); } } function rotateQuote(evt:TimerEvent) { quoteMC.alpha = 0; Tweener.addTween(quoteMC, {alpha:1, time:5}); quoteMC.quote_txt.text = ""; var randomness:Number = randomNumber(0, totalQuotes); quoteMC.quote_txt.text = quote[randomness]; } function randomNumber(low:Number, high:Number):Number { var low:Number = low; var high:Number = high; return Math.round(Math.random() * high - low) + low; } init(); I'm totally new at as3 so any help will be welcome.
2007, 2044 Flash Errors on Localhost   (43 Views)
I'm getting errors that seem to be security related on developphp's source files when running on localhost. No problems appears when it's running on ********** (free webhosting with php). The zip file is at I'm using AS3 on Flash CS4 and XAMPP with Apache and MySQL running. On localhost, I get this type of error: TypeError: Error #2007: Parameter text must be non-null. at flash.text::TextField/set text() at index_fla::contact_30/completeHandler() at at at On and I get the following: Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: cannot load data from http://localhost/contact_parse.php. at index_fla::contact_30/frame1() at flash.display::MovieClip/nextFrame() at index_fla::MainTimeline/updatePreloader() On file///C://xampp/htdocs/test/index.html I get this error: Adobe Flash Player has stopped a potentially unsafe operation The following local application on your computer or network C://xampp/htdocs/test/test.swf is trying to communicate with this Internet-enabled location: localhost So I enable the global security to trust the said file but it's still the same even with a browser restart. With the file working on a different webhost, I'm guessing that localhost has some security issues that I can't seem to fix. And yes. I googled it for 3 days non-stop already without anything substantial. Help.
TypeError: Error #2007, removing child, and addChild Problems.   (94 Views)
"TypeError: Error #2007: Parameter child must be non-null. at flash.display:isplayObjectContainer/addChild() at newLFXsite_fla::MainTimeline/onClick()" so i get this error every time i click on the about page after the homepage appears on screen, from what i know im doing everything right, but i guess theres something wrong that i cant see. Code: import fl.transitions.Tween; import fl.transitions.easing.*; var currentPage:MovieClip = home_mc; var homePage:pageHome = new pageHome(); var aboutPage:pageAbout = new pageAbout(); home_mc.targetMC = homePage; about_mc.targetMC = aboutPage; homePage.x = aboutPage.x = -9.1; homePage.y = aboutPage.y = 340.6; addChild(homePage); underline_mc.x = home_mc.x home_mc.addEventListener(MouseEvent.ROLL_OVER , moveUnderline); about_mc.addEventListener(MouseEvent.ROLL_OVER , moveUnderline); home_mc.addEventListener(MouseEvent.ROLL_OUT , moveUnderlineBack); about_mc.addEventListener(MouseEvent.ROLL_OUT , moveUnderlineBack); home_mc.addEventListener(MouseEvent.CLICK, onClick); about_mc.addEventListener(MouseEvent.CLICK, onClick); home_mc.buttonMode = true; about_mc.buttonMode = true; function moveUnderline(e:MouseEvent):void { new Tween(underline_mc,"x",Strong.easeOut,underline_mc.x,e.currentTarget.x,25,false); } function moveUnderlineBack(e:MouseEvent):void { new Tween(underline_mc,"x",Strong.easeOut,e.currentTarget.x,currentPage.x,25,false); } function onClick(e:MouseEvent):void { removeChild(currentPage.targetMC); currentPage = MovieClip(e.currentTarget); addChild(currentPage.tagetMC); currentPage.targetMC.gotoAndPlay(1); }
file upload error   (173 Views)
I am trying to upload a file on server using File class. Its working fine on local machine. But when i a placing the php file on server, it is giving Error #2038: File I/O Error. Code: var uploadFile:File = new File("file:///" + this.uploadFileArray[this.count]); uploadFile.upload(new URLRequest(this.imageUpload_serverPath)); uploadFile.addEventListener(Event.COMPLETE, onFileUploaded); uploadFile.addEventListener(IOErrorEvent.IO_ERROR, onErrorrr); uploadFile.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, onFileUploadComplete); PHP Code Code: I have placed cross domain.xml on server also. Please help.
1120 error need help   (300 Views)
So I'm really a noob and haven't really used flash since 2008 but I'm working with someone who insisted to use flash. Its a nightmare for me and this forum is my only hope. So originally I was only getting one error when I tested the file, and that was that I was missing a right brace, once I inserted the brace and tested the file again I got a whopping 39 errors. Every error is 1120 Access of unidefined property ----------------------------------------------- Here is the Actionscript: colombian.buttonMode = true; microwave.buttonMode = true; empire.buttonMode = true; junta.buttonMode = true; youth.buttonMode = true; illumination.buttonMode = true; m19.buttonMode = true; animal.buttonMode = true; commanche.buttonMode = true; familia.buttonMode = true; //If XML File Load successfully, it will be voided this actions: XMLLoader.addEventListener(Event.COMPLETE, success); function success(e:Event):void { xml=new XML(;;//For adding a new song in XML File. MusicLoading=new URLRequest(songlist[0].file); music.load(MusicLoading);; MusicName.text=songlist[0].name; sc.addEventListener(Event.SOUND_COMPLETE, nextSong); } //The Name of the XML File. XMLLoader.load(new URLRequest("playlist.xml")); //Add Event Listeners for control buttons PauseBtn.addEventListener(MouseEvent.CLICK,pauseSo ng); PlayBtn.addEventListener(MouseEvent.CLICK,playSong ); NextBtn.addEventListener(MouseEvent.CLICK, nextSong); PrevBtn.addEventListener(MouseEvent.CLICK, prevSong); itunes.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage); function fl_ClickToGoToWebPage(event:MouseEvent):void { navigateToURL(new URLRequest(""), "_blank"); } //Prev Song Functions function prevSong(e:Event):void { if (currentIndex>0) { currentIndex--; } else { currentIndex=songlist.length()-1;//Prev Song(-1) } var prevSongFunc:URLRequest=new URLRequest(songlist[currentIndex].file); var prevTitle:Sound=new Sound(prevSongFunc); sc.stop(); MusicName.text=songlist[currentIndex].name;;//Writing Prev Song's name currentSound=prevTitle; sc.addEventListener(Event.SOUND_COMPLETE, nextSong); //Pause The Song (sc.stop) function pauseSong(e:Event):void { CurrentPos=sc.position; sc.stop(); } //Play The Song function playSong(e:Event):void {; } } ----------------------------------------------- For the love of god, what am I doing wrong
Can't find error even after Debugging   (177 Views)
... I have a problem when a button makes the movie go to a labeled section... I receive this error: Attempting to launch and connect to Player using URL D:\Gaea Animation Studios Web\FLA\home.swf [SWF] D:\Gaea Animation Studios Web\FLA\home.swf - 100450 bytes after decompression TypeError: Error #1009: Cannot access a property or method of a null object reference. at home_fla::MainTimeline/frame30()[home_fla.MainTimeline::frame30:59] at flash.display::Sprite/constructChildren() at flash.display::Sprite() at flash.display::MovieClip() at home_fla::MovieClip_MainMenu_4() at flash.display::MovieClip/gotoAndStop() at home_fla::MainTimeline/studioClick()[home_fla.MainTimeline::frame1:166] Debug session terminated. And still cant find what is wrong... this is the code for the frame 30... could somebody help me out and see what's going on and what im missing! plss!! //************************************************** ************************************************** ********************// // Home Button // mc_mainmenu.btn_home.addEventListener(MouseEvent.C LICK, Studio_to_HomeClick); function Studio_to_HomeClick(event:MouseEvent):void { gotoAndStop("Home"); } //************************************************** ************************************************** ********************// // Studio Button // mc_mainmenu.btn_studio.addEventListener(MouseEvent .CLICK, Studio_to_StudioClick); function Studio_to_StudioClick(event:MouseEvent):void { trace("You still are in the Studio Section"); } //************************************************** ************************************************** ********************// // Contact Button // mc_mainmenu.btn_contact.addEventListener(MouseEven t.CLICK, Studio_to_ContactClick); function Studio_to_ContactClick(event:MouseEvent):void { trace("Contact Click"); } //************************************************** ************************************************** ********************// // Download Button // mc_mainmenu.btn_download.addEventListener(MouseEve nt.CLICK, Studio_to_DownloadClick); function Studio_to_DownloadClick(event:MouseEvent):void { trace("Download Click"); }
Any way to log AS3 errors when running in browser?   (180 Views)
I'm having a problem where a Flash project hangs when I run it in my browser, but not when I run it locally. That made me wonder if there's some program or service that enables AS3 developers to see AS3 errors encountered by their users - errors that cause the Flash file to crash, for example. I'm talking about what you'd normally see in the console in Flash Professional; can this be written to a file or displayed to the developer in some way