Reply #2 Sunday, August 27, 2006 3:55 PM
Reply #3 Sunday, August 27, 2006 4:58 PM
Are you reading from a text file? xml? Or did you plan to put the text directly in the object? I'd suggest using an external file to keep the size down.
Reply #4 Sunday, August 27, 2006 5:16 PM
Still not sure how to do this script-wise...
Reply #5 Sunday, August 27, 2006 7:53 PM
You could use an array to make a list of the facts. Then add a counter to a timer to select which fact to display. If you insert the example script below into a text object you'll see what I mean.
Dim fact(3)'---An array with 3 variables (0, 1, 2)
fact(0)= "This is fact 1"
fact(1)= "This is fact 2"
fact(2)= "This is fact 3"
Sub object_OnScriptEnter
object.settimer 1, 2000'-- two-second timer (can be adjusted)
End Sub
Sub object_OnTimer1
object.text = fact(counter)
counter = counter + 1
if counter = Ubound(fact) then counter = 0
End Sub
BTW, SirSmiley, what's this about using external files? How is that possible and how do you include those files when exporting for upload?
Reply #6 Sunday, August 27, 2006 9:49 PM
I use it for fonts.
Reply #7 Sunday, August 27, 2006 11:43 PM
Reply #8 Monday, August 28, 2006 7:19 AM
| DX allows for any number of external files to be included on the summary tab. I use it for fonts. |
An example of an embedded file:
WWW Link
| Are you reading from a text file? xml? Or did you plan to put the text directly in the object? I'd suggest using an external file to keep the size down. |
If you had a script that referenced an external file it would be easier for a non-scripting user to add their own text . . .
Reply #9 Monday, August 28, 2006 12:05 PM
Dim fact(3)'---An array with 3 variables (0, 1, 2)
fact(0)= "This is fact 1"
fact(1)= "This is fact 2"
fact(2)= "This is fact 3"
counter= 0
Sub object_OnScriptEnter
object.settimer 1, 2000'-- two-second timer (can be adjusted)
End Sub
Sub object_OnTimer1
object.text = fact(counter)
counter = counter + 1
if counter = Ubound(fact) then counter = 0
End Sub
Reply #10 Monday, August 28, 2006 12:11 PM
| BTW, SirSmiley, what's this about using external files? How is that possible and how do you include those files when exporting for upload? |
Edit: The lazy way to do the xml (if you're still learning the DOM like me) would be to get Chilkat's free XML activeX or Tortuga's activeX which can be called from within the script. Not as fast as the DOM but, for this stuff you most likely won't notice any difference.
Reply #11 Tuesday, August 29, 2006 3:29 PM

Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!







Reply #1 Sunday, August 27, 2006 3:29 PM
More info is requiered