PDA

View Full Version : The versatility of a Paragraph-Object



mystica
08-01-2009, 12:50 AM
I've always been a big fan of the Paragraph-Object ... it's so versatile! You can use it for so many different things. Apart from just being a paragraph on your page, you can use it as: a button, a hyperlink, an embedded-hyperlink, a frame or border, and a hotspot. And I'm sure there's more I haven't thought of.

So, this example's for the newbies ... how to get the most out of a Paragraph-Object. Hope it's of help to somebody, somewhere!

Commands demonstrated:
-Page.CreateObject
-properties tables
-TextFile.WriteFromString
-TextFile.ReadToString

PS.
If you can think of another way to use the Paragraph-Object, let's hear about it!

Imagine Programming
08-01-2009, 08:12 AM
3D Text :D A paragraph containing white text, and behind that a paragraph containing the same text but black. The position, X and Y, + 1 pixel.

:p

ShadowUK
08-01-2009, 08:27 AM
local Text = [[Hey look this is animated and this example is awesome.]];

for Position = 1, String.Length(Text) do
Paragraph.SetText("Paragraph1", string.sub(Text, 0, Position));
Application.Sleep(10);
end

mystica
08-01-2009, 08:44 AM
local Text = [[Hey look this is animated and this example is awesome.]];

for Position = 1, String.Length(Text) do
Paragraph.SetText("Paragraph1", string.sub(Text, 0, Position));
Application.Sleep(10);
end

Hey, that is awesome! I notice that if you set the text postion to "centre" instead of "left", it animates to both the left and right.
Thanks Shadow ... that one's going straight to the pool-room! :D

mystica
08-01-2009, 09:27 AM
An example of ShadowUK's awesome animated paragraph-object:

Imagine Programming
08-01-2009, 09:28 AM
...and this example is awesome.

haha :p nice one indeed :yes