ActionScript 3.0 :: Keep Getting Error 1009 Until SWF Movie Window Closed?

May 28, 2010

I have created a simple slideshow of thirteen frames. The slideshow script starts at Frame 2. This is because I have inserted a preloader in Frame 1. When I output my SWF and upload it to the web, it pulls down without incident. However, when I "Simulate Download" locally, Flash says this in the Output window:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at AS3GallerywPreloader_fla::MainTimeline/updatePreloader()
[AS3GallerywPreloader_fla.MainTimeline::frame1:9]
And it keeps writing this error message, ad infinitum, until I close the SWF movie window!

Here is the preloader script:
stop();
loaderInfo.addEventListener (ProgressEvent.PROGRESS, updatePreloader);
function updatePreloader (evtObj: ProgressEvent): void{
var percent:Number = Math.floor((evtObj.bytesLoaded*100) /evtObj.bytesTotal);
preloader_txt.text = percent+"%";
if (percent==100) {
nextFrame ();
}}

I should note that the slideshow portion functions as it should (the Back and Forward buttons advance frame by frame). In essence, the whole movie works. But I suspect I that error code is a bad thing to have. I ran the "Debug" feature (Debug-->Debug Movie), but got no apparent indication of a bad line of code.

View 6 Replies


Similar Posts:


Media Server :: Test My Movie - When I Press The Stop Button The Output Window Shows Me An Error Of "#1009 ?

Jul 17, 2011

I'm running FMS 4 Dev on my win XP SP3 machine, also running flash cs5 professional on same machine. I get the server admin screen to come up and it says it's running. I'm using a tut book on FMS and trying to run the first script in the book. It's long but I'll add the script at the bottom so you can see what i'm doing. In the server app folder I placed another folder called vid2 with nothing in it just like the book told me to do. I wrote the script line for line out of the book. When I test my movie it lays out my video window and buttons. It diplays my ugly mug on the screen. when I press the record button it does nothing. when i press the stop button the output window shows me an error of "#1009 can't access properties or methods of a null object". I assume that this is telling me I do not have a net connection.
 
when I types in the example it had an IP address in the code.How do I know the correct IP addy to my dev server? If I'm doing development and testing on the same machine do I even need to know this?  2) How will what I'm doing now differ from leasing space from an FMS provider?

the script:
 
package{        import fl.controls.Button;    import fl.controls.TextInput;    import flash.display.Sprite;    import flash.net.NetConnection;    import flash.net.NetStream;    import flash.events.NetStatusEvent;    import flash.events.MouseEvent; [code].....

View 2 Replies

Flex :: Adobe Air: Drag Application Crash - Error #3200: Cannot Perform Operation On Closed Window

Nov 23, 2009

Now I set dragEnabled="true", dropEnabled="true" and dragMoveEnabled="true" to archive the ability to reorder my Items via Drag and Drop. But as soon as I start to Drag an Item the whole Application crashes with:

[Code]....

View 1 Replies

ActionScript 3.0 :: Click The Next Button On The Window With The Likert Scale And Get TypeError: Error #1009

Feb 3, 2009

It appears when I click the Next button on the window with the likert scale. I have no idea why its giving this error.

TypeError: Error #1009: Cannot access a property or method of a null object reference.

View 1 Replies

ActionScript 3.0 :: Error #1009 - TypeError: Error #1009: Cannot Access A Property Or Method Of A Null Object Reference

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

Error #1009 Error #1009: Cannot Access A Property Or Method Of A Null Object Reference

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

Professional :: Embed A Video Window From UStream - TypeError: Error #1009: Cannot Access A Property Or Method Of A Null Object Reference

Aug 24, 2010

I have a web page in joomla and I embed a video window from UStream that allows my users to see or hear our transmissions. Every time I load the page in which the embeded window is, I receive this error message:

[Code]...

I posted this message before but I notice it was no longer posted. I have no knowledge of programming so I am lost.

View 1 Replies

Flex :: Detect Whether A Window Is Hidden (cmd-h) Vs Closed (cmd-w) - Mac

Feb 4, 2010

I'm developing an AIR application which uses multiple windows. I'm running into an issue where I want to open new windows (toaster notifications for example) when the primary application window is not visible, but the behavior is different depending on how the window is closed.

When a user hides all application windows with CMD-H, opening a new window causes all application windows to come back to the foreground (instead of just that new window, like I would expect). If the user closed a window with CMD-W, however, that window does not become visible when I open a new window.

Is there a way to either 1) tell when the user uses cmd-h to hide all windows OR 2) tell whether a window is hidden using cmd-h vs. closed cmd-w?

