Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 11:17 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: SCroll text by pixels
PostPosted: August 31st, 2006, 3:53 pm 
Offline

Joined: January 19th, 2005, 5:15 pm
Posts: 83
Location: Netherlands
Is there a way to scroll text by a certain amount of pixels or lines.
I know the textBox.scroll('pageDown') function, but this one is nog smooth.

I try to make a smooth scroll of exactly 2 lines each time.
Doing this with percentages is kinda confusing.
I'm trying to work it out, but somehow it doesn't really work the way i want it to...

Current script is (still in debugging stage ;-) ..):
Code:
function scrollRssDown(txtField)
{
   alert( 'doScroll' )

   // check how much is visible -> this is 2 or something lines.
   var scrInfo    = eval(txtField + ".GetScrollInfo();");
   var framePerc   = scrInfo.vvisible
   var curPos       = scrInfo.vpos
   alert( scrInfo.vvisible )
   alert( scrInfo.vpos )

   var newPos       = 100 ;
   var stepSize    = 1
   if(scrInfo.vpos < 105) {
      while(curPos < newPos) {   // for a smooth scroll
         curPos += stepSize
         eval(txtField + ".SetScrollPosition(curPos);");
         wait(0.01);
      }
   }

   var scrInfo    = eval(txtField + ".GetScrollInfo();");
   alert( scrInfo.vpos)
}


For this message Reemski has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: August 31st, 2006, 9:35 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

Brenden Knifton on the DW support team, may still have a copy of an .imp file called scroll.imp that he developed, which has some helpful ways to construct scrolls, vary speed, etc. Why not write to him at DW support or send a pm on the Forum? Perhaps, he can post it or send along a copy.

Hope this helps.

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: September 1st, 2006, 11:19 am 
Offline

Joined: October 25th, 2004, 12:32 pm
Posts: 397
Location: Digital Workshop
I no longer have the example that Stephen mentioned. Attached is a very simple example of a smother scroll. What I have done is place a text object within a frame and then used the move object action to scroll the text pixel by pixel.


Regards

Brenden Knifton


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


For this message Brenden Knifton has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 1st, 2006, 2:24 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Brenden

I've sent the scroll.imp file to you at DW support.

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: September 2nd, 2006, 1:52 pm 
Offline

Joined: January 19th, 2005, 5:15 pm
Posts: 83
Location: Netherlands
Stephen wrote:
Why not write to him at DW support or send a pm on the Forum? Perhaps, he can post it or send along a copy.


I posted this on the forum because this way other users can find this info later on.
When I receive an email with the info, no one else who later searches for it will find it.


For this message Reemski has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: September 2nd, 2006, 2:04 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

Yes, it would be a good idea to post samples on the Forum for all to use.

Since I did not create the scroll.imp file, it would not be appropriate for me to post someone else's work. Brenden Knifton, at DW, is the file's author, which to me means that he is the only person who can or cannot place it on the Forum.

I've sent him a copy of the original file that he had sent to me by email, so that he can (1) decide whether he wants to post it, and (2) if he does want to post it, to go ahead and do so.

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: September 2nd, 2006, 9:21 pm 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Here it is,
Brenden won't mind.

cheers
Paul


For this message Paul has been thanked by : mackavi


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 64 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