Skip to content

Commit

Permalink
Added preload="true" to documentation and examples for string & vecto…
Browse files Browse the repository at this point in the history
…rmath.xml

Added "tickertape" to the string example
  • Loading branch information
fieldOfView committed Apr 9, 2011
1 parent 516f370 commit eb6c513
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 5 deletions.
40 changes: 38 additions & 2 deletions string/examples/string.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<krpano version="1.0.8" onstart="delayedcall(0.1,string_tests())">
<krpano version="1.0.8" onstart="string_tests(); startticker()">
<preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" />

<plugin name="string" url="../../string.swf" alturl="../../string.js" />
<plugin name="string" url="../../string.swf" alturl="../../string.js" preload="true" />

<data name="test_string">This is a long string contained in a krpano data node. This will be used for testing the plugin.</data>

Expand All @@ -24,4 +24,40 @@
plugin[string].txtchunk(chunk, get(data[test_string].content), get(position));
trace(chunk);
</action>


<plugin name="tickertext" url="%SWFPATH%/plugins/textfield.swf"
origin="center"
width="160" height="20"
x="0" y="0"
html=""
borderwidth="1"
bordercolor="0xFFFFFF"
backgroundcolor="0xFFFFFF"
/>

<action name="startticker">
plugin[string].txtlength(tickertape_length, get(data[test_string].content));

set(ticker_length,0);
set(ticker_offset,0);
delayedcall(0.25, tickertick);
</action>

<action name="tickertick">
plugin[string].txtchunk(chunk, get(data[test_string].content), get(ticker_offset), get(ticker_length));
txtadd(plugin[tickertext].html, "[p]", get(chunk), "[/p]");

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>
2 changes: 1 addition & 1 deletion string/plugin.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ <h2><a name="forum" href="#forum" class="selflink">krpano Forum Discussion Threa
<h2><a name="syntax" href="#syntax" class="selflink">Syntax / XML Usage Example</a></h2>
<pre class="xmlpre">&lt;<a href="http://krpano.com/docu/xml/#plugin">plugin</a> <a href="http://krpano.com/docu/xml/#plugin.name">name</a>="string"
<a href="http://krpano.com/docu/xml/#plugin.url">url</a>="string.swf" <a href="http://krpano.com/docu/xml/#plugin.alturl">alturl</a>="string.js"
<a href="http://krpano.com/docu/xml/#plugin.keep">keep</a>="true"
<a href="http://krpano.com/docu/xml/#plugin.keep">keep</a>="true" <a href="http://krpano.com/docu/xml/#plugin.preload">preload</a>="true"
/&gt;</pre>
</div>
<div class="paragraph">
Expand Down
2 changes: 1 addition & 1 deletion vectormath/examples/vectormath.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<krpano version="1.0.8">
<preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" />

<plugin name="vectormath" url="../../vectormath.swf" />
<plugin name="vectormath" url="../../vectormath.swf" preload="true" />

<style name="cubeface" distorted="true" enabled="false" width="1000" height="1000" alpha="0.5" />
<hotspot name="pano_f" style="cubeface" url="pano_f.jpg" ath="0" atv="0" rotate="0" visible="true" />
Expand Down
2 changes: 1 addition & 1 deletion vectormath/plugin.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h2><a name="forum" href="#forum" class="selflink">krpano Forum Discussion Threa
<h2><a name="syntax" href="#syntax" class="selflink">Syntax / XML Usage Example</a></h2>
<pre class="xmlpre">&lt;<a href="http://krpano.com/docu/xml/#plugin">plugin</a> <a href="http://krpano.com/docu/xml/#plugin.name">name</a>="vectormath"
<a href="http://krpano.com/docu/xml/#plugin.url">url</a>="vectormath.swf"
<a href="http://krpano.com/docu/xml/#plugin.keep">keep</a>="true"
<a href="http://krpano.com/docu/xml/#plugin.keep">keep</a>="true" <a href="http://krpano.com/docu/xml/#plugin.preload">preload</a>="true"
/&gt;</pre>
</div>
<div class="paragraph">
Expand Down

0 comments on commit eb6c513

Please sign in to comment.