Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 1st, 2024, 11:30 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Random frames in multiframe object
PostPosted: September 8th, 2005, 5:53 am 
Offline

Joined: November 22nd, 2004, 7:26 pm
Posts: 119
Location: Austria
Is there any way that you can have a user click on a button and it will go to a random frame in a multiframe object. It would be even better to have each frame only appear once. Is there any method (script?) that could achieve that ?

_________________
Klaus Rosmanitz
Austria


________
XP Home , Opus Pro 5.5


Top
 Profile  
 
 Post subject:
PostPosted: September 8th, 2005, 8:37 am 
Offline

Joined: October 26th, 2004, 1:26 pm
Posts: 262
Hi Klaus,

It can be done in scripting. Say you have 4 frames in the multiframe, you'd have...

var randomNum = String.random(4)

// In this example though, <randomNum> will be any integer between 0 and 3.
// Since 0 (zero) is invalid for a frame number, it gets incremented by 1 as follows...

var randomNum = String.random(4)
MultiFrame_1.ToFrame(randomNum++)


There is a problem of random() giving the same number again, so you'd have to modify to suit, or perhaps some OpusScripting experts can advise better on my example. I hope my example is correct! (fingers crossed :mrgreen:)

Hope this helps anwyay! :D

_________________
Cheers,
Steve


Top
 Profile  
 
 Post subject:
PostPosted: September 8th, 2005, 11:04 am 
Offline

Joined: November 11th, 2004, 1:43 pm
Posts: 172
Location: Buckinghamshire, UK
see article
viewtopic.php?t=34&highlight=random


Top
 Profile  
 
 Post subject:
PostPosted: September 8th, 2005, 7:48 pm 
Offline

Joined: November 22nd, 2004, 7:26 pm
Posts: 119
Location: Austria
Thanks a lot !

The article helps perfectly to solve what I need :D

_________________
Klaus Rosmanitz
Austria


________
XP Home , Opus Pro 5.5


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group