PanoCube/init() Error (with Flex)

Using Pano2VR/Object2VR SWF files with your own Flash projects
Post Reply
lobolismart
Posts: 1
Joined: Thu Mar 25, 2010 8:44 pm

PanoCube/init() Error (with Flex)

Post by lobolismart » Thu Mar 25, 2010 9:11 pm

hello,
i've searched the forum for a thread with relevance to my problem. this is the only one i've found:
http://gardengnomesoftware.com/forum/vi ... rror#p9034

the issue is the following:
my client has send me a couple of .swf, which he claims are exported from pano2vr version 2.0.x something
i'm using flashdevelop and flex sdk (3 / 4)

here is a simple code snippet:

Code: Select all

package 
{
	import flash.display.Sprite;
	import flash.display.MovieClip;
	import flash.display.Loader;
	import flash.net.URLRequest;
	import flash.events.Event;
	
	public class Main extends Sprite 
	{
		private var loader:Loader;		
		
		public function Main():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			// entry
			var loader:Loader = new Loader();				
			loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event):void
			{
				trace('done');
			} );
			loader.load( new URLRequest('panotest.swf'));
		}
	}
}
so as you can see i'm simply trying to load a panorama swf and not access it with <mc>.pano etc..
but i get:

Code: Select all

TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at PanoCube/init()
it seems that the swf is calling something on enterFrame..

this does not work with both flex sdk 3 and 4 (beta)
but it does work when compiling using flash cs 3.

are there _any_ know solutions to this problem? or perhaps i should tell my client to export with a newer version of pano2vr ?

thanks for any the help that you may provide
l.l.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest