Error #1010: A term is undefined and has no properties.

Using Pano2VR/Object2VR SWF files with your own Flash projects
Post Reply
giloosh
Posts: 9
Joined: Tue Jul 13, 2010 9:26 pm

Error #1010: A term is undefined and has no properties.

Post by giloosh » Tue Jul 13, 2010 9:36 pm

I get the following trace:
init panorama player...
initHandler: [Event type="init" bubbles=false cancelable=false eventPhase=2]
TypeError: Error #1010: A term is undefined and has no properties.
at vr2_fla::MainTimeline/finished_loading()
When running this code:

Code: Select all

var loader:Loader;
loader = new Loader();
var url:String = "vrs/Scene_A.swf";
var urlReq:URLRequest = new URLRequest(url);

// This is done after the swf is loaded.
function finished_loading (e:Event) {
	vr.pano.onClickQtHotspot=function(id:Number,title:String,url:String,target:String)
	{
	// add your code here!
		trace(id + "," + title);
	}
}

function initHandler(event:Event):void {
	trace("initHandler: " + event);
	vr.isFlash10=false; // Disable Flash 10 rendering if the container is Flash 9
}

function initPanorama(e:Event) {
// check if the panorama object is available and initialize it
	if ((vr!=null) && (vr.pano!=null)) {
		removeEventListener( Event.ENTER_FRAME , initPanorama);
	}
}
// call initPanorama every frame
addEventListener( Event.ENTER_FRAME , initPanorama);

// Tell the loader to call 'finished_loading' after the swf is loaded.
loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, finished_loading);
// Tell the loader to call 'initHandler' after the swf is initialized.
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.load(urlReq);
vr.addChild(loader); // add your swf directly to the stage

How can I solve this?

skaddi
Posts: 24
Joined: Thu Aug 20, 2009 2:24 pm

Re: Error #1010: A term is undefined and has no properties.

Post by skaddi » Wed Jul 14, 2010 12:22 pm

Hi again,

you have copied an example code to your finished_loading function. Like your error message said: ": A term is undefined and has no properties." You have to replace the placeholders with real content.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests