TextFX_Unscramble + CSS formatting

Frost
Hello guys,

I just registered here to see if I could find some more direct answers to my specific problem.
Sorry if this is already covered somewhere else but after searching through the forums I found no useful results.

So, after fiddling around with the Quest 5 software for a couple days now, I ran into what I think is a syntax (?) problem.

I have a section of my gamebook project which displays a text with the Unscramble efx. It looks cool except I want to push it further and customize it with CSS style properties so I can display it inside a table/change it's color/background color. I'm not really sure how this is achieved tho...

Here's the relevant script:
<script type="script"><![CDATA[
ClearScreen
TextFX_Unscramble ("__4__2__6__3__", 500, 1)
msg ("<br/>Numbers and characters flash on the screen, revealing a code!")
]]></script>


I want to add this to the text:
<table style="color:white;text-align:center;width:100%;height:50px;background-color:black"><tr><td>  MY TEXT HERE  </td></tr></table>

jaynabonne
The only way I can see to do it is to bypass the built-in assumptions of TextFX_Unscramble and call things yourself:


s = "<table style=\"color:white;text-align:center;width:100%;height:50px;background-color:black\"><tr><td>"
s = s + "<span id=\"unscramble1\">__4__2__6__3__</span>"
s = s + "</td></tr></table>"
msg(s)
JS.eval("$('#unscramble1').unscramble(500,1)")

Note that I just arbitrarily picked "unscramble1" as the id for the span. You can use whatever you like. You also don't have to break the string into three lines like I did, but that seemed saner to me. :)

See if that works for you.

Frost
Thank you, kind sir! That seems to do the trick.

I was missing the breaking down of the function with Java. Cheers!

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums