Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently November 8th, 2024, 8:51 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Ticker-tape/Scroller
PostPosted: September 2nd, 2007, 10:57 am 
Offline

Joined: November 3rd, 2004, 4:52 pm
Posts: 99
Location: Worcester. UK
Been trying for ages to persuade/adapt the attached imp file to accept one long continuous line of text and scroll it without a break showing. between end of line and its start.

Any suggestions would be gratefully received. Scroller imp file courtesy of Robin Garrett.

John


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


For this message JMahoney has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 2nd, 2007, 12:12 pm 
Offline
Godlike
Godlike
User avatar

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

I'd use a script. Depending on how you need it set up, simply use substring to extract part of the orginal string and concat it to the end of the original. Here's one variation:

function Scroll()
{

for (i=0;i<1000000000;i++)
{
aStr = myText.substring(1,myText.lenght)
bStr = myText.substring(0,1)
myText = aStr + bStr
wait(0.1)
}
}

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 2nd, 2007, 12:30 pm 
Offline

Joined: November 3rd, 2004, 4:52 pm
Posts: 99
Location: Worcester. UK
Thanks Mack,

Scripting is definitely not a strong point for me!

I'm trying to present (on show of a page) a single long line of text that continuously scrolls and re-scrolls without a break showing between end of the line of text and its restarting.

With your script it seems to require two lots of substrings - or am I reading it incorrectly? Not sure but I guess it requires me to set up mystring = "all the text I want to continuously show"

"simply use substring to extract part of the orginal string and concat it to the end of the original" - not sure what you are saying here given what I want to do. Think the sample imp I attached might be confusing to the reader. It uses two sets of text - I wanted to amend it to use a single text box whose contents continuosly scroll.

Bet I've confused the hell out of you now!

John


For this message JMahoney has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Example Page 1
PostPosted: September 2nd, 2007, 2:32 pm 
Offline

Joined: October 25th, 2004, 2:20 pm
Posts: 686
Location: Naperville, Illinois (USA)
Opus: 7.05
OS: Win XP SP3
System: P4 3.2GHz 1GB RAM 2-TB HDs + 4 more
John --

My first thought was to have TWO Text Objects, then I download your example and I see on Page 1 that's exactly what the creator did. Why is that not acceptable? If the text is longer than what's in this example, then you have to adjust the "Amount" under Simulatenous Action Group under the "On Show" Trigger.

_________________
Fred Harms, Extraordinary Demos
Naperville, Illinois (USA) 630/904-3636
demofred@aol.com


For this message demofred has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 2nd, 2007, 4:23 pm 
Offline

Joined: November 3rd, 2004, 4:52 pm
Posts: 99
Location: Worcester. UK
Fred,

Thanks for responding.

My piece of text is 2480 wide. So I had already tried replicating two copies of that text and adjusting the Amount as suggested. Screen text does not scroll when I test it - hence my query.

Strikes me there ought to be a simple way of getting a piece of text to repeatedly scroll across the screen! Thought I had found it - but I cannot get it to do what I want.

John


For this message JMahoney has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 2nd, 2007, 4:40 pm 
Offline
Godlike
Godlike
User avatar

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

1. Create a textbox and insert a variable called myText

2. Create an OnShow trigger. Attatch a the script action from the programming tab. Enter Scroll() in the script box.

3. Add a script object to the page. In the script editor add the following text:

Quote:
//Don't forget to create an OnShow trigger that calls the Scroll() function
function Scroll()
{

//don't forget to create a text box on screen that contains a variable called myText
myText = 'Enter your text here. '

for (i=0;i<1000000000;i++)
{
aStr = myText.substring(1,myText.lenght)
bStr = myText.substring(0,1)
myText = aStr + bStr

//Change the speed of the scroll here below.
wait(0.1)
}
}


Sorry if this oversimplifies things, but it should work. As i've got Opus VI, I wasn't sure whether it could be open in v5?

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 2nd, 2007, 5:57 pm 
Offline

Joined: November 3rd, 2004, 4:52 pm
Posts: 99
Location: Worcester. UK
Thanks Mack,

Got it working - almost (!) on first attempt.

Before the 'next' word appears spaces are shown on screen and then the word 'jumps in' and fills the spaces. Can this be overcome so each word appears letter by letter? At the moment it gives a very jerky appearance to each word as it apears.

If I'm asking too much - just ignore me and I'll accept the small miracle you have worked with good grace!

All the best.

John


For this message JMahoney has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 2nd, 2007, 6:01 pm 
Offline
Godlike
Godlike
User avatar

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

Can you post or email your version with the text your using. It's not the smoothest method, but shouldn't be too bad - not sure about the space.

I've have a look though.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 2nd, 2007, 8:27 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Update. This issue above is caused by using large sized fonts. Something to do with wrapping around to the next line. There doesn't seem to be any way around this with a textbox (?) BUT if you change to using a text input box, you can limited it to a single line.

Add an invisable frame with stop m-clicks passing through to prevent editting.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 2nd, 2007, 9:33 pm 
Offline

Joined: November 3rd, 2004, 4:52 pm
Posts: 99
Location: Worcester. UK
Mack,

Very many thanks - works perfectly. Much appreciated.

John


For this message JMahoney has been thanked by : mackavi


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 10 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