Page 1 of 1

AS3 Output Errors

Posted: Tue Dec 25, 2007 2:21 am
by WBSKI
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!

Posted: Fri Dec 28, 2007 6:25 pm
by thomas
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

Posted: Sat Dec 29, 2007 1:18 am
by WBSKI
No, I did not remove the panorama from the stage, that is why I am confused.

Posted: Sat Dec 29, 2007 5:50 pm
by thomas
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.

Posted: Sat Dec 29, 2007 6:15 pm
by thomas
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.

Posted: Sun Dec 30, 2007 2:57 am
by WBSKI
Sorry about that, I just started learning Actionscript.

Re: AS3 Output Errors

Posted: Mon Mar 17, 2008 3:07 pm
by jordan
I did not remove the panorama from the stage