Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Flash Development
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 09-07-2009, 07:08 AM
  #1
Leukeh
Swordman (Level 9)
 
Leukeh's Avatar
 
Join Date: Jan 2006
Location: Sydney, Australia
Posts: 86
iTrader: (0)
Leukeh is an unknown quantity at this point
Error and faulty links!

Hi guys,
I'm fairly new to ActionScript, so bear with me.
The design of my pages means that certain links appear only after clicking another one (in this instance, if you click on "Photography" a number of links to pages/frames with photography in them appear)

I keep getting this error:
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at page_fla::MainTimeline/frame2()
	at flash.display::MovieClip/gotoAndStop()
	at page_fla::MainTimeline/goHome()
Here's a copy of my script:
Code:
stop();

function goHome (e:MouseEvent):void{
gotoAndStop("home");
}
home_btn.addEventListener(MouseEvent.CLICK, goHome);

function goDesign (e:MouseEvent):void{
gotoAndStop("design_1");
}
design_btn.addEventListener(MouseEvent.CLICK, goDesign);

function goPhotography_1 (e:MouseEvent):void{
gotoAndStop("photography_1");
}
photography_btn.addEventListener(MouseEvent.CLICK, goPhotography_1);

function goPhotography_1a (e:MouseEvent):void{
gotoAndStop("photography_1");
}
photography_1_btn.addEventListener(MouseEvent.CLICK, goPhotography_1a);

function goPhotography_2 (e:MouseEvent):void{
gotoAndStop("photography_2");
}
photography_2_btn.addEventListener(MouseEvent.CLICK, goPhotography_2);

function goPhotography_3 (e:MouseEvent):void{
gotoAndStop("photography_3");
}
photography_3_btn.addEventListener(MouseEvent.CLICK, goPhotography_3);

function goPhotography_4 (e:MouseEvent):void{
gotoAndStop("photography_4");
}
photography_4_btn.addEventListener(MouseEvent.CLICK, goPhotography_4);

function goPhotography_5 (e:MouseEvent):void{
gotoAndStop("photography_5");
}
photography_5_btn.addEventListener(MouseEvent.CLICK, goPhotography_5);
From what I could gather, it was trying to initialize a link in frame 2 that didn't appear until frame 8, so I tried moving the script functions "goPhotography_1a" down to "goPhotography_5" to frame 8 but got the error:
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at page_fla::MainTimeline/frame8()
	at flash.display::MovieClip/gotoAndStop()
	at page_fla::MainTimeline/goPhotography_1()
I'm not sure if it's the same problem or a different one, but the links/buttons that appear in frame 8 don't lead anywhere. All my frames are labeled correctly.

Being new to ActionScript, I really have no clue where the problem lies.
__________________
--
Leukeh
Leukeh is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 05:17 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.