SEARCH YOUR SOLUTION HERE  

Error #1009

I am new to flash. I am experiencing random (at least to me) errors (#1009) while navigating through my tested file. I can't reproduce them everytime. It only happens sometimes. Usually they occur after I have clicked back and forth between different pages (frames). Sometimes the error shows up once, and the file moves on as if nothing bad has happened. Sometimes the error continuosly displays, which really slows down the test.
One example of such:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at About28_fla::MainTimeline/clickResumeFromAbout() The general structure of my file is this:
I have pages laid out on separate frames with movieclips embedded within each other on the frames. Navigational movieclip buttons remain on essentially every frame. Three of them are: 'About', 'Contact', and 'Resume'. I wrote Listeners for each frame that go from that frame to any of the others. For example, to get from my 'Resume' frame from the 'About' frame, I wrote a Listener called 'clickResumeFromAbout', which is what the above error refers to.
The code in context:
Code: mResumeGlow.addEventListener(MouseEvent.CLICK, clickResumeFromAbout); function clickResumeFromAbout(e:MouseEvent):void { mBoxAbout.gotoAndPlay(mBoxAbout.totalFrames-mBoxAbout.currentFrame); mBoxAbout.addEventListener(Event.ENTER_FRAME, enterResume); function enterResume(event:Event):void { if (mBoxAbout.currentFrame == 150){ mBoxAbout.stop(); mBoxAbout.removeEventListener(Event.ENTER_FRAME, enterResume); gotoAndStop("Resume"); } } } However, the error above occurs when I click 'Resume' from 'Contact' (not from 'About' as the error states). It only occurs after I've been flipping between frames for a bit (I'm assuming I've clicked 'About' at some point).
I can't figure out if I'm referencing something at the wrong time or what. Any ideas

Posted On: Thursday 25th of October 2012 10:28:35 PM Total Views:  375
View Complete with Replies




Related Messages:

AIR Unload SWF error   (267 Views)
I'm writing an Android app and I have a loader that brings in an external swf. I want to create an event so that when the back button is pressed it unloads the swf. But I can's seem to get it to work. Any ideas Code: private function jumptest (event:TouchEvent):void{ var infoloader:Loader = new Loader(); var infoURL:URLRequest=new URLRequest("MapInspectorGW.swf"); infoloader.contentLoaderInfo.addEventListener(Event.COMPLETE, infoDone); infoloader.load(infoURL); NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, infoBack); } private function infoDone (loadEvent:Event) { addChild(loadEvent.currentTarget.content); } private function infoBack (event:KeyboardEvent):void { if (event.keyCode == Keyboard.BACK) { infoloader.unload(); } }
URLLoader() ioError and Stream error on first call...   (176 Views)
When my PNG encoded data is sent to my uploader php file its throwing an error the very first time and only after I havent done it in a while... half an hour maybe... it says this: Code: Error opening URL 'http://apps.mydomain.com/jpg_encoder_download.phpname=mytest10.png' Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://apps.mydomain.com/jpg_encoder_download.phpname=mytest10.png Then when I press the button a second time it goes through fine. If I close and re-test the movie its fine ... the only way to reproduce it is to wait a while and try it for the first time. Any clues whats causing this
How to terminate a Flash application upon unforeseen errors?   (198 Views)
How to terminate a Flash application upon unforeseen errors Dear all, I am writing up an app that must not be allowed to shut down the users system under any circumstances, thus I need to learn how I can terminate my app. What tools are there to do this So, Is there a basic way to have a global error sniff that somehow determines that the app needs to be terminated and thus prevents affecting other processes that are running PLS advice Jaxz
error when live, local fine. urgent   (170 Views)
hi , I've got an AS3 FP10 project compiling in FlashBuilder4. It's an Away3D project absed around a *.dae file. It runs perfectly locally in the release/debug roots and runs fine if I move the release to a network drive etc but when I upload all the release files I get this error: Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://mywebsite.com/assets/maya/world.dae at com.li.msac.loading::ColladaDataLoader/loadAndParseCollada() I'm assuming this means that the *.dae file cannot me found, but it does exist at the specified location 'assets/maya/world.dae' help... please... Rich
cs5, fp9. Vector3d and Matrix3d error   (285 Views)
Hi! I've made a form with TLFTextfield but now I've been told flash player version has to be 10.1.22 tops. So, as I'm using CS5 and I don't know how to roll back de publisher version I've tried to compile it in fp9. This causes TLFTextfields to go back to classic Textfields, no big problem. But as I compile I get: 1046: Type was not found or was not a compile-time constant: Matrix3D. 1046: Type was not found or was not a compile-time constant: Vector3D. The funny thing is I don't explicitely use any of these classes and I don't know where does this come from. I use comboboxes, inputs, checkboxes, buttons and some movieclips. It would help if someone knew how to get rid of these errors or, even better, how to compile with an older subversion of fp10
Timer error :(   (251 Views)
i made timer for my game, and code is var countDownIncLvl2:Number=1; var totalSecsLvl2 = 60; var countDownSecsLvl2 = totalSecsLvl2; counterLvl2.text=countDownSecsLvl2; var timeLvl2:Timer = new Timer(countDownIncLvl2*1000); time.addEventListener(TimerEvent.TIMER,tickLvl2); function tickLvl2(e:TimerEvent):void { if (countDownSecsLvl2 == 0){ trace("count down complete"); time.stop(); countDownSecsLvl2 = totalSecsLvl2;gotoAndPlay(1);} else { countDownSecsLvl2= countDownSecsLvl2-countDownIncLvl2; counterLvl2.text=countDownSecsLvl2; } } if(time.running == true) { trace("alredy running"); } else { counterLvl2.text=totalSecsLvl2; time.start(); } but it keeps showing me error in output as: TypeError: Error #1009: Cannot access a property or method of a null object reference. at proba1_fla::MainTimeline/tickLvl2() at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick() please somebody help
error: 1010 help   (262 Views)
Hi all, I have one of those pesky TypeError: Error #1010: A term is undefined and has no properties - errors... I know what 2 lines are causing it, but the lines from what i can tell are coded properly... First, I set a variable to a string inside of a for loop Code: var buttonName:String = "btn"+i; then later, i basically call each button and position it like so: Code: mc_name.otherMc_name[buttonName].x = 15; mc_name.otherMc_name[buttonName].y = 1000; basically I'm targeting the instance name btn1, btn2, btn3 in the for loop and positioning them But the 2 lines above that use the square brackets are causing the error 1010 - if i swap out the string/instance name in [brackets] and hard code the actual button instance name like so: Code: mc_name.otherMc_name.btn1.x = 15; that particular button not only positions itself fine but the error goes away.. when i use the brackets everything works as it should, but i get the pesky error. Why would something that far as i can tell is coded correctly throw an error If it were looking for an instance name that didn't exist could that cause the issue (so in an array it starts counting from 0, and i have 20 buttons, so i should actually be counting to 19, not 20... and if the code is looking for the 20th button instance name could that cause the issue) any help is appreciated! just trying to be a clean coder here
help w/ error   (256 Views)
can someone explain this error to me Code: 1061: Call to a possibly undefined method getRealNum through a reference with static type exam:XaMLDiplomat. the code is here: Code: private function recordSelection(e:ResponseEvent):void { var qnum:Number = myDiplomat.getRealNum(currentQ); var resp:String = e.letter; var ans:String = myDiplomat.getAnswer(qnum); myRecords.newResponse(qnum, resp, ans); //trace("number:"+qnum+" response:"+resp+" ans:"+ans); mySkipper.setAnswered(currentQ); myTab.showProgress((mySkipper.answerCount())/(myDiplomat.getQCount())); } and specifically this line seems to be the culprit. Code: var qnum:Number = myDiplomat.getRealNum(currentQ);
Please help with my Text draw error.   (261 Views)
all, I have a bunch of text that I have drawn onto the screen via the draw function. I have the format of that text set via textFormat: Code: var myFormat:TextFormat = new TextFormat(); myFormat.size = 21; myFormat.font = "Arial"; mTextField.setTextFormat(myFormat); Now, the first time that this text draws itself, it works fine. But, when I try to update the htmltext in the textfield, it draws itself in a format that isn't the one I set. I'm certain that the textformat isn't changed by anything. I'm wondering if flash draws text in the last textFormat that is created, not as the textfield is set. Can anyone confirm this Or, could you provide any input
syntax error   (307 Views)
I have an old AS2 application that I am updating to AS3. When I run the application I get an error 1087: Syntax error: extra characters found after end of program. It refers to Frame 21, line 1 and the source sited in the compile out box window is: on (release) { But when I go to Frame 21, line 1, I don't see any on(release) functions if I search the action script for that frame there are no on (release) { functions. If I double click the error it usually takes me to the spot in the code where the error is located but it doesn't do that either. So what is this error telling me How do I find the on (release) { function it's complaining about
swf error only the first time   (151 Views)
I have a main.swf that contains 3 swfs (one.swf, two.swf, three.swf). If I go to three.swf , it gives an error (TypeError: Error #1009). However, if I go to two.swf and return to three.swf, it works. I don't know why Thank you
class error - must subclass   (156 Views)
I've made a movie clip with buttons in it called 'myContent'. I want each button to reference a different video in the video player on the main stage. This movie clip is linked to a scrollpane, since there is not enough real-estate. I right clicked on the myContent movie clip in the library and chose 'export for actionscript' under properties. then used the script: scrollPane.source=myContent; scrollPane.setSize(205, 500); to get the scroll bar to work. When I add the script in the myContent movie clip to reference the different videos I get a few errors: 1152: A conflict exists with inherited definition flash.displayisplayObject.name in namespace public. 5000: The class 'fl.controls.ScrollBar' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type. It seems I must tell the scroll bar to look in a subclass When I get rid of the script telling it to load the videos, the scroll bar works and I get no errors, but when I put in the script to load the videos, its a major malfunction. Any ideas would be much appreciated.
Loading External Swf error   (130 Views)
Basically I'm trying to load a swf into another swf. This is the code I'm using: Code: function startLoad() { var mLoader:Loader = new Loader(); var mRequest:URLRequest = new URLRequest("http://henshouse.com/Adrenaline.swf"); mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler); mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler); mLoader.load(mRequest); } function onCompleteHandler(loadEvent:Event) { addChild(loadEvent.currentTarget.content); } function onProgressHandler(mProgress:ProgressEvent) { var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal; percentText.text = String(Math.floor(percent*100)); trace(Math.floor(percent*100)); } startLoad(); It loads the swf properly, but at some point in the loaded swf, some functions are called, and a ton of errors are thrown at me. Code: *** Security Sandbox Violation *** SecurityDomain 'http://henshouse.com/Adrenaline.swf' tried to access incompatible context 'file:///C|/Documents%20and%20Settings/Henry%20Hauser/My%20Documents/HensHouse%20Files/Flash/Main.swf' SecurityError: Error #2070: Security sandbox violation: caller http://henshouse.com/Adrenaline.swf cannot access Stage owned by file:///C|/Documents%20and%20Settings/Henry%20Hauser/My%20Documents/HensHouse%20Files/Flash/Main.swf. at flash.display::Stage/flash.display:Stage::requireOwnerPermissions() at flash.display::Stage/addEventListener() at Control/::makeBegin() at Control/::makeShip() at Control/::gotoGame() I honestly have no idea what this error means and how to fix it.
Sending mail using AS 3.0 error.   (223 Views)
I made an email form and it sends data entered in the form as httpservice to the url where the php file is hosted which contains the mail() call. During testing and locally it gets sent to my email id. But when I embed it website it throws the following error. Code: [RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:220] at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:53] at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103] at DirectHTTPMessageResponder/securityErrorHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:389] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/redirectEvent() Why is it so. Is it some security sandbox something something.. (don't know much about that in detail). I'm trying to send the data to my gmail account. What should I do. I'm using Flex 3 (any way its not possible via Flash too) Instead of relying on server side script like php, can I directly send it to my gmail account (or any other possible mail account) using server sockets (binary). Can you please guide me. After a lot of googling I found that there must be some file that verifies some ports etc. If so how to setup Please help. Thank You.
SQL Row insertion error   (140 Views)
SQLite Row insertion error I use an AIR made program called sqliteadmin. I created a database called myDatabase.db Created a table like: CREATE TABLE cs (req TEXT, res TEXT); then trying to populate: INSERT INTO cs (req, res) VALUES('', 'Hi'); // Error # 3115when executing this query Any idea how to do it Please help. Thank You
where to add Event.ADDED_TO_STAGE with error #1009   (383 Views)
. I have an error code #1009 and have been googling around and found a lot of links, yet I'm not sure where to put the Event.ADDED_TO_STAGE to make my project work. The error code is Code: TypeError: Error #1009: Cannot access a property or method of a null object reference. at be.boulevart.google.ajaxapi.translation::GoogleTranslation/onResponse() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() and my as3 code is: Code: package{ import flash.display.*; import flash.events.*; import gs.*; import fl.motion.easing.*; import framework.utils.LoadXML; import be.boulevart.google.ajaxapi.translation.*; import be.boulevart.google.ajaxapi.*; import be.boulevart.google.ajaxapi.search.* import be.boulevart.google.apicore.GoogleApiKeyStore; import be.boulevart.google.events.*; public dynamic class wotd_widget extends MovieClip{ //vars var loadXML:LoadXML = new LoadXML('http://wordsmith.org/awad/rss1.xml',onComplete); private var mc01:MovieClip; private var mclayout:MovieClip; //constructor public function wotd_widget():void{ trace('wotd'); init_btn(); } private function onComplete($xml:XML):void{ trace($xml.channel.item[0].title); trace($xml.channel.item[0].description); wotd_In.text = $xml.channel.item[0].title; des_In.text = $xml.channel.item[0].description; var gt:GoogleTranslation = new GoogleTranslation(); gt.translate($xml.channel.item[0].title,'en','de'); gt.addEventListener(GoogleApiEvent.TRANSLATION_RESULT,onTranslate); } private function onTranslate(e:GoogleApiEvent):void{ trans_In.text = e.data.result; } private function init_btn():void{ this.mc01 = new trans_btn; this.mc01.x = 340.9; this.mc01.y = 234.4; addChild(this.mc01); TweenMax.to(this.mc01,1,{x:340.9, y:234.4, ease:Cubic.easeOut,onComplete:onComplete1}); } private function onComplete1():void{ this.mc01.buttonMode = true; this.mc01.addEventListener(MouseEvent.ROLL_OVER,mEvent01); this.mc01.addEventListener(MouseEvent.ROLL_OUT,mEvent01); this.mc01.addEventListener(MouseEvent.CLICK,mEvent01); } function mEvent01(e:MouseEvent):void{ switch(e.type){ case 'rollOver': //this executes when you rollover the target TweenMax.to(MovieClip(e.target),0,{tint:0xFF75B6}); break; case 'rollOut': //this executes when you rolloff the target TweenMax.to(MovieClip(e.target),0,{removeTint:true}); break; case 'click': //this executes when you click the target onClick01(); break; } } private function onClick01():void{ var gt:GoogleTranslation = new GoogleTranslation(); gt.translate(input_trans.text,'en','de'); gt.addEventListener(GoogleApiEvent.TRANSLATION_RESULT,onTranslation); } function onTranslation(e:GoogleApiEvent):void{ trace(e.data.to); trace(e.data.orig); trace(e.data.from); trace(e.data.result); output_trans.text = e.data.result; } } } NEED YOUR HELP REALLY REALLY FAST!
google translate and error code   (156 Views)
! I'm pretty new to AS3 and have a problem. I'm trying to build a WOTD (where the WOTD gets translated into German) widget and an extra add-on that is a input text translator. The WOTD part works fine but my translator isn't. I'm using a google translation api btw. At the moment when clicking on my translate button I get Error Code #1009: TypeError: Error #1009: Cannot access a property or method of a null object reference. at be.boulevart.google.ajaxapi.translation::GoogleTra nslation/onResponse() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() here's my code and I'd really appreciate any help! Code: package{ import flash.display.*; import flash.events.*; import gs.*; import fl.motion.easing.*; import framework.utils.LoadXML; import be.boulevart.google.ajaxapi.translation.*; import be.boulevart.google.ajaxapi.*; import be.boulevart.google.ajaxapi.search.* import be.boulevart.google.apicore.GoogleApiKeyStore; import be.boulevart.google.events.*; public dynamic class wotd_widget extends MovieClip{ //vars var loadXML:LoadXML = new LoadXML('http://wordsmith.org/awad/rss1.xml',onComplete); private var mc01:MovieClip; private var mclayout:MovieClip; //constructor public function wotd_widget():void{ trace('wotd'); init(); init_btn(); } private function onComplete($xml:XML):void{ //trace($xml); trace($xml.channel.item[0].title); trace($xml.channel.item[0].description); wotd_In.text = $xml.channel.item[0].title; des_In.text = $xml.channel.item[0].description; var gt:GoogleTranslation = new GoogleTranslation(); gt.translate($xml.channel.item[0].title,'en','de'); gt.addEventListener(GoogleApiEvent.TRANSLATION_RESULT,onTranslate); } private function onTranslate(e:GoogleApiEvent):void{ //trace(e.data.to); //trace(e.data.orig); //trace(e.data.from); //trace(e.data.result); trans_In.text = e.data.result; } private function init_btn():void{ this.mc01 = new trans_btn(); this.mc01.x = 340.9; this.mc01.y = 234.4; addChild(this.mc01); TweenMax.to(this.mc01,1,{x:340.9, y:234.4, ease:Cubic.easeOut,onComplete:onComplete1}); } private function onComplete1():void{ this.mc01.buttonMode = true; this.mc01.addEventListener(MouseEvent.ROLL_OVER,mEvent01); this.mc01.addEventListener(MouseEvent.ROLL_OUT,mEvent01); this.mc01.addEventListener(MouseEvent.CLICK,mEvent01); } function mEvent01(e:MouseEvent):void{ switch(e.type){ case 'rollOver': //this executes when you rollover the target TweenMax.to(MovieClip(e.target),0,{tint:0xFF75B6}); break; case 'rollOut': //this executes when you rolloff the target TweenMax.to(MovieClip(e.target),0,{removeTint:true}); break; case 'click': //this executes when you click the target onClick01(); break; } function onClick01():void{ var gt2:GoogleTranslation = new GoogleTranslation(); gt2.translate(input_trans.text,'en','de'); gt2.addEventListener(GoogleApiEvent.TRANSLATION_RESULT,onTranslate2); } function onTranslate2(e:GoogleApiEvent):void{ trace(e.data.to); trace(e.data.orig); trace(e.data.from); trace(e.data.result); output_trans.text = e.data.result; } }
Oversized graphic... no error?   (152 Views)
I'm building out an engine where the developer will commonly be externally loading large bitmaps. I understand that Flash has bitmap size restrictions, and I provide the developers a way around this. However, I am trying to find a way to throw them an error when they attempt to load a bitmap that is too large. Flash does not seem to throw an error when it loads an oversized bitmap. The ProgressEvent.PROGRESS handler just counts all the way up to 100%, but the COMPLETE event never fires and the image never appears. It just silently fails. Does anyone know how to capture an event when a bitmap fails to load/display because it's too large
Argument error 2109 when buttons are clicked   (138 Views)
, I'm still a newbie when it comes as3. I am working on a website and I have my buttons within a MC and they are revealed when you rollover the MC. buttons are independent buttons from my library and they each have unique instance names. These very instance names for the buttons match frame labels that I have in the first scene/main timeline. Here is the argument error that I receive when I click on one of my four buttons: ArgumentError: Error #2109: Frame label instance7 not found in scene Scene 1. at flash.display::MovieClip/gotoAndPlay() at secondsdwebsite2_fla::MainTimeline/btnClick() Here is the only code I have (the rest are "stop();" scripts in the places need): --------------------------------------------------------------------------------- stop(); main_btn.addEventListener(MouseEvent.MOUSE_OVER, slidein); main_btn.addEventListener(MouseEvent.MOUSE_OUT, slideout); function slidein(event:MouseEvent):void { buttons.play(); } function slideout(event:MouseEvent):void { buttons.stop(); } buttons.addEventListener(MouseEvent.CLICK, btnClick); var btnName = ""; function btnClick(event:MouseEvent):void { btnName = event.target.name; gotoAndPlay(btnName); } /* works_btn.buttonMode=true; about_btn.buttonMode=true; contact_btn.buttonMode=true; resume_btn.buttonMode=true; works_btn.useHandCursor=true; about_btn.useHandCursor=true; contact_btn.useHandCursor=true; resume_btn.useHandCursor=true; */ --------------------------------------------------------------------------------------- Please tell me what I'm doing wrong. Better yet, how can I fix it
simple error but dunno what the problem is   (152 Views)
anyone!!help me!! this is driving me insane!!! i got this error Cannot access a property or method of a null object reference. whenever I clicked on my button Code: TypeError: Error #1009: Cannot access a property or method of a null object reference. at test_fla::MainTimeline/onClick() I know it means that the onClick is not on the stage,but I do put my buttons all in the same frame with the actionscript here is my full actionscript,simple switch case Code: stop(); play_btn.addEventListener(MouseEvent.CLICK, onClick); instruction_btn.addEventListener(MouseEvent.CLICK, onClick); option_btn.addEventListener(MouseEvent.CLICK, onClick); score_btn.addEventListener(MouseEvent.CLICK, onClick); quit_btn.addEventListener(MouseEvent.CLICK, onClick); function onClick(evt:MouseEvent):void { switch (evt.target) { case play_btn : trace("play"); content_mc.gotoAndPlay("play"); break; case instruction_btn : content_mc.gotoAndPlay("instruction"); break; case option_btn : content_mc.gotoAndPlay("option"); break; case score_btn : content_mc.gotoAndPlay("score"); break; case quit_btn : fscommand("quit"); break; } } the trace can works but not the link i'm desperate :'(