Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Scrolling text: Changing text color, etc.

5 views
Skip to first unread message

Bill

unread,
Jan 23, 2010, 7:32:51 AM1/23/10
to
Hi:

I have scrolling text in Mathematica 6.0.1, using Animate:


Animate[Dynamic@
Row[RotateLeft[{C, a, l, c, u, l, u, s, " ", III, ",", " ", P, g, " ", 109,
" "}, cc]], {cc, 0, 33, 1}, AnimationDirection -> Forward,
AnimationRepetitions -> 2]

How can I make the scrolling letters to be red, and bold? I tried Style[ ], but without success.


Thanks,

Bill


PS. Win XP on a pc.

Bob Hanlon

unread,
Jan 24, 2010, 5:44:16 AM1/24/10
to

Animate[Dynamic@Row[
RotateLeft[
Style[#, Bold, Red] & /@

{C, a, l, c, u, l, u, s, " ", III,
",",
" ", P, g, " ", 109, " "},
cc]],
{cc, 0, 33, 1},
AnimationDirection -> Forward,
AnimationRepetitions -> 2]

Animate[Dynamic@Row[
RotateLeft[
Style[#, Bold, Red] & /@

Characters["Calculus III, Pg 109 "],


cc]],
{cc, 0, 33, 1},
AnimationDirection -> Forward,
AnimationRepetitions -> 2]

Animate[Dynamic@Row[
RotateLeft[
Thread[
Style[Characters["Calculus III, Pg 109 "],
Bold, Red]],


cc]],
{cc, 0, 33, 1},
AnimationDirection -> Forward,
AnimationRepetitions -> 2]


Bob Hanlon

---- Bill <WDWNO...@aol.com> wrote:

=============

David Park

unread,
Jan 24, 2010, 5:44:49 AM1/24/10
to
This works for me:


Animate[Dynamic@
Style[Row[


RotateLeft[{C, a, l, c, u, l, u, s, " ", III, ",", " ", P, g, " ",

109, " "}, cc]], 16, Red, Bold], {cc, 0, 33, 1},


AnimationDirection -> Forward,
AnimationRepetitions -> 2]


David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/

magma

unread,
Jan 25, 2010, 5:07:32 AM1/25/10
to
Building on David Park's idea, but without the animation gear (and
splitting the blanks):

cc = 0
Dynamic@Style[


Row[RotateLeft[{C, a, l, c, u, l, u, s, " ", III, ",", " ", P, g,

" ", 109, " ", " ", " "}, cc]], 16, Red, Bold]
Do[cc = i; Pause[.1], {i, 100}]

Bob Hanlon

unread,
Jan 25, 2010, 5:10:19 AM1/25/10
to

Even though Paneled and AnimatorElements are not listed options for Animate (and they are highlighted in Red), they nevertheless work (at least on my platform version). This is very fragile since in a future version they could legitimately filter these unsanctioned options. Also, eliminating the appearance of the control requires that the cell be reevaluated for each sequencing of the animation.

$Version

7.0 for Mac OS X x86 (64-bit) (February 19, 2009)

Animate[Row[


RotateLeft[
Thread[
Style[
Characters["Calculus III, Pg 109 "],

Bold, Red]],
cc]],
{{cc, 0, ""}, 0, 33, 1},
AnimationDirection -> Forward,
AnimationRepetitions -> 2.01,
Paneled -> False,
AnimatorElements -> None]


Bob Hanlon

---- wdwno...@aol.com wrote:

=============

Hi Bob:

Thanks.

Is there a way to get rid of the animate panel, and just display the
scrolling text?


Thanks again,

Bill


Bill

unread,
Jan 26, 2010, 6:24:57 AM1/26/10
to
Hi:

Thanks to everyone who assisted me with the scrolling text problem.

How might the code be modified to show the text stopped for approximately 3 seconds in the beginning,
then scroll the text for 2 repetitions, then stop, displaying the text without scrolling?


Thanks,

Bill

Mathematica 6.0.1 on a pc with Win XP.

0 new messages