Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Random Picture Movement?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
thomasrox3




PostPosted: Tue Apr 03, 2007 8:23 pm   Post subject: Random Picture Movement?

Is it possilbe to get an imaage that tweens around the screen independantly In a uniform way and not have it pop in different places?
Sponsor
Sponsor
Sponsor
sponsor
Mazer




PostPosted: Tue Apr 03, 2007 8:38 pm   Post subject: RE:Random Picture Movement?

How about instead of setting a new position for the picture, set a target poition. If the picture is not at it's target position, have it move (in a small step) towards it.
Geostigma




PostPosted: Tue Apr 03, 2007 9:13 pm   Post subject: Re: Random Picture Movement?

code:


randint(chooser,1,4)

if chooser = 1 then
randint (tweenx, 2,maxx[or any number])

for i : 1..tweenx
cls
xpos:=xpos + 10 (or w/e number)
View.Update
end for

elsif chooser = 2 then
for i : tweenx..1
cls
xpos:=xpos - 10 (or w/e number)
View.Update
end for



Thats my suggestion. See if you can adapt that to ypos. You have to have your X and Y coordinates as variables for your picture
thomasrox3




PostPosted: Wed Apr 04, 2007 9:56 am   Post subject: RE:Random Picture Movement?

Anyone with some more helpful info. I haven't worked with turing for months, so Im a bit rusty.
Cervantes




PostPosted: Wed Apr 04, 2007 10:05 am   Post subject: RE:Random Picture Movement?

If you want more information, you'll probably have to expand on your question. What exactly is the effect you want? Maybe Brownian motion would do?
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: