Error #1009 at loading an external swf

I am using FlashDevelop 3 for my project, and I am trying to load an swf (created in Flash CS3 and with timeline code). What does it mean
Code: [Fault] exception, information=TypeError: Error #1009: Cannot access a property or method of a null object reference. Execution halted in 'spontaneousBox.swf' ffffffffat 0xExecution halted in 'spontaneousBox.swf' ffffffff (-1) PS: i can load images fine, and other swfs built with FlashDevelop.

EDIT: it seems that i only get the error the first time I load the swf, after trying to load again, it loads ok.

Posted On: Thursday 25th of October 2012 11:10:15 PM Total Views:  323
View Complete with Replies

Related Messages:

google translate and error code   (99 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 nslation/onResponse() at at at here's my code and I'd really appreciate any help! Code: package{ import flash.display.*; import*; import gs.*; import fl.motion.easing.*; import framework.utils.LoadXML; import*; import*; import* import; import*; public dynamic class wotd_widget extends MovieClip{ //vars var loadXML:LoadXML = new LoadXML('',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($[0].title); trace($[0].description); wotd_In.text = $[0].title; des_In.text = $[0].description; var gt:GoogleTranslation = new GoogleTranslation(); gt.translate($[0].title,'en','de'); gt.addEventListener(GoogleApiEvent.TRANSLATION_RESULT,onTranslate); } private function onTranslate(e:GoogleApiEvent):void{ //trace(; //trace(; //trace(; //trace(; trans_In.text =; } private function init_btn():void{ this.mc01 = new trans_btn(); this.mc01.x = 340.9; this.mc01.y = 234.4; addChild(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,0,{tint:0xFF75B6}); break; case 'rollOut': //this executes when you rolloff the 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(; trace(; trace(; trace(; output_trans.text =; } }
Oversized graphic... no error?   (87 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   (86 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 {; } function slideout(event:MouseEvent):void { buttons.stop(); } buttons.addEventListener(MouseEvent.CLICK, btnClick); var btnName = ""; function btnClick(event:MouseEvent):void { btnName =; 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   (92 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 ( { 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 :'(
Sprite trying to remove itself from the stage is throwing errors.   (118 Views)
I'm trying to have a bullet Sprite remove itself from the stage once it is off the stage, but Flash keeps throwing #1009 errors at me. I've looked over the code several times and don't understand what's wrong. Bullet code: Code: package { import flash.display.Sprite; import flash.display.MovieClip; import*; public class Bullet extends Sprite { private var bullet_direction; private var bullet_speed; public function Bullet(xLoc:Number, yLoc:Number, angle:Number, speed:Number) { x = xLoc; y = yLoc; bullet_direction = angle; bullet_speed = speed; addEventListener(Event.ENTER_FRAME, BulletMovement,false,0,true); } public function BulletMovement(e:Event) { y -= bullet_speed * Math.sin(bullet_direction); x += bullet_speed * Math.cos(bullet_direction); if ( x > 500 || x < -20 || y > 660 || y < -20 ) { DestroyBullet(); } } public function DestroyBullet():void { removeEventListener(Event.ENTER_FRAME, BulletMovement); (stage as MovieClip).removeChild(this); } } } Error message: Code: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Bullet/DestroyBullet() at Bullet/BulletMovement()
navigateToURL error????   (76 Views)
Hi I am having issues with a navigateToURL command in AS3. When I run it in flash i get no errors but when i publish the file i get the following error: SecurityError: Error #2148: SWF file file:///C:/Users/jack bauer/Documents/Flash Projects/Banner2.swf cannot access local resource xml/links.xml. Only local-with-filesystem and trusted local SWF files may access local resources. at at at Banner2_fla::MainTimeline/frame1() I have also posted the AS3 code related to this navigation below and i hope someone can help. thanks! stop(); var linkList:Array = [];// this array has the link information stored in it var xmlURLLoad:URLLoader = new URLLoader();//variable to load an XML var xmlURLReq:URLRequest = new URLRequest("xml/links.xml");//Variable to request a specific XML file var a:Number = 0; xmlURLLoad.load(xmlURLReq); xmlURLLoad.addEventListener(Event.COMPLETE, dataLoaded);//event listener to listen for when the data is loaded function dataLoaded(event:Event):void {//function to do something once the XML data is loaded var xmlData:XML = new XML (; var n:Number = xmlData.url.length();//variable to assign a number to how many videos there are //These are the event listeners that are listening for certain actions to be performed on certain objects peopleBttn.addEventListener(MouseEvent.MOUSE_DOWN, peopleStart); projectsBttn.addEventListener(MouseEvent.MOUSE_DOWN, projectsStart); collabBttn.addEventListener(MouseEvent.MOUSE_DOWN, collabStart); while(a < n){ linkList.push(xmlData.url[a]); a++; } /////////////////////////////////////////////////////////////////////// ///////////////////////////FUNCTIONS/////////////////////////////////// /////////////////////////////////////////////////////////////////////// function peopleStart(evt:Event):void { navigateToURL(new URLRequest(linkList[0]),"_self"); trace(linkList[0]); } function projectsStart(evt:Event):void { navigateToURL(new URLRequest(linkList[1]),"_self"); trace(linkList[1]); } function collabStart(evt:Event):void { navigateToURL(new URLRequest(linkList[2]),"_self"); trace(linkList[2]); } } /////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
60 sec upload generates error   (94 Views)
I'm uploading multiple files to my server with the fileReferenceList. But it seems like if the upload takes more than 60 sec I get a error message. I found this might be the problem, but I cant get it to work anyway. Anybody knows how to fix this problem..
I keep getting this error: TypeError: Error #1034: Please help!   (145 Views)
I keep getting this error and I'm not sure why. TypeError: Error #1034: Type Coercion failed: cannot convert flash.text::TextField@3a062121 to fl.controls.TextArea. at SrHome_fla::MainTimeline/frame3() at flash.display::MovieClip/gotoAndPlay() at SrHome_fla::intro_mc_3/frame139() I am fairly new at this As 3.0 stuff so bare with me if this is an easy fix. Here is the code that I am using that produces that error. import fl.controls.*; var info_txt:TextArea = photoArea_mc.photoSquare_mc.info_txt; var image:XML = new XML(); image.@fileName = "pic1.jpg"; image.photographer = "Photographer 1"; info_txt.text = image.photographer; stop();
AS3 Image Map Linking Issue - No compiler errors   (96 Views)
, I've made an image map in Flash using AS3, however it does not seem to be working properly. The links only work in a strange succession. In order to click all the links you must first click the last link followed by the first link, then the second link. After that the image map behaves as it is supposed to. I'm not sure why this is happening. It complies without error and aside from the little quirk mentioned above, it works beautifully. I've checked and double checked the AS, even copied and pasted some code from one button to another to see if it would make a difference, but to no avail. I am using the code listed below: [codebox] button1.addEventListener(MouseEvent.CLICK, callLink1); function callLink1 (event: MouseEvent) :void { var url:String = (""); var request:URLRequest = new URLRequest (url); try { navigateToURL (request, "_parent"); } catch (e:Error) { trace ("Error occurred!"); } [/codebox] Any and all help would be much appreciated,
Need help with a 1119 error plz   (78 Views)
Description 1119:Access of possibly undefined property myLoader through a reference with static type flash.display.DisplayObjectContainer. Source this.parent.myLoader.load(new URLRequest( + ".swf")); I am pretty new to CS3 and i cant understand why i am getting this compiler error. The source is in a mc with buttons of the same name as the external swfs it loads. This mc is in my main Timeline. I cant get my main Timeline(menu) to load any external swf. I would really appreciate some advice on this problem if anyone can.
error message   (88 Views)
TypeError: Error #1009: Cannot access a property or method of a null object reference. at play_fla::MainTimeline/frame1() I am receiving this error message when my site loads. I have set up a simple flash button to go from frame 1 to frame 2. Frame 2 has a video on it and I am getting the above error message when the page loads. The url is Here is the code I have used to create the simple flash page. I am very new to AS3 so dont judge me forward_btn.addEventListener(MouseEvent.CLICK, moveForward); back_btn.addEventListener(MouseEvent.CLICK, moveBackward); function moveForward(e:MouseEvent):void { nextFrame(); //or gotoAndStop(2); } function moveBackward(e:MouseEvent):void { prevFrame(); //or gotoAndStop(1); }
1009 error after putting the preloader.   (243 Views)
i've put simple preloader on frame 1. since then i get an 1009 error message. I debugged the file and it seems like it is referring to 'franklin_button' but this is the button on the stage. i've checked the instance name thousand times and it is correct name. yet without the preloader, the whole thing works find without a problem. I do not see where it should have gone wrong. Please help! frame 1(preloader script) stop(); this.loaderInfo.addEventListener(ProgressEvent.PRO GRESS,checkLoadProgress); function checkLoadProgress(event:ProgressEvent):void { var progressPercentComplete:Number=(event.bytesLoaded / event.bytesTotal)*100; loaded_txt.text=String(Math.floor(progressPercentC omplete))+" %"; if (progressPercentComplete==100) { this.loaderInfo.removeEventListener(ProgressEvent. PROGRESS,checkLoadProgress); play(); } } frame 2(main script) stop(); var franklin:franklin_descprtion = new franklin_descprtion(); var tour:tour_d = new tour_d(); var clock:clock_d = new clock_d(); var identity:identity_d = new identity_d(); var buio:buio_d = new buio_d(); this.franklin_button.addEventListener(MouseEvent.M OUSE_OVER, mouseOverHandler); function mouseOverHandler(event:MouseEvent):void { this.franklin.x=264.6; this.franklin.y=36.6; addChild(franklin); } this.franklin_button.addEventListener(MouseEvent.M OUSE_OUT, mouseOutHandler); function mouseOutHandler(event:MouseEvent):void { this.removeChild(franklin); } this.franklin_button.addEventListener(MouseEvent.M OUSE_DOWN, mouseDownHandler); function mouseDownHandler(event:MouseEvent):void { var jscommand1:String="'','win','height=350,width=300,toolbar=no, scrollbars=yes');"; var url1:URLRequest=new URLRequest("javascript:"+jscommand1+" void(0);"); navigateToURL(url1, "_blank"); } this.identity_button.addEventListener(MouseEvent.M OUSE_OVER, mouseOverHandler_1); function mouseOverHandler_1(event:MouseEvent):void { this.identity.x=196.9; this.identity.y=91.6; this.addChild(this.identity); } this.identity_button.addEventListener(MouseEvent.M OUSE_OUT, mouseOutHandler_1); function mouseOutHandler_1(event:MouseEvent):void { this.removeChild(this.identity); } this.identity_button.addEventListener(MouseEvent.M OUSE_DOWN, mouseDownHandler_1); function mouseDownHandler_1(event:MouseEvent):void { var jscommand1:String="'','win','height=350,width=300,toolbar= no,scrollbars=yes');"; var url1:URLRequest=new URLRequest("javascript:"+jscommand1+" void(0);"); navigateToURL(url1, "_blank"); } this.buio_button.addEventListener(MouseEvent.MOUSE _OVER, mouseOverHandler_2); function mouseOverHandler_2(event:MouseEvent):void { this.buio.x=558.5; this.buio.y=314.6; this.addChild(this.buio); } this.buio_button.addEventListener(MouseEvent.MOUSE _OUT, mouseOutHandler_2); function mouseOutHandler_2(event:MouseEvent):void { this.removeChild(this.buio); } this.buio_button.addEventListener(MouseEvent.MOUSE _DOWN, mouseDownHandler_2); function mouseDownHandler_2(event:MouseEvent):void { var jscommand1:String="'','win','height=350,width=300,toolbar=no,s crollbars=yes');"; var url1:URLRequest=new URLRequest("javascript:"+jscommand1+" void(0);"); navigateToURL(url1, "_blank"); } this.tour_button.addEventListener(MouseEvent.MOUSE _OVER, mouseOverHandler_3); function mouseOverHandler_3(event:MouseEvent):void { this.tour.x=212.5; this.tour.y=359; this.addChild(this.tour); } this.tour_button.addEventListener(MouseEvent.MOUSE _OUT, mouseOutHandler_3); function mouseOutHandler_3(event:MouseEvent):void { this.removeChild(this.tour); } this.tour_button.addEventListener(MouseEvent.MOUSE _DOWN, mouseDownHandler_3); function mouseDownHandler_3(event:MouseEvent):void { var jscommand:String="'','win','height=350,width=300,toolbar=no,s crollbars=yes');"; var url:URLRequest=new URLRequest("javascript:"+jscommand+" void(0);"); navigateToURL(url, "_blank"); } this.clock_button.addEventListener(MouseEvent.MOUS E_OVER, mouseOverHandler_4); function mouseOverHandler_4(event:MouseEvent):void { this.clock.x=985.8; this.clock.y=270.5; addChild(this.clock); } this.clock_button.addEventListener(MouseEvent.MOUS E_OUT, mouseOutHandler_4); function mouseOutHandler_4(event:MouseEvent):void { this.removeChild(this.clock); } this.clock_button.addEventListener(MouseEvent.MOUS E_DOWN, mouseDownHandler_4); function mouseDownHandler_4(event:MouseEvent):void { var jscommand1:String="'','win','height=350,width=300,toolbar=no, scrollbars=yes');"; var url1:URLRequest=new URLRequest("javascript:"+jscommand1+" void(0);"); navigateToURL(url1, "_blank"); } p.s. i also tried to seperate them on different scenes but this doesn't work either.
Runtime error with flex4, FDT or CS4   (109 Views)
Last resort, post the forum I use FDT with eclipse for almost every project i work on, I recently started to use it to compile also. When compiling i get a runtime error [Fault] exception, information=TypeError: Error #1034: Type Coercion failed: cannot convert se.testsajt.components.preloader:reloader@1335c871 to aijaj.abstracts.component.AbstractComponent. Fault, This seems like Im just stupid and dont understand that I cant convert one class to another, but the thing is that Preloader extends AbstractComponent. So this really should work. I also tried to implement an interface for the components to use this for all the handling but that didnt work either. The weird stuff is that when compiling in the CS4 IDE it works just fine, but then when i open the output swf in latest flashplayer i get the same error as before. If someone has the same problem please help me.
using the same code without conflict error?   (72 Views)
in as 2.0, u could use the same code many times. i'm making a gallery, and i want to have many galleries. but when i copy my gallery code, it says "a conflict exists with definition" how can you make many galleries without this error my galleries codes are in different frames.
"fscommand("fullscreen","true");" error AS3   (89 Views)
, Is the fullscreen function the same for AS3 as it was AS2 Currently I have "fscommand("fullscreen","true");" in the first frame of my movie and it launches my projector into fullscreen mode, which is what I want. however, it also launches any subsequent movie I load from an external file using the getURL command into full screen as well. Any ideas
No compiler errors...nothing on stage!   (102 Views)
well i have this code as compiled class Code: package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import; public class Bouncing extends Sprite { private var ball:Ball; private var vx:Number; private var vy:Number; public function Bouncing(); { init(); } private function init():void { stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; ball = new Ball(); ball.x = stage.stageWidth / 2; ball.y = stage.stageHeight / 2; vx = Math.random() * 10 - 5; vy = Math.random() * 10 - 5; addChild(ball); } } } and this sub-class Code: package { import flash.display.Sprite; public class Ball extends Sprite { public var radius:Number; private var color:uint; public function Ball(radius:Number = 20, color:uint = 0xFF0000) { this.radius = radius; this.color = color; init(); } public function init():void { graphics.beginFill(color); graphics.drawCircle(0, 0, radius); graphics.endFill(); } } } I get no complier errors , but the swf is empty(background color 0x000000). Can' t find the error which drives me crazy! Anyone experienced similar situation (always wanted to use yoda!)
ColorTransform onRollOut error   (79 Views)
I just started playing around with drawing things using action script, specifically with "ColorTransform". I am able to set one transform just fine, but when I attempt to use a second transform to reset the movie clip to it's original values I get an error. Can movie clips only have one ColorTransform, or is it because the movie clip is being generated through code Here is the code: Code: var targetX:Number var targetY:Number stage.addEventListener(MouseEvent.CLICK, onClick); function onClick(event:MouseEvent):void { targetX =; targetY =; if ((targetX + targetY) > 500) { makeRectangle(); } else { makeCircle(); } } function makeCircle():void { var shape1:MovieClip = new MovieClip();, 0x00ff00);;, targetY, 50);; addEventListener(MouseEvent.ROLL_OVER, colorT); addEventListener(MouseEvent.ROLL_OUT, colorReset); addChild(shape1); } function makeRectangle():void { var shape2:MovieClip = new MovieClip();, 0x33ff00);;, targetY, 50, 50); addEventListener(MouseEvent.ROLL_OVER, colorT); addEventListener(MouseEvent.ROLL_OUT, colorReset); addChild(shape2); } function colorT(event:MouseEvent):void { trace("rollover!"); var colorT:ColorTransform = new ColorTransform(); colorT.blueOffset = -100; colorT.redOffset = 100; = colorT; } function colorReset(event:MouseEvent):void { trace("rollout!"); var colorReset:ColorTransform = new ColorTransform(); colorReset.blueOffset = 100; colorReset.redOffset = -100; = colorReset; }
Button inside Movieclip error!!   (85 Views)
Hi i have designed a site where the user can move elements around the stage, and within some of these elements(movieclips) there are buttons insde them that link to various frame labels that are located on the main movieclips time line. The action to control the button is on the main movieclip time line and not within the element itself. These code used is: Code: paper2.webBttn.addEventListener(MouseEvent.CLICK, webButton); function webButton(e:MouseEvent):void { gotoAndPlay("web"); } the error i keep getting is: Code: ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. at flash.display::DisplayObjectContainer/setChildIndex() at FlashAS3Portfolio2_fla::holder_14/doDrag()
[help]as3 xml error   (158 Views)
So I'm playing around with xml and as3. Now I got this: Code: var fileList:XMLList = bookInput.Songs.file1; And now I want that if you push a button, file1 changes in file2. So I got this: Code: var j:uint=1; But when I change the first snipped in this: Code: var fileList:XMLList = bookInput.Songs.file+j; it gives this error: TypeError: Error #1034: Type Coercion failed: cannot convert "1" to XMLList. How to fix it
AS3, error 1119 - when class is same name as last folder in package.   (121 Views)
I have this strange error, I have a class defined like so: ------ Code: package net.guttershark.model { public class Model { private static var instance:Model; public var test:Boolean; public static function gi():Model { if(instance == null) instance = new Model(); return instance; } } } ------ It throws error 1119 any time I try to use it like so: trace(; The error: "1119: Access of possibly undefined property test through a reference with static type Model. Now when I simply rename the class to this: Code: package net.guttershark.model { public class Model2 { private static var instance:Model2; public var test:Boolean; public static function gi():Model2 { if(instance == null) instance = new Model2(); return instance; } } } I get no errors, and it works fine. Whey does the class name conflict with the last folder in the package structure And is there a way around this