Clocked In
06-19-2009, 04:08 PM
Hi all,
I've been trying to get a really basic panorama to run out of Flash CS4 in Flash Player 10 using pano.swf V2.3.1, and getting some really odd behavior.
Here's my code
var panoLoader:Loader = new Loader();
var panorama:MovieClip;
panoLoader.contentLoaderInfo.addEventListener(Even t.COMPLETE, panoLoadHandler);
panoLoader.load(new URLRequest("swf/fpp/pano.swf"));
function panoLoadHandler(e:Event):void
{
addChild(panoLoader);
panorama = panoLoader.content as MovieClip;
var panoLoadTimer:Timer = new Timer(1000, 1);
panoLoadTimer.addEventListener(TimerEvent.TIMER, loadIt);
panoLoadTimer.start();
}
function loadIt(...args):void
{
trace("Load it");
panorama.setArea(0, 0, stage.stageWidth, stage.stageHeight);
panorama.loadPanorama("xml_file=panoramas/barry_room.xml");
}
And here's the panorama xml file:
<panorama>
<parameters>
panoType = cube1
panoName = panoramas/barry_room
</parameters>
</panorama>
Couldn't be simpler!
This runs absolutely fine with pano.swf 2.2.1.
However, when I switch to pano.swf 2.3.1 and run it from Flash CS4 it causes Flash to crash and shutdown.
Considering this should be a 'silent' upgrade, it's proving a lot more difficult that I ever imagined!
One thing I should point out is that if I don't put the timer in and call loadPanorama() directly with pano.swf 2.3.1 I get the following error thrown:
TypeError: Error #1010: A term is undefined and has no properties.
at PanoController/getPlayerName()
at PanoController/loadPanorama()
at GuidA_fla::MainTimeline/loadIt()
at GuidA_fla::MainTimeline/panoLoadHandler()
I am running the latest Flash Player 10.
One more clue: If I run the generated SWF on its own in Flash Player with the timeout it seems to work. Without the timeout, still the error. So what's wrong with this and Flash CS4??
Any contribution would really help to ease my mental condition!
I've been trying to get a really basic panorama to run out of Flash CS4 in Flash Player 10 using pano.swf V2.3.1, and getting some really odd behavior.
Here's my code
var panoLoader:Loader = new Loader();
var panorama:MovieClip;
panoLoader.contentLoaderInfo.addEventListener(Even t.COMPLETE, panoLoadHandler);
panoLoader.load(new URLRequest("swf/fpp/pano.swf"));
function panoLoadHandler(e:Event):void
{
addChild(panoLoader);
panorama = panoLoader.content as MovieClip;
var panoLoadTimer:Timer = new Timer(1000, 1);
panoLoadTimer.addEventListener(TimerEvent.TIMER, loadIt);
panoLoadTimer.start();
}
function loadIt(...args):void
{
trace("Load it");
panorama.setArea(0, 0, stage.stageWidth, stage.stageHeight);
panorama.loadPanorama("xml_file=panoramas/barry_room.xml");
}
And here's the panorama xml file:
<panorama>
<parameters>
panoType = cube1
panoName = panoramas/barry_room
</parameters>
</panorama>
Couldn't be simpler!
This runs absolutely fine with pano.swf 2.2.1.
However, when I switch to pano.swf 2.3.1 and run it from Flash CS4 it causes Flash to crash and shutdown.
Considering this should be a 'silent' upgrade, it's proving a lot more difficult that I ever imagined!
One thing I should point out is that if I don't put the timer in and call loadPanorama() directly with pano.swf 2.3.1 I get the following error thrown:
TypeError: Error #1010: A term is undefined and has no properties.
at PanoController/getPlayerName()
at PanoController/loadPanorama()
at GuidA_fla::MainTimeline/loadIt()
at GuidA_fla::MainTimeline/panoLoadHandler()
I am running the latest Flash Player 10.
One more clue: If I run the generated SWF on its own in Flash Player with the timeout it seems to work. Without the timeout, still the error. So what's wrong with this and Flash CS4??
Any contribution would really help to ease my mental condition!