View 2 Replies

ActionScript 3.0 :: Execute A Function When Window Is Closed?

Feb 7, 2010

I was wondering if you can make an eventlistener to trigger to execute a function when the window/tab viewing the swf is closed. I searched around, and there seems to be a way to do this with flash.external class and javascript, but some users have javascript disabled, so is there a way to achieve this without javascript?

View 3 Replies

ActionScript 1/2 :: Trigger A Function When The Popup Window Closed?

Aug 27, 2009

using the javascript window.open() and getURL() i am opening a popup from flash. I want to call some flash function when i close that popup window.

View 3 Replies

Flex :: Determine If A PopUpManager Window Is Open (or When It Has Closed)?

Sep 6, 2011

In Flex (Flash Builder 4) I am opening a new window via PopUpManager.addPopUp. I have timer code that runs in my component and I need to stop my timer when that window opens and start the timer again when the window closes.

I figure it's easy enough to stop the timer in the function that opens the window, but how can I start the timer again when the window closes?

Is there a way to tell if there is a pop-up window in front of my component, or if a specific pop-up window is still open via PopUpManager?

View 2 Replies

ActionScript 2.0 :: Detecting Flash/html Window Closed?

Jan 9, 2007

is it possible for flash to detect when a user closes an html window with a swf embeded in it?

I want to record a user session time and need to be able to call a function and serverside script from within flash when a user closes the window...is there a way?

(I thought I might be able to do it with onUnload, but that will only work for unloading movieclips, not closing the main swf.)

View 1 Replies

ActionScript 3.0 :: Create Alert Before Browser Window Is Closed?

Jan 29, 2010

I have flash as a gui to edit some docs. I'd like to caution the user to save before they close the window (or navigate away from it).ut can it be done with a .swf ?I think this was asked awhile back in this forum but I cant seem to locate it.

View 2 Replies

ActionScript 3.0 :: Preloader Error 1009 With Movie Class

Dec 9, 2009

I am attempting to use a simple preloader that I've used many times in the past but am now receiving an error. The difference this time is that I've created a Class as opposed to just placing all of my code in the the time line.

[Code]....

When I publish the file, I get the error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at game() Everything runs perfectly fine when i publish the file not using any preloader.

View 1 Replies

Actionscript 3.0 :: Preloader Error #1009 With Movie Class?

Dec 9, 2009

I am attempting to use a simple preloader that I've used many times in the past but am now receiving an error. The difference this time is that I've created a Class as opposed to just placing all of my code in the the time line. I've placed the following code in the timeline of my preloader movie and am attempting to load the SWF of my main movie, which uses an external class for all of its code.

ActionScript Code:
Code: Select allfunction loop(e:ProgressEvent):void
{
var perc:Number = e.bytesLoaded / e.bytesTotal;

[code]....

When I publish the file, I get the error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at game()

Everything runs perfectly fine when i publish the file not using any preloader.

View 1 Replies

Actionscript 3 :: Getting Error #1009: But Buttons Loaded On Movie Load?

Dec 28, 2011

In my 1st frame I have the following action script and it works fine.

cal.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "cal" )});
trucks.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "truck" )});
raven.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "raven" )});
frank.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "fr" )});

