|
|
Quellcode |
1 2 3 4 5 6 7 |
<action name="change_alpha_flag"> set(plugin[btn_language1].alpha, 0.5); set(plugin[btn_language2].alpha, 0.5); set(plugin[btn_language3].alpha, 0.5); wait(blend); set(plugin[%1].alpha, 1); </action> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 |
<action name="change-layout-en"> set(plugin[menu].url, %SWFPATH%/menu-en.gif); set(plugin[show-map].url, %SWFPATH%/menu-map-en.png); set(plugin[show-images].url, %SWFPATH%/menu-images-images-en.png); set(plugin[menu-background].url, %SWFPATH%/menu-background-en.png); if(plugin[btn_english].alpha == 1, infotext-en, infotext-es); </action> |
|
|
Quellcode |
1 2 3 4 5 6 7 |
<plugin name="btn_spanish" style="moduly_style" url="%SWFPATH%/btn_spain.png" alpha="0.5" onhover="showtext(Español,STYLE1);" x="80" onclick="change_alpha_flag(btn_spanish); action(change-layout-es);" /> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 |
<event onxmlcomplete="keep-layout" <action name="keep-layout"> if(plugin[btn_language1].alpha == 1, change-layout-en, ); if(plugin[btn_language2].alpha == 1, change-layout-pt, ); if(plugin[btn_language3].alpha == 1, change-layout-es, ); </action> |
|
|
Quellcode |
1 2 |
set(plugin[menu].url, %SWFPATH%/menu-background-en.gif); set(plugin[menu].zorder, 0); |
Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.com|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
<plugin name="panoaide" url="panoaide.png" autopos="center" x="0" y="0" visible="false" enabled="true" handcursor="true" capture="true" children="true" keep="false" scale="1" zorder="1" alpha="1.00" blendmode="normal" smoothing="true" onloaded="" onover="" onhover="showtext(get(txt_close));" onout="" ondown="" onup="" onclick="set(visible, false);set(plugin[aide].visible, true);set(plugin[aide1].visible, false);" /> <plugin name="panoaide_EN" url="panoaide_EN.png" autopos="center" x="0" y="0" visible="false" enabled="true" handcursor="true" capture="true" children="true" keep="false" scale="1" zorder="1" alpha="1.00" blendmode="normal" smoothing="true" onloaded="" onover="" onhover="showtext(get(txt_close));" onout="" ondown="" onup="" onclick="set(visible, false);set(plugin[aide].visible, true);set(plugin[aide1].visible, false);" /> <plugin name="panoaide_ES" url="panoaide_ES.png" autopos="center" x="0" y="0" visible="false" enabled="true" handcursor="true" capture="true" children="true" keep="false" scale="1" zorder="1" alpha="1.00" blendmode="normal" smoothing="true" onloaded="" onover="" onhover="showtext(get(txt_close));" onout="" ondown="" onup="" onclick="set(visible, false);set(plugin[aide].visible, true);set(plugin[aide1].visible, false);" /> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<plugin name="aide" url="aide.png" parent="fond" autopos="leftbottom" x="60" y="58" visible="true" enabled="true" handcursor="true" capture="true" children="true" keep="false" scale="0.60" zorder="6" alpha="1.00" onloaded="" onover="" onhover="showtext(get(txt_help));" onout="" ondown="" onup="" onclick="action(get(openaide));set(visible, false); set(plugin[aide1].visible, true);" /> <plugin name="aide1" url="aideb.png" parent="fond" autopos="leftbottom" x="60" y="58" visible="false" enabled="true" handcursor="true" capture="true" children="true" keep="false" scale="0.60" zorder="5" alpha="1.00" onloaded="" onover="" onhover="showtext(get(txt_close));" onout="" ondown="" onup="" onclick="action(get(closeaide));set(visible, false); set(plugin[aide].visible, true);" /> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
<action name="openaide"> set(plugin[panoaide].visible, true); </action> <action name="closeaide"> set(plugin[panoaide].visible, false); </action> <action name="openaide_EN"> set(plugin[panoaide_EN].visible, true); </action> <action name="closeaide_EN"> set(plugin[panoaide_EN].visible, false); </action> <action name="openaide_ES"> set(plugin[panoaide_ES].visible, true); </action> <action name="closeaide_ES"> set(plugin[panoaide_ES].visible, false); </action> <action name="francais"> set(txt_help, 'Aide'); set(openaide,'openaide'); set(closeaide,'closeaide'); set(plugin[french].alpha, 1); set(plugin[english].alpha, 0.30); set(plugin[espagnol].alpha, 0.30); </action> <action name="english"> set(txt_help, 'Help'); set(openaide,'openaide_EN'); set(closeaide,'closeaide_EN'); set(plugin[french].alpha, 0.30); set(plugin[english].alpha, 1); set(plugin[espagnol].alpha, 0.30); </action> <action name="espagnol"> set(txt_help, 'Ayuda'); set(openaide,'openaide_ES'); set(closeaide,'closeaide_ES'); set(plugin[french].alpha, 0.30); set(plugin[english].alpha, 0.30); set(plugin[espagnol].alpha, 1); </action> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
<plugin name="langue" url="langue.png" autopos="centertop,0,20" visible="true" enabled="true" handcursor="true" capture="true" children="true" keep="false" scale="0.80" zorder="10" alpha="0.90" blendmode="normal" smoothing="true" onloaded="" onover="" onhover="" onout="" ondown="" onup="" onclick="" /> <plugin name="french" url="francais.png" parent="langue" align="left" x="10%" y="0" visible="true" enabled="true" handcursor="true" capture="true" children="true" keep="false" scale="0.50" zorder="10" alpha="0.30" blendmode="normal" smoothing="true" onloaded="" onover="" onhover="showtext(Français);" onout="" ondown="" onup="" onclick="francais();" /> <plugin name="english" url="english.png" parent="langue" align="center" x="0" y="0" visible="true" enabled="true" handcursor="true" capture="true" children="true" keep="false" scale="0.50" zorder="10" alpha="0.30" blendmode="normal" smoothing="true" onloaded="" onover="" onhover="showtext(English);" onout="" ondown="" onup="" onclick="english();" /> <plugin name="espagnol" url="espagnol.png" parent="langue" align="right" x="10%" y="0" visible="true" enabled="true" handcursor="true" capture="true" children="true" keep="false" scale="0.50" zorder="10" alpha="0.30" blendmode="normal" smoothing="true" onloaded="" onover="" onhover="showtext(Español);" onout="" ondown="" onup="" onclick="espagnol();" /> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<action name="english">
set(language,english);
change-layout(-en);
change_alpha_flag(btn_english);
textbox-info
</action>
<action name="spanish">
set(language,spanish);
change-layout(-es);
change_alpha_flag(btn_spanish);
textbox-info
</action>
<action name="portugues">
set(language,portugues);
change-layout(-br);
change_alpha_flag(btn_portugues);
textbox-info
</action>
<action name="change_alpha_flag">
set(plugin[btn_portugues].alpha, 0.5);
set(plugin[btn_english].alpha, 0.5);
set(plugin[btn_spanish].alpha, 0.5);
wait(blend);
set(plugin[%1].alpha, 1);
</action>
|
|
|
Quellcode |
1 2 3 4 5 |
<action name="textbox-info"> if(language == english,set(plugin[text2].html,data:data-en)); if(language == spanish,set(plugin[text2].html,data:data-es)); if(language == portugues,set(plugin[text2].html,data:data-br)); </action> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<!-- the textfield itself -->
<plugin name="text2" url="%SWFPATH%/plugins/textfield.swf"
parent="textbox"
align="lefttop" x="20" y="20"
background="false" borderwidth="0"
html="data:data-br"
css="p{color:#000000; font-family:Arial; font-size:12;}"
autosize=""
width="220"
Height="900"
mask="textmask"
/>
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
function kr_eval_get_in_string(varname) {
var krpano=document.getElementById("krpanoSWFObject");
var content= krpano.get(varname);
var subs = content.match(/get\((?:[^()]+|\(([^()]+|\(([^()]+|(\([^()]+\)))*\))*\))+\)/g); /* deals with up to 4 sets of nested parenthesis */
var name;
var val;
var i;
for (i=0;i < subs.length;i++)
{
name=subs[i].replace(/^get\(/,"");
name=name.replace(/\)$/,"");
val=kr_resolve(name);
content=content.replace(subs[i],val);
}
krpano.set(varname,content);
}
function kr_resolve(argument) {
var krpano=document.getElementById("krpanoSWFObject");
var subs = argument.match(/get\((?:[^()]+|\(([^()]+|\(([^()]+|(\([^()]+\)))*\))*\))+\)/g); /* deals with up to 4 sets of nested parenthesis */
var name;
var val;
var i;
if (subs != null) {
for (i=0;i < subs.length;i++)
{
name=subs[i].replace(/^get\(/,"");
name=name.replace(/\)$/,"");
val=kr_resolve(name);
argument=argument.replace(subs[i],val);
}
return(krpano.get(argument));
} else {
return(krpano.get(argument));
}
}
|
Thank you Steve!!
How should I insert this code?
![]()
Quellcode
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35function kr_eval_get_in_string(varname) { var krpano=document.getElementById("krpanoSWFObject"); var content= krpano.get(varname); var subs = content.match(/get\((?:[^()]+|\(([^()]+|\(([^()]+|(\([^()]+\)))*\))*\))+\)/g); /* deals with up to 4 sets of nested parenthesis */ var name; var val; var i; for (i=0;i < subs.length;i++) { name=subs[i].replace(/^get\(/,""); name=name.replace(/\)$/,""); val=kr_resolve(name); content=content.replace(subs[i],val); } krpano.set(varname,content); } function kr_resolve(argument) { var krpano=document.getElementById("krpanoSWFObject"); var subs = argument.match(/get\((?:[^()]+|\(([^()]+|\(([^()]+|(\([^()]+\)))*\))*\))+\)/g); /* deals with up to 4 sets of nested parenthesis */ var name; var val; var i; if (subs != null) { for (i=0;i < subs.length;i++) { name=subs[i].replace(/^get\(/,""); name=name.replace(/\)$/,""); val=kr_resolve(name); argument=argument.replace(subs[i],val); } return(krpano.get(argument)); } else { return(krpano.get(argument)); } }
Daniel
|
|
Quellcode |
1 |
<script type="text/javascript" src="kr_languages.js"></script> |