|
|
Source code |
1 |
add(plugin[button].y,get(plugin[button].y),10) |
|
|
Source code |
1 |
add(plugin[button].y,plugin[button],10) |
|
|
Source code |
1 2 |
add(dest,get(plugin[button].y),10); set(plugin[button].y,dest); |
|
|
Source code |
1 2 3 |
add(dest,get(plugin[button].y),10); trace(dest); set(plugin[button].y,dest); |
... If some one can explain it will be very appreciated. |
|
Source code |
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 |
<krpano version="1.0.7" >
<style name="buttonstyle"
url="%SWFPATH%/plugins/textfield.swf" children="false"
width="120" height="22"
css="p{color:#000000; font-family:Arial; font-weight:bold; font-size:14; margin-left:5; margin-right:5; text-align:center; }"
backgroundcolor="0xFFFFFF" roundedge="5" shadow="1" borderwidth="0" glow="4" glowcolor="0xFFFFFF"
visible="false"
onover="tween(alpha,0.7,distance(0.3,0.2));"
onout="tween(alpha,1.0,distance(0.3,0.2));"
onloaded="set(alpha,0);set(textblur,15);set(blur,15); set(visible,true); tween(alpha,1,0.3); tween(textblur,0,0.3); tween(blur,0,0.3);"
/>
<plugin name="pluginToMove" keep="true" style="buttonstyle"
html="[p]move Y by 10[/p]"
align="bottom" x="0" y="250"
onclick="action(move);"
/>
<action name="move">
add(dest,get(plugin[pluginToMove].y),10);
trace(dest);
set(plugin[pluginToMove].y,dest);
trace(get(plugin[pluginToMove].y));
</action>
</krpano>
|
This post has been edited 1 times, last edit by "michel" (Sep 23rd 2009, 7:50am)
The set(plugin[button].y,dest); must be set(plugin[button].y,get(dest));|
|
Source code |
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 |
<krpano version="1.0.8" >
<style name="buttonstyle"
url="%SWFPATH%/plugins/textfield.swf" children="false"
width="120" height="22"
css="p{color:#000000; font-family:Arial; font-weight:bold; font-size:14; margin-left:5; margin-right:5; text-align:center; }"
backgroundcolor="0xFFFFFF" roundedge="5" shadow="1" borderwidth="0" glow="4" glowcolor="0xFFFFFF"
visible="false"
onover="tween(alpha,0.7,distance(0.3,0.2));"
onout="tween(alpha,1.0,distance(0.3,0.2));"
onloaded="set(alpha,0);set(textblur,15);set(blur,15); set(visible,true); tween(alpha,1,0.3); tween(textblur,0,0.3); tween(blur,0,0.3);"
/>
<plugin name="pluginToMove" keep="true" style="buttonstyle"
html="[p]move Y by 10[/p]"
align="bottom" x="0" y="250"
onclick="action(move);"
/>
<action name="move">
add(dest,get(plugin[pluginToMove].y),10);
trace(dest);
set(plugin[pluginToMove].y,get(dest));
trace(get(plugin[pluginToMove].y));
</action>
</krpano>
|

Hi,But then I do not understand why, when I use set(plugin[button].y,dest); , trace(get(plugin[button].y)); gives back the correct value. *attention* *blink*

|
|
Source code |
1 2 3 4 5 6 |
<action name="move">
add(new_variable,get(plugin[pluginToMove].y),10);
trace(new_variable);
set(plugin[pluginToMove].y,get(new_variable));
trace(get(plugin[pluginToMove].y));
</action>
|