Will Yurman
03-23-2009, 03:35 PM
UPDATE:
I think the problem is with the new update. I replaced the new pano.swf with my older version and it works fine. Is there a bug I don't know about?
thanks
will
....and I don't have any extra.
So, I have a weekly panorama feature on my newspaper website. Each week I take last week's files, change a few file names and post the new pano.
But for some reason I can't get this week's to work. It loads the Flash shell, but not the pano.
I'm SURE it's something stupid on my part - but I can't find it - a typo in the actionscript of xml or something like that.
Not sure what info to include.
Here's the link to the non-working show:
http://democratandchronicle.com/graphics/panos/033cityhall/pano2.html
The working shows are here:
http://www.democratandchronicle.com/apps/pbcs.dll/section?Category=roundrochester
Here's the actionscript in my fla and below that the xml code. any help would be great. This is already late, so it is time sensitive. If I figure it out on my own, i'll update this.
thanks in advance,
will
stop();
import flash.display.Loader;
import flash.display.LoaderInfo;
import flash.display.Sprite;
import flash.events.*;
import flash.net.URLRequest;
import fl.transitions.Tween;
import fl.transitions.*;
import fl.transitions.easing.*;
var panorama:MovieClip;
var loader:Loader = new Loader();
loader.load(new URLRequest("/graphics/panos/033cityhall/pano.swf"));
addChild(loader);
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, loadComplete);
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
function loadComplete(e:Event) {
swapChildren(loader, border);
panorama = loader.content;
panorama.setArea(1,40,900,510);
panorama.loadPanorama("xml_file=/graphics/panos/033cityhall/pano.xml");
left_btn.addEventListener(MouseEvent.MOUSE_DOWN, doLeft);
right_btn.addEventListener(MouseEvent.MOUSE_DOWN, doRight);
up_btn.addEventListener(MouseEvent.MOUSE_DOWN, doUp);
down_btn.addEventListener(MouseEvent.MOUSE_DOWN, doDown);
zoomin.addEventListener(MouseEvent.MOUSE_DOWN, doZoomin);
zoomout.addEventListener(MouseEvent.MOUSE_DOWN, doZoomout);
stage.addEventListener(MouseEvent.MOUSE_UP, reset);
if (stage.hasOwnProperty("displayState")) {// check fullscreen feature is accessible or not
stage.addEventListener(FullScreenEvent.FULL_SCREEN , fullscreenHandler);
full_btn.addEventListener(MouseEvent.CLICK, doFullscreen);
} else {
full_btn.visible=false;
}
}
function doLeft(e:Event) {
panorama.pano.panKey = -1;
}
function doRight(e:Event) {
panorama.pano.panKey = 1;
}
function doUp(e:Event) {
panorama.pano.tiltKey = 1;
}
function doDown(e:Event) {
panorama.pano.tiltKey = -1;
}
function doZoomin(e:Event) {
panorama.pano.zoomKey = 1;
}
function doZoomout(e:Event) {
panorama.pano.zoomKey = -1;
}
function reset(e:Event) {
panorama.pano.panKey = 0;
panorama.pano.tiltKey = 0;
panorama.pano.zoomKey = 0;
}
function doFullscreen(e:Event) {
if (stage.hasOwnProperty("displayState")) {
if (stage.displayState == StageDisplayState.FULL_SCREEN) {
stage.displayState = StageDisplayState.NORMAL;
} else {
stage.displayState = StageDisplayState.FULL_SCREEN;
}
}
}
function fullscreenHandler(e:FullScreenEvent) {
if (e.fullScreen) {
//theMask.visible = left_sidebar.visible = bottom_bar.visible = left.visible = right.visible = up.visible = down.visible = zoomin.visible = zoomout.visible = false;
info_btn.visible = left_btn.visible = right_btn.visible = up_btn.visible = down_btn.visible = zoomin.visible = zoomout.visible = border.visible = headline.visible = boxes.visible = false;
panorama.setArea(0,0,stage.stageWidth,stage.stageH eight);
full_btn.x = stage.stageWidth-22;
full_btn.y = stage.stageHeight-22;
} else {
info_btn.visible = left_btn.visible = right_btn.visible = up_btn.visible = down_btn.visible = zoomin.visible = zoomout.visible = border.visible = headline.visible = boxes.visible = true;
panorama.setArea(1,40,900,510);
full_btn.x = 861;
full_btn.y = 565;
}
}
And here's the xml code:
<?xml version='1.0'?>
<panorama>
<parameters>
tiltHome=0
panHome=-30
panoName=panocityhall
panoType=mov
layer_1=autorotator.swf
layer_4=movDecoder.swf
layer_10=hotspots.swf
level_12=menuFullscreen.swf
layer_30=borders.swf
layer_40 = tooltips.swf
layer_50=mp3hotspot.swf
zoomMin = .80
</parameters>
<autorotator>
speed = 0.1
interval = 30
pause = 1000
quality = medium
</autorotator>
<borders>
pan_min = 0
pan_max = 360
tilt_min = -60
tilt_max = 60
</borders>
<movDecoder>
disableMacPreview=1
</movDecoder>
<hotspots>
<global>
<spot id="1" url="mp3hotspot.swf" file="cityhall.mp3" repeat="0" pan="0" tilt="-0" enableSoundPannig="1" soundRadius="360" />
</global>
</hotspots>
</panorama>
I think the problem is with the new update. I replaced the new pano.swf with my older version and it works fine. Is there a bug I don't know about?
thanks
will
....and I don't have any extra.
So, I have a weekly panorama feature on my newspaper website. Each week I take last week's files, change a few file names and post the new pano.
But for some reason I can't get this week's to work. It loads the Flash shell, but not the pano.
I'm SURE it's something stupid on my part - but I can't find it - a typo in the actionscript of xml or something like that.
Not sure what info to include.
Here's the link to the non-working show:
http://democratandchronicle.com/graphics/panos/033cityhall/pano2.html
The working shows are here:
http://www.democratandchronicle.com/apps/pbcs.dll/section?Category=roundrochester
Here's the actionscript in my fla and below that the xml code. any help would be great. This is already late, so it is time sensitive. If I figure it out on my own, i'll update this.
thanks in advance,
will
stop();
import flash.display.Loader;
import flash.display.LoaderInfo;
import flash.display.Sprite;
import flash.events.*;
import flash.net.URLRequest;
import fl.transitions.Tween;
import fl.transitions.*;
import fl.transitions.easing.*;
var panorama:MovieClip;
var loader:Loader = new Loader();
loader.load(new URLRequest("/graphics/panos/033cityhall/pano.swf"));
addChild(loader);
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, loadComplete);
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
function loadComplete(e:Event) {
swapChildren(loader, border);
panorama = loader.content;
panorama.setArea(1,40,900,510);
panorama.loadPanorama("xml_file=/graphics/panos/033cityhall/pano.xml");
left_btn.addEventListener(MouseEvent.MOUSE_DOWN, doLeft);
right_btn.addEventListener(MouseEvent.MOUSE_DOWN, doRight);
up_btn.addEventListener(MouseEvent.MOUSE_DOWN, doUp);
down_btn.addEventListener(MouseEvent.MOUSE_DOWN, doDown);
zoomin.addEventListener(MouseEvent.MOUSE_DOWN, doZoomin);
zoomout.addEventListener(MouseEvent.MOUSE_DOWN, doZoomout);
stage.addEventListener(MouseEvent.MOUSE_UP, reset);
if (stage.hasOwnProperty("displayState")) {// check fullscreen feature is accessible or not
stage.addEventListener(FullScreenEvent.FULL_SCREEN , fullscreenHandler);
full_btn.addEventListener(MouseEvent.CLICK, doFullscreen);
} else {
full_btn.visible=false;
}
}
function doLeft(e:Event) {
panorama.pano.panKey = -1;
}
function doRight(e:Event) {
panorama.pano.panKey = 1;
}
function doUp(e:Event) {
panorama.pano.tiltKey = 1;
}
function doDown(e:Event) {
panorama.pano.tiltKey = -1;
}
function doZoomin(e:Event) {
panorama.pano.zoomKey = 1;
}
function doZoomout(e:Event) {
panorama.pano.zoomKey = -1;
}
function reset(e:Event) {
panorama.pano.panKey = 0;
panorama.pano.tiltKey = 0;
panorama.pano.zoomKey = 0;
}
function doFullscreen(e:Event) {
if (stage.hasOwnProperty("displayState")) {
if (stage.displayState == StageDisplayState.FULL_SCREEN) {
stage.displayState = StageDisplayState.NORMAL;
} else {
stage.displayState = StageDisplayState.FULL_SCREEN;
}
}
}
function fullscreenHandler(e:FullScreenEvent) {
if (e.fullScreen) {
//theMask.visible = left_sidebar.visible = bottom_bar.visible = left.visible = right.visible = up.visible = down.visible = zoomin.visible = zoomout.visible = false;
info_btn.visible = left_btn.visible = right_btn.visible = up_btn.visible = down_btn.visible = zoomin.visible = zoomout.visible = border.visible = headline.visible = boxes.visible = false;
panorama.setArea(0,0,stage.stageWidth,stage.stageH eight);
full_btn.x = stage.stageWidth-22;
full_btn.y = stage.stageHeight-22;
} else {
info_btn.visible = left_btn.visible = right_btn.visible = up_btn.visible = down_btn.visible = zoomin.visible = zoomout.visible = border.visible = headline.visible = boxes.visible = true;
panorama.setArea(1,40,900,510);
full_btn.x = 861;
full_btn.y = 565;
}
}
And here's the xml code:
<?xml version='1.0'?>
<panorama>
<parameters>
tiltHome=0
panHome=-30
panoName=panocityhall
panoType=mov
layer_1=autorotator.swf
layer_4=movDecoder.swf
layer_10=hotspots.swf
level_12=menuFullscreen.swf
layer_30=borders.swf
layer_40 = tooltips.swf
layer_50=mp3hotspot.swf
zoomMin = .80
</parameters>
<autorotator>
speed = 0.1
interval = 30
pause = 1000
quality = medium
</autorotator>
<borders>
pan_min = 0
pan_max = 360
tilt_min = -60
tilt_max = 60
</borders>
<movDecoder>
disableMacPreview=1
</movDecoder>
<hotspots>
<global>
<spot id="1" url="mp3hotspot.swf" file="cityhall.mp3" repeat="0" pan="0" tilt="-0" enableSoundPannig="1" soundRadius="360" />
</global>
</hotspots>
</panorama>