Old 05-27-2009, 08:15 PM   #1 (permalink)
Junior Member
 
Join Date: May 2009
Posts: 2
Default jumping to random thumb onLoad

I was wondering if there is a way to have the scroller pic a random thumb and center it on load. I added:

line 131 - firstPic=random(5);
line 156 - if(items==firstPic) mc.onRelease();

to HScroller.as and that works fine for randomly selecting any of the 5 thumbs that are showing in the hScroller after it loads. But I want to be able to access any of the thumbs regardless of whether they are showing or are masked on load.

I hope this makes sense.

tx
davoflav is offline   Reply With Quote
Old 05-30-2009, 08:41 PM   #2 (permalink)
OYXLUSFlash.com Staff Member
 
Adrian's Avatar
 
Join Date: May 2008
Posts: 2,260
Send a message via Yahoo to Adrian Send a message via Skype™ to Adrian
Default

Try inserting after line 140 which looks like

Code:
var n:XMLNode = node.firstChild;
this line of code for picking a random thumb:

Code:
firstPic = random(node.childNodes.length);
Adrian is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:57 PM.