[Code].....

I've posted a lot of code below. It still loads / traces fine on frame 1. On other frames only the last two come up in a trace (though they should all be the same). Then when returning to frame 1 they are all null.

View 1 Replies

ActionScript 3.0 :: Getting Error 1009 When Adding Preloader To Flash Movie

Aug 11, 2010

I'm trying to add a preloader to my flash movie so the user doesn't have to wait for additional frames to load while they are navigating. When I try to shift my current frames over by 2 frames to make room for the preloader I get this error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at APIVisionDigitalRecall_fla::MainTimeline/frame3()[APIVisionDigitalRecall_fla.MainTimeline::frame3:20]
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at navBar()

Everything works fine before I shift the frames by 2, so I don't understand why I'm getting a complier error abut an object not existing. What to do to add a pre-loader to my existing movie without moving everything over by two frames?

I was planning on putting this code on frame 1:
ActionScript Code:
var kbtotal:Number=stage.loaderInfo.bytesTotal/1024;
var kbloaded:Number=stage.loaderInfo.bytesLoaded/1024;
var percent:Number= Math.round(kbloaded/kbtotal*100)
loader.gotoAndStop(Math.floor((precent/100)*100));
loader.loadingStatus.text=Math.round(kbloaded) + " lb / " + Math.round(kbtotal) + "kb";

This code on frame 2:
ActionScript Code:
if (kbloaded == kbtotal){
gotoAndPlay("Main");
} else{
gotoAndPlay("Load");
}

View 3 Replies

ActionScript 3.0 :: Copy The Movie Clip And Paste It Further Down The Time Line - Error 1009

Jul 1, 2009

I am having a problem with the error above as follows i have a video which is working fine on frame 12, but when I copy the movie clip and paste it further down the time line to work on a different page I get

[Code]...

View 3 Replies

ActionScript 3.0 :: Error 1009 Cannot Access A Property Or Method Of A Null Object Reference When Try To Play Movie

Dec 20, 2010

When I try playing my movie, I get TypeError: Error #1009: Cannot access a property or method of a null object reference.at RhettMovie_fla::MainTimeline/showsmokescene() The error pops up when I click each of the four buttons, which are supposed to each start playing a different symbol.

[Code]...

View 3 Replies

ActionScript 2.0 :: Perform A "destructor" Like Action When Browser Window Is Closed?

Dec 4, 2003

I have a chat program built using flash for the front end tied to a J2EE back end. My program creates socket connections which must be closed appropriately when a user signs off.

When a user decides to sign off they can click the sign off button and everything is peachy. However, a less responsible user may choose to sign off by simply killing the browser window. Is there any way to implicitly call an actionscript routine on this event?

View 1 Replies

ActionScript 3.0 :: Restore A Movie Clip After Closed The Swf

Dec 7, 2011

Can you restore the state of a movie clip after you have closed it?

View 8 Replies

Professional :: Error - TypeError: Error #1009: Cannot Access A Property Or Method Of A Null

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

ActionScript 3.0 :: MyButton_btn Does Not React To Click Events , Get An Additional Error Error #1009?

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

Professional :: TypeError: Error #1009 - (Null Reference Error) With Flash?

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

Flash :: Flex - TypeError: Error #1009 - (Null Reference Error)

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

ActionScript 3.0 :: Error: Error #1009: Cannot Access A Property Or Method Of A Null Object Refer

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

ActionScript 3.0 :: Error TypeError: Error #1009: Cannot Access A Property Or Method Of A Null Object Reference.

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

ActionScript 3.0 :: Error Appeared In The Browser TypeError: Error #1009?

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

ActionScript 3.0 :: Put Some Code In Second Frame And Gets Error TypeError: Error #1009?

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

ActionScript 3.0 :: Flash Strange Sound Error - Error #1009?

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







Copyrights 2005-15 www.BigResource.com, All rights reserved