Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
This post has been edited 2 times, last edit by "ahoeben" (Mar 15th 2011, 4:54pm)
Quoted
I think it would be nice to make the examples like real world examples..
. I am not yet at liberty to share why I needed the vectormath plugin myself.This post has been edited 2 times, last edit by "ahoeben" (Mar 6th 2011, 6:39pm)


|
|
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 onstart="delayedcall(0.1,startticker())">
<data name="tickertape">
Your ticker text would go here. And typically it would be quite long, or why would you want a ticker in the first place?
</data>
<plugin name="tickertext" src="textfield.swf" (... positioning and styling goes here...) />
<plugin name="string" src="string.swf" />
<action name="startticker">
plugin[string].txtlength(tickertape_length, get(data[tickertape].content));
set(ticker_length,0);
set(ticker_offset,0);
delayedcall(0.25, tickertick);
</action>
<action name="tickertick">
plugin[string].txtchunk(chunk, get(data[tickertape].content), ticker_offset, ticker_length);
txtadd(plugin[tickertext].html, "[p]", chunk, "[/p]");
if(ticker_length LT 10,
inc(ticker_length);
,
if(ticker_offset LT tickertape_length,
inc(ticker_offset);
delayedcall(0.25, tickertick);
)
);
</action>
|
|
|
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
<krpano onstart="delayedcall(2,startticker())">
<data name="tickertape">
Your ticker text would go here. And typically it would be quite long, or why would you want a ticker in the first place?
</data>
<plugin name="tickertext" url="%SWFPATH%/plugins/textfield.swf"
origin="center"
width="160" height="20"
x="0" y="0"
html="SAlut"
borderwidth="1"
bordercolor="0xFFFFFF"
backgroundcolor="0xFFFFFF"
/>
<plugin name="string" url="%SWFPATH%/plugins/string.swf" />
<action name="startticker">
plugin[string].txtlength(tickertape_length, get(data[tickertape].content));
trace('tickertape_length = ',tickertape_length);
set(ticker_length,0);
set(ticker_offset,0);
delayedcall(0.25, tickertick);
</action>
<action name="tickertick">
plugin[string].txtchunk(chunk, get(data[tickertape].content), get(ticker_offset), get(ticker_length));
trace('chunk = ',chunk);
txtadd(plugin[tickertext].html, "[p]", get(chunk), "[/p]");
trace('chunk = ',chunk);
if(ticker_length LT 30,
inc(ticker_length);
delayedcall(0.15, tickertick);
,
if(ticker_offset LT tickertape_length,
inc(ticker_offset);
delayedcall(0.15, tickertick);
,
delayedcall(5, startticker);
);
);
</action>
</krpano>
|
After reading your example code, in my understanding it should be something like:
- rotatevector(destVarH, destVarV, ath1, atv1, ath2, atv2)
Sets destVarH and destVarV to align with the vector ('ath1', 'atv1') after it has been rotated by ('ath2', 'atv2')
Or...
Quoted
- rotatevector(destVarH, destVarV, destVarR, ath1, atv1, rotate1, ath2, atv2, rotate2)
Sets destVarH, destVarV and destVarR to align with the vector ('ath1', 'atv1', 'rotate1') after it has been rotated by ('ath2', 'atv2', 'rotate2')