Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-29-2010, 05:16 AM   #1
panslove
Registered User
 
Join Date: Mar 2010
Posts: 2
Default TypeError: Error #1009: Cannot access a property or method of a null object reference

hi i am having a problem with just one thing with a button i keep getting this "TypeError: Error #1009: Cannot access a property or method of a null object reference.
at index_fla::MainTimeline/goJobs()"

now here is the the actionscript i am using:

info.addEventListener(MouseEvent.MOUSE_DOWN, goInfo, false, 0, true);
job.addEventListener(MouseEvent.MOUSE_DOWN, goJobs, false, 0, true);


function goInfo(evt:MouseEvent):void{
con.gotoAndStop("info");
};

function goJobs(evt:MouseEvent):void{
con.gotoAndStop("jobs");
};

now in the debugging it shows that this "con.gotoAndStop("jobs");" is the problem

Can anyone help
panslove is offline   Reply With Quote
Old 03-29-2010, 05:24 AM   #2
svenjoypro
DontJustEnjoyIt,SvEnjoyIt
 
svenjoypro's Avatar
 
Join Date: Sep 2005
Location: California
Posts: 1,389
Default

Does con exist on the timeline where this code resides?
ActionScript Code:
function goJobs(evt:MouseEvent):void{     con.gotoAndStop("jobs"); };
svenjoypro is offline   Reply With Quote
Old 03-29-2010, 07:53 AM   #3
panslove
Registered User
 
Join Date: Mar 2010
Posts: 2
Default

con does reside on the timeline and when i even remove the con it still gives me the same message
panslove is offline   Reply With Quote
Old 03-29-2010, 05:40 PM   #4
svenjoypro
DontJustEnjoyIt,SvEnjoyIt
 
svenjoypro's Avatar
 
Join Date: Sep 2005
Location: California
Posts: 1,389
Default

You have your actionscript on a keyframe, correct? Does con exist on that same frame number, or does it appear later on the timeline? If it appears later, you need to move the code
ActionScript Code:
function goJobs(evt:MouseEvent):void{     con.gotoAndStop("jobs"); };

to the same frame where con is.
svenjoypro is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:44 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.