View Full Version : embedPano.fla problem
behrda
06-15-2007, 01:16 PM
hi denis,
I have a problem with your embedPano.fla example:
I have only changed the
panorama.loadPanorama("?panoName=images/snow");
to
panorama.loadPanorama("?panoName=images/snow&xml_file=snow.xml");
because I want to change the border(etc.) of the new panorama. But this donґt run! the first time the pano is loaded perfect but after the click on the (for example "garden")-button there is a error:
ArgumentError: Error #2025: Das angegebene DisplayObject muss ein untergeordnetes Element des Aufrufers sein.
at flash.display::DisplayObjectContainer/swapChildren()
at Hotspots/panoCreated()
at Timeline0_831a786023308c4ea146908d4b868e76/newPano()
at PanoController/PanoController::initPanorama()
at PanoController/PanoController::completeDatafile()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio n()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
have I to add code to remove the xml-file?
or is there an other possibility to make this run?
Just remember, it is important for me to activate the panorama-change form a button of the embedPano.fla!
Okay thats all :wink:
Thanks for help
jaaaab
06-15-2007, 02:38 PM
just try to set only the xml_file param in the url
you can set panoName inside xml file
++
Denis
06-16-2007, 01:16 PM
Yes.
If you load Hotspots plugin, you can remove panoramas and load them manually no more. :)
Check your XML, you have Hotspots plugin in it.
So in this case ask plugin to load the new panorama and remove the old one:
panorama.externals.hotspots.hotspots_obj.execute("loadPano(?panoName=images/snow&xml_file=navigation.xml)")
Long path, but it's universal :)
And don't forget to remove this line:
panorama.pano.remove();
It's the best way, so it allows you to use all Hotspots features like transition effects and direct control of Hotspots' objects.
behrda
06-18-2007, 12:44 PM
sorry denis, but I donґt understand where to add your code:
panorama.externals.hotspots.hotspots_obj.execute("loadPano(?panoName=images/snow&xml_file=navigation.xml)")
just instead of panorama.pano.remove(); ?
Or can you perhaps post me a cutout from the "extended" embed.fla?
And I have also an other question:
I want to set the pan of my panorama from the embedPano.fla. Which code I have to use for? I tried this one:
panorama.pano.pan = 150;
but it only updates after clicking in the panorama...:cry: and not actually, as I want :wink:
Thanx Dario
behrda
06-20-2007, 12:17 PM
Hey Denis, I think your code is just what I need!
I tried it for so much but it will not run anyway :( .
I replaced the code of doPano1-function with that:
function doPano1 (e:Event) {
if (panorama.pano.loadCompleted) {
panorama.externals.hotspots.hotspots_obj.execute("loadPano(?panoName=images/snow&xml_file=pano.xml)");
}
}
and I also loaded hotspot-plugin. But it seems impossible :wink:
Whats wrong in there?
My Error:
"TypeError: Error #1010: Ein Begriff ist nicht definiert und hat keine Eigenschaften.
at testit_fla::MainTimeline/doPano1()"
-I try to translate-
"TypeError: Error #1010: An Expression is not defined and has no property.
at testit_fla::MainTimeline/doPano1()"
I also noticed that "newLoading" the xml-File is not the best way! So is it possible to call a function which is defined in the xml(hotspot-tag,global-tag) like this,
<?xml version = '1.0'?>
<panorama>
<parameters>
panoName = images/snow
layer_2 = files/hotspots.swf
</parameters>
<hotspots>
<global LocalConnectionID="lc_test" myDone="loadPano(?panoName=images/nature,3000,fade)">
</global>
</hotspots>
</panorama>
from the embedPano.fla with this code:
panorama.externals.hotspots.hotspots_obj.execute("myDone");
Thx Dario
Denis
06-21-2007, 06:13 AM
Hey Denis, I think your code is just what I need!
I tried it for so much but it will not run anyway :( .
I replaced the code of doPano1-function with that:
function doPano1 (e:Event) {
if (panorama.pano.loadCompleted) {
panorama.externals.hotspots.hotspots_obj.execute("loadPano(?panoName=images/snow&xml_file=pano.xml)");
}
}
Yes. This is correct.
But there is is a piece of subtlety: you need the loaded Hotspots plugin before, i.e. you need to use panorama.loadPanorama("myPano.swf?xml_file=pano.xml"); as a first call (in loadComplete function).
I.e. Hotspots loaded - use panorama.externals.hotspots...
Hotspots not loaded - use panorama.pano.remove();
In common case you can use a condition: if (panorama.externals.hotspots!=null)
behrda
06-21-2007, 10:14 AM
Problem solved :D :) :D
I think there is a mistake in Denisґs code:
changing the code of doPano1-function to:
function doPano1 (e:Event) {
if (panorama.pano.loadCompleted) {
//panorama.externals.hotspots.hotspots_obj.execute("loadPano(?panoName=images/snow&xml_file=pano.xml)");
var test = panorama.externals.hotspots.getChildAt(0);
test.execute("loadPano(?panoName=images/nature&xml_file=nature.xml)");
}
}
@Denis: perhaps you gave me the wrong path? with "hotspots_obj" in it, it doesnґt run! Can you post me the right path?
happy regards
Dario
behrda
06-22-2007, 06:44 AM
I have still 2 question:
-I want to set the pan of the panorama from the embedPano.fla...
and tried this codepanorama.pano.pan=150;
but it only updates after clicking in the panorama. what can I do to update it immediately?
- while (or "during"-not sure-)moving the panorama the whole stage gets something like a "blur-effect". Is it possible to avoid this?
Thx Dario
behrda
06-22-2007, 07:46 AM
I like to write posts :wink: when I figure sth out...
pan changing is okay!: just done it with
var test = panorama.externals.hotspots.getChildAt(0);
test.execute("pano.pan = "+150);
but blur-effect on stage...?
:) Dario
testure
09-07-2007, 05:18 PM
Hotspots will still not load from the XML-file.
XML file is business2.xml
----------------------------------------------------------------
var panorama:MovieClip;
var loader:Loader = new Loader();
loader.load(new URLRequest("files/pano.swf"));
addChild(loader);
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, loadComplete);
function loadComplete (e:Event) {
swapChildren(loader, border);
panorama = loader.content;
panorama.setArea(0,0,761,532);
panorama.loadPanorama("pano.swf?panoName=images/snow");
stage.addEventListener(MouseEvent.MOUSE_UP, reset);
pano1_btn.addEventListener(MouseEvent.CLICK, doPano1);
pano2_btn.addEventListener(MouseEvent.CLICK, doPano2);
}
function reset (e:Event) {
panorama.pano.panKey = 0;
panorama.pano.tiltKey = 0;
}
function doPano1 (e:Event) {
if (panorama.pano.loadCompleted) {
panorama.pano.remove();
panorama.loadPanorama("pano.swf?panoName=images/business2&xml_file=business2");
}
}
function doPano2 (e:Event) {
if (panorama.pano.loadCompleted) {
panorama.pano.remove();
panorama.loadPanorama("pano.swf?panoName=images/business2");
}
}
seeinside360
03-08-2008, 04:58 PM
Problem solved :D :) :D
I think there is a mistake in Denisґs code:
changing the code of doPano1-function to:
function doPano1 (e:Event) {
if (panorama.pano.loadCompleted) {
//panorama.externals.hotspots.hotspots_obj.execute("loadPano(?panoName=images/snow&xml_file=pano.xml)");
var test = panorama.externals.hotspots.getChildAt(0);
test.execute("loadPano(?panoName=images/nature&xml_file=nature.xml)");
}
}
@Denis: perhaps you gave me the wrong path? with "hotspots_obj" in it, it doesnґt run! Can you post me the right path?
happy regards
Dario
ıt! not working for me.. do you have any idea? I get this message:
ReferenceError: Error #1069: Property execute not found on SpotSprite and there is no default value.
at embedPanoWithFullscreen_fla::MainTimeline/doPano2()
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.