Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

Zephyr

Profi

  • »Zephyr« ist der Autor dieses Themas

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

1

Montag, 24. November 2008, 11:20

keeping 2 plugins while removing others

I have 2 plugins I want to keep at every
panorama,but the Still plugin, I want only at a specified location, and dissapear
when I move to another one. The still plugin is a just a shell and
loads throught a parameter, the specified file. Thats why It's loaded
in global.xml (this file is loaded first, and through an action it
loads the panorama xml.) So everything defined in global.xml can be
accessed from other xmls. this allows for lesser bulk lines to be coded
and easier access to plugins. Here's a fast sketch:


global.xml
onstart("loadpano(%SWFPATH%/bolfoto/location_1.xml, null, KEEPBASE|KEEPPLUGINS,BLEND(1));")
<plugin name="firsstill" url="still.swf?file=jpg/1.swf" keep="false" /> //first still
<plugin name="secondstill" url="still.swf?file=jpg/2.swf" keep="false" /> //second still
<plugin name="gui" url="plugins/gui.swf" keep="true"/>
<action name="showimage"> set(plugin[%1].visible,true); </action>
<action name="hideimage"> set(plugin[%1].visible,false); </action>
location_1.xml

<hotspot name="info_helmi" ath="-105" zoom="true" atv="30"
url="../images/billboard2.png" onclick="action(showimage,firsstill);"
/>

click on another hotspots, loads location 2
location_2.xml

ALWAYS KEEP GUI plugin

HIDE firsstill/thirdstill or whatever still that is visible

<hotspot name="info_helmi" ath="-105" zoom="true" atv="30"
url="../images/billboard2.png" onover="" onout=""
onclick="action(showimage,secondstill);" />

In short: I want to keep global.xml actions and other global stuff defined in there and I want to keep the GUI.swf (this has interface stuff in it, so it must not be reloaded, it has to stay). But I want to call the image through the still.swf plugin through a hotspot click and remove the plugin (hide it), by either @ load of another location or manually closed by the user through a click.

Atm I run a hideallimages action when ever I call a loadpano function. the hideimagesfunction has all the names of all the stills im using. This doesn't seem very optimized (calling the action whenever I change pano, and defining all the images).

2

Montag, 24. November 2008, 13:27

Hi,

what do you think about - define the still plugins in the locations xml?
and when loading this xml file use the MERGE parameter instead of KEEPPLUGINS,
then it should work as you described,

a other possiblitiy would be to add and remove plugins/hotspots with actions:
http://krpano.com/docu/actions/#addplugin

best regards,
Klaus

Zephyr

Profi

  • »Zephyr« ist der Autor dieses Themas

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

3

Montag, 24. November 2008, 14:07

Thank you, that worked :) I focussed too much in keeping all the non-hotspot stuff in 1 xml, that I overcomplicated things. Putting it in seperate xml files, setting keep="false" and MERGE worked just fine :)

Ähnliche Themen