ActionScript 3.0 :: Error #1009 When Unloading External SWF
Jun 3, 2009
I'm trying to unload an external SWF, and this seems to work, but i get the #1009 error, and i can't figure out why.
Code:
stop();
this.removeEventListener(Event.ENTER_FRAME, gotTicket);
var loader:Loader = new Loader();
[code]....
View 21 Replies
Similar Posts:
Mar 26, 2009
TypeError: Error #1009: Cannot access a property or method of a null object reference. at MethodInfo-11() where is methodInfo-11?
[Code]....
View 4 Replies
Aug 9, 2010
Error #1009: Cannot access a property or method of a null object reference.
This is the error I cannot seem to understand. On the stage I have a movie clip, mcTree. It's keyframe is in frame 3143. There is no tween or anything. In frame 3144, I have the following actionscript:
mcTree.gotoAndStop(2);
I publish the movie and I get to frame 3144 then BAM TypeError: Error #1009: Cannot access a property or method of a null object reference.
at 2file_fla::MainTimeline/frame3144()
As you can tell, I'm more than 3000 frames into my animation here and have made it this far using this method, and it has worked.
View 4 Replies
May 7, 2010
I have write this code to load an .swf external file:
Code:
import flash.display.Loader;
//import flash.display.Sprite;
import flash.net.URLRequest;
[Code].....
And I've this error
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at gare_fla::pda_777/frame110()
at flash.display::MovieClip/gotoAndPlay()
at gare_fla::pda_777/goHome()
View 1 Replies
Feb 23, 2009
Having a problem here. I can load external swf files, but once I started on one the pages I end up with the 1009 errorThey work fine on their ownand the placebo page still loads inside the mainREALLY need to get this working. What should I be doing?index.swf
Code:
var xmlPath:String = "index.xml";
var settingsXML:XML;
[code].....
View 1 Replies
Feb 23, 2009
I can load external swf files, but once I started on one the pages I end up with the 1009 error.
They work fine on their own
and the placebo page still loads inside the main
REALLY need to get this working. What should I be doing?
index.swf
Code:
var xmlPath:String = "index.xml";
var settingsXML:XML;
var tweensArray:Array = new Array();
[Code].....
View 4 Replies
Feb 23, 2009
I tried to load external swf in my mainpage.fla file. when Itest movie in flash, it throws error.Error #1009: Cannot access a property or method of a nullobject reference.
View 1 Replies
Aug 4, 2010
I want to load an external swf when it's fully loaded. Then this is the code
ActionScript Code:
var contentLoader:Loader
function processSWF():void
{
[code]....
but flash give me TypeError: Error #1009: Cannot access a property or method of a null object reference instead, if i don't insert the listener, all goes fine
View 6 Replies
Oct 8, 2009
I have an index called allproducts and I want users to be able to click on an element and load a new SWF (with several external .as files) that has specifics about that element.When I run JUST the element (SS_glutenfree.swf), it works great. When I run allproducts.swf and click on the gluten free button, I get: TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Handle()
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()[code]....
TypeError: Error #1009: Cannot access a property or method of a null object reference. at Gallery()
allproducts.swf is in the folder above SS_glutenfree.swf and all of its .as files (which are Gallery, Handle, and Img).
View 8 Replies
May 10, 2010
I am trying to load a menu as an external file .... and getting this :
TypeError: Error #1009: Cannot access a property or method of a null object reference. at com::menu()
Here is my code:
if(!menuLoader){
var menuRequest:URLRequest = new URLRequest("menu.swf");
var menuLoader:Loader = new Loader();
menuLoader.load(menuRequest); container.addChild(menuLoader);
menuLoader.x = 700; menuLoader.y = 50;
}
View 9 Replies
May 19, 2009
By itself, the gallery that I found here [URL] can run successfully.But when I load it into another movie I got this error :
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at classes::Script()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at classes::ImageViewer()
[code]....
View 1 Replies
Jul 28, 2009
I have a button (LOW_btn), located in one movieclip, and is set to play the next frame of another movie clip "bodybox_mc" and at the same time load an external .txt file into a dynamic text box "musictext_txt", which is deeper within the "bodybox_mc". (There is an update to "musictext_txt"'s scrollbar as well). However at runtime i receive the error 1009 (output is after the code). Here is the code (sorry if the variables and stuff are a bit long):
[Code]....
View 1 Replies
Aug 30, 2009
I am trying to load an external swf file. It loads just fine, but when I try to attach it to the stage, it completely overwhelms the parent swf as if it was on top of everything. It also occurs when I attach it to a movieClip. Again, nothing is clickable on the parent swf (even at places, where the moveClip isn't on). When I used an event listener to attach it, nothing got displayed at all.Here is the code:
Security.allowDomain("http://[path-to-3rd-party-server].swf?camera_id=9593");
var camRequest:URLRequest = new URLRequest("http://[path-to-3rd-party-server].swf?camera_id=9593");
var camLoader:Loader = new Loader()[CODE3].....
}
I also seem to getting a "TypeError: Error #1009: Cannot access a property or method of a null object reference." if I don't use "addChild(camLoader)".
View 3 Replies
Apr 23, 2010
I just found the external preloader tutorial and it's Perfect, exactly what I needed! I just have one issue which I can't figure out.. It all works fine with other swf files such as the content.swf example it comes with, however when I try link it to a site I'm making (a fluid as3 layout) it states: "TypeError: Error #1009: Cannot access a property or method of a null object reference. at Website()" Here is the syntax - it's just the same as on the tut but trying to load 'website.swf'..
[Code]...
View 4 Replies
Jun 10, 2009
I used an external preloader to call a swf is totally calling all the objects and functions through class, and there is nothing on the stage and timeframe. It shows TypeError: Error #1009: Cannot access a property or method of a null object reference. at main() Isit because i must put something on the stage or timeline for it to load??
[Code]...
View 11 Replies
Aug 15, 2011
[URL]I have: main.swf (a menu) and I have module.swf (content)If you navigate to Subsea Wellhead Systems/SS-15 BigBore II and click on that I have it load an external swf which covers most of the parent. So far so good. My problem is unloading the loaded 'Child' swf with the button provided on the loaded 'Child' swf.below is the code I used to load the file but I cant, for the life of me, find a way to unload it.
var bigboreLoader:Loader = new Loader();btnbb2.addEventListener(MouseEvent.MOUSE_UP, bigborecontent);
function bigborecontent(event:MouseEvent):void{var bigboreRequest:URLRequest = new URLRequest("moduletemplate.swf"); bigboreLoader.load(bigboreRequest); stage.addChild(bigboreLoader);
I am certain it requires the Child to communicate with the parent somehow but I am at a loss. If I could get a bit of advice or a link to something deal with this, it would be a big help. I just need to have my links load my modules and the remove them when the close buttong is hit on the loaded swf. I promise I have done searches and I admit I have found asnwers but still they are not working. I found the code below:
Main FLA:
function removeF() {
removeChild(bigboreLoader);
}
[code]....
View 10 Replies
Feb 23, 2011
I spent almost a week trying to figure out how to unload a currently loaded swf using its button and loading a new swf... I have three files, a main.fla, file1.fla and file2.fla. In my main.fla, I have a code which loads the other two files. If i will click the "unload" button in the file1.swf, I would like the main.fla to unload the file1.swf and load the other file, file2.swf. Here is the code to load the file1.swf:
[Code]....
View 1 Replies
Nov 2, 2010
I used to do this fine with AS2 and now i'm struggling to get it to work in AS3.my code is as follows:
PW1.addEventListener( MouseEvent.CLICK,loader1 );
//==================== PS function =============================================
var ldr:Loader = new Loader();
[code].....
View 3 Replies
Feb 28, 2010
Starting new thread for this topic as suggested by forum. I have a website which tweens movieclip pages (named home, bio, music, video and contact). Love the effect and trying to keep it. Main timeline contains the main buttons (home_btn, bio_btn, music btn, video_btn, contact_btn). Music page has a XML mp3 player contained in it with button control. Video page has an encoded video with no code.
I need the following:
1 - Music and video to shut off as those pages/movieclips tween off the stage. Gets annoying with them playing especially at the same time
2 - Music player to play correctly. It is not with the new code.
I have the following code. The "Tween Code" is on frame 1 of the main timeline of the movie. The "MP3 code" is on frame 1 of the music movie clip. I am getting the following ERROR message when running my movie. I ran the Debugger as I publish and it points to music.my_channel.stop(); in below code. My thought process on this was that it would reach out to the music movieclip, find my_channel and stop it.
[Code]...
View 9 Replies
Sep 30, 2009
I have created an invisible button myButton_btn inside a moviclip with instance name supermarket_mc. The supermarket_mc is based on a class Supermarket, which has the following code and works fine.
public class Supermarket extends MovieClip
{
public function Supermarket()[code]....
Now, if I have a button on Stage they work fine when I add a listener to them. However, when I add a listener to myButton_btn ie:
supermarket_mc.myButton_btn .addEventListener(MouseEvent.CLICK, turn);
myButton_btn does not react to click events and I get an additional error Error #1009: Cannot access a property or method of a null object reference.I suspect that the MouseEvent.CLICK in the class definition overrides the MouseEvent.CLICK on the nested button.
View 4 Replies
Jun 13, 2010
I am not an expert in flash, but i do work with AS and tweak Flash projects , though not having deep expertise in it. Currently i need to revamp a flash website done by one another guy, and the code base given to me, upon execution is throwing the following error."--- TypeError: Error #1009: Cannot access a property or method of a null objectreference.atNewSite_fla::MainTimeline/__setProp_ContactOutP1_ContactOut_Contents_ 0() at NewSite_fla::MainTimeline/frame1() --"The structure of the project is like, it has theifferent sections split into different movie clips. There is no single main timeline, but click actions on different areas of seperate movie clips will take them between oneanother.All the AS logic of event handling are written inline in FLA , no seperate Document class exists.
Preloader Movie clip is the first one getting loaded. As i understood the error is getting thrown initially itself, and it is not happening due to any Action script logic written inline, because it is throwing error even before hitting the first inline AS code.I am not able to figure Out what exactly it causing the problem, or where to resolve it. I setup the stuff online, for reference if anybody want to take a look at it, and here is the link.You need to have flash debugger turned ON in your browser, if need to see the exception getting triggered.
View 7 Replies
Jun 13, 2010
I am not an expert in flash, but I do work with AS and tweak Flash projects, though not having deep expertise in it. Currently I need to revamp a flash website done by one another guy, and the code base given to me, upon execution is throwing the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at NewSite_fla::MainTimeline/__setProp_ContactOutP1_ContactOut_Contents_0() at NewSite_fla::MainTimeline/frame1()
[Code]...
View 1 Replies
May 4, 2010
I added a flv into my Scene 1 then i added a new Scene.I just wanted to after finishing the .flv flash go to next scene.but when i added a new scene,and I test my movie,the .flv didnt show and i recieved these errors
[Code]...
View 5 Replies
Mar 10, 2009
This is my code,
stop();
button3.addEventListener(MouseEvent.CLICK, playClick3);
function playClick3(Event:MouseEvent):void {
gotoAndStop(422);
}
On frame 422 there is no code at the moment. I keep getting the error TypeError: Error #1009: Cannot access a property or method of a null object reference.
View 2 Replies
Jun 5, 2011
I've been away for a while and I just started to work on my new portfolio website (in flash). The design is finished and I followed a tutorial on youtube called the ''the fluid flash website to keep your flash website always centered''.The tutorial went good but when I wanted to go to another frame with other contents, an error appeared in the browser saying:
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at serrick_port2_fla::MainTimeline/resizeDisplay()
The code for the website is:
Code:
stop();
import flash.events.MouseEvent;
var myStage:Stage = this.stage;
[code].....
View 6 Replies
Aug 14, 2011
when all my script code is in the first frame everything working fine, but when I put some code in second frame, i've got the error:
Code:TypeError: Error #1009: Cannot access a property or method of a null object reference.at khekhe_fla::MainTimeline/frame1()[code]....
in the second frame i've receive the error i wrote about in the beginning. (i click btn_training, script sends me to the second frame, and when i click btn_back i receive the error).
View 2 Replies
Apr 18, 2012
sometimes I get this strange error during gameplay:
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
[code]...
I still don't know what causes the error. The only thing I discovered is that sometimes an object is null inside of my SoundManager. But I don't know why. I already checked all appropriate arrays if something's missing there but all seems to be ok there.
[code]...
View 3 Replies
Oct 1, 2007
I am trying to use the scroll pane component and I am having a few teething troubles. I have a scroll pane as a child object of a movie clip which is essentially a 'page', if I display this page it works fine and the scroll pane does too. If I then remove this page from the display list, go to another page and come back by readding it to the display list, I get the following error, even though nothing else has changed:
TypeError: Error #1009: Cannot access a property or method of a null object reference.at fl.containers::ScrollPane/fl.containers:ScrollPane::endDrag()
The scroll pane is still visible and works correctly, but ideally I'd like to stop this error.
View 3 Replies
Feb 25, 2011
I'm creating a simple gallery for a website which literally loads the next image when the image is clicked. I've set it up so that the images fade in. When i preview the .swf file in flash i get the below message:TypeError: Error #1009: Cannot access a property or method of a null object reference.atOutside_Portrait_fla::MainTimeline/fl_FadeSymbolIn_12()Everything seems to work ok, but im wondering if this is going to cause any problems. I've copied in the action script text which i have used below.
stop()
/btn1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_9);
function fl_ClickToGoToAndStopAtFrame_9(event:MouseEvent):v oid
[code]....
View 2 Replies
Sep 16, 2009
My main project loads an external .swf ("room") depending on which button the user clicks. Once that external .swf ("room") is loaded, the viewer chooses a ("demo") .swf to view. I need the "demo" .swf to unload once it is finished playing so that the viewer sees the 1st external .swfs menu again. All .swfs are loaded into an empty loader component. The "demo" swfs were created in captivate thus I don't have access to a timeline for them.[code]That all works fine, but when I load "room" .swfs into the main .swf, the unloadCaptivate(); no longer works.
View 1 Replies