Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Tigra Scoller perform random file select
patgenie
Junior Member

Posts: 3
Registered: 11/15/2004
Member Is Offline
posted on 11/16/2004 at 01:09 AM Reply With Quote
Tigra Scoller perform random file select


Is it possible to have the direct content feature select from the list in scroll_tpl0.js randomly? I assume this would require creating an array out of the image list.
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 11/18/2004 at 10:07 AM Reply With Quote

I'm not sure I've understand you corectly.
If you want to setup value of 'content' key in template using some algorithm - why not?
ITEMS[n_item]['content'] = my_function_for_creating_content(n_item); //where n_item - index of scroller's item in ITEMS array.
Note: all modifications should be made before calling control's constructor.
View User's Profile View All Posts By User U2U Member
Bosse
Newbie

Posts: 1
Registered: 1/31/2005
Member Is Offline
posted on 1/31/2005 at 04:14 PM Reply With Quote

This is how I did it. Don't know where you at, so I might overdo the explanation...

Replace:
-----------------------------------
<script language="JavaScript">
<!-- //
Tscroll_init(0); // Or whatever # u use
// -->
</script>
-----------------------------------

with:
-----------------------------------
<?
function slotnumber()
{
srand(time());
for ($i=0; $i < 1; $i++)
{
$random = (rand()%9);
$slot[] = $random;
}
print("$slot[0]");
print("$slot[1]");
print("$slot[2]");
print("$slot[3]");
print("$slot[4]");
print("$slot[5]");
print("$slot[6]");
print("$slot[7]");
print("$slot[8]");
print("$slot[9]"); // One for every document

}
?>

<script language="JavaScript">
<!-- //
Tscroll_init(<? slotnumber(); ?>);
// -->
</script>

-----------------------------------

($i=0; tell where to start. 0 for Tscroll_init(0), 1 for Tscroll_init(1)

< 1; $i++) tell how many figures (if you have f.x. 14 documents, write 2 - IMPORTANT! You then have to name all your documents with two figures, i.e. scroll.tpl00.js, scroll.tpl01.js, scroll.tpl02.js etc. And the same with the css files.)

(rand()%9) tell the range. If you have 14 documents, it should be 13 (since 0 counts)

/Bosse
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Tigra Scroller
Product Demonstrations Live Demos:
Multiple vertical scrolling
Horizontal scrolling
Free Download Free Download
Product Documentation Documentation:
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
   
Tigra Scroller PRO
Product Demonstrations Live Demos
Vertical automatic scrolling
Horizontal manual scrolling
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004