AS3 Output Errors

Q&A about the latest versions
Post Reply
WBSKI
Posts: 6
Joined: Sat Dec 22, 2007 9:38 pm

Tue Dec 25, 2007 2:21 am

When I compile my code in Actionscript 3, I get a couple errors which I cannot understand:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at flash3dpano_empty_fla::MainTimeline/flash3dpano_empty_fla::frame1()
initHandler: [Event type="init" bubbles=false cancelable=false eventPhase=2]
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at MethodInfo-5()

All my source code is here (ignore the AC_RunActiveContent and virtualski.html) in Zip:
http://www.mediafire.com/?7twlohtup4i

Help me please!
User avatar
thomas
Chief Gnome
Posts: 2544
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Fri Dec 28, 2007 6:25 pm

Did you remove the panorama from the stage? If so, you need to use beta3 + clean up the object as described here: http://gardengnomesoftware.com/forum/vi ... .php?t=858
MfG, Thomas
WBSKI
Posts: 6
Joined: Sat Dec 22, 2007 9:38 pm

Sat Dec 29, 2007 1:18 am

No, I did not remove the panorama from the stage, that is why I am confused.
User avatar
thomas
Chief Gnome
Posts: 2544
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Sat Dec 29, 2007 5:50 pm

Ok, the problem is that no "Stage" object exists and the panorama tries to access those values (for example the window size). I will need to modify a lot of code to make the panorama player "Stage" independent.
MfG, Thomas
User avatar
thomas
Chief Gnome
Posts: 2544
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Sat Dec 29, 2007 6:15 pm

Ok, digging more into your code I found the cause of the error. You didn't added the panorama to the main movie clip (an the stage) so even if I would make the code "stage independent" it wouldn't show up. If you just add a addChild(skiman); to your main class so that the code looks like

Code: Select all

package com{
	import flash.display.*;
	import flash.net.URLRequest;
	import flash.events.Event;
	import com.vs.pano.pano;
	public class virtualski extends MovieClip {
		public function virtualski() {
			var skiman:pano = new pano();
			addChild(skiman);
			skiman.showit();
		}
	}
}

it would work.
MfG, Thomas
WBSKI
Posts: 6
Joined: Sat Dec 22, 2007 9:38 pm

Sun Dec 30, 2007 2:57 am

Sorry about that, I just started learning Actionscript.
jordan
Posts: 3
Joined: Mon Mar 17, 2008 2:55 pm
Contact:

Mon Mar 17, 2008 3:07 pm

I did not remove the panorama from the stage
Post Reply