Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently November 14th, 2024, 4:47 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: On Show random placement of an object
PostPosted: April 11th, 2007, 4:15 am 
I have an object which is initially hidden. On show, the object performs this Simultaneous Action Group: (i) plays a sound which is determined by a variable from a selection of sounds; (ii) bounces around the page; and (iii) spins. The object is synched to the animation end, at which point the sound is stopped, and the object is hidden.

All this works as expected.

I would like to have the animation start from a different page position when the object responds to an On Show trigger. Preferably, I would would like the starting position to be randomly determined.

I'm no expert in OpusScript, but I feel that the solution might lie with the use of SetPosition(), but I have no idea of how (or even "if") I can set up variables to determine the X and Y settings, and then incorporate them into SetPosition(). :?

Does anyone have a suggestion?


Top
   
 
 Post subject: Magic Balls
PostPosted: April 11th, 2007, 9:33 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Morning Sentosa,

Yes this is quite easy to do using a script.

Ball.SetPosition(String.random(801), String.random(601), 0, 0 )


the above string is an OnShow action for the Ball not the page. When it appears, the ball is plaaced anywhere from 0 - 800 on the X and 0 - 600 on the Y.

The first 0 is how lon it takes to get there and the second 0 is how long it waits before moving.

Have included the ILM.


You do not have the required permissions to view the files attached to this post.


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 11th, 2007, 9:39 am 
Thank you for that.

You have saved me hours of frustrating :( and more than likely fruitless work. :cry:

Thanks again :D


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group