[ widget that turns text horizontal ]

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[ widget that turns text horizontal ]

BNig
in the spirit of letting thousand widgets bloom: here is a simple widget that turns text horizontally.

the widget to install in "My Livecode" -> "extensions"
----------------------------------
http://berndniggemann.on-rev.com/turnwidget/turnText.zip
----------------------------------

as widget within HTML5 see
----------------------------------
http://berndniggemann.on-rev.com/turn/turnkurt.html
----------------------------------

tested with LC 8.0.0 to LC 8.1.0 DP1

see help file how to install widget and sample stack included in the zip.


Thanks to Trevor for showing an example of transform in his blog
----------------------------------
http://www.bluemangolearning.com/livecode/2015/04/creating-a-busy-indicator-in-livecode-builder/
----------------------------------

and thanks to Hermann for help with the math.

Kind regards
Bernd
Reply | Threaded
Open this post in threaded view
|

Re: [ widget that turns text horizontal ]

Richmond Mathewson-2
Clever, clever stuff!

Congratulations.

Richmond.

On 29.05.2016 13:15, BNig wrote:

> in the spirit of letting thousand widgets bloom: here is a simple widget that
> turns text horizontally.
>
> the widget to install in "My Livecode" -> "extensions"
> ----------------------------------
> http://berndniggemann.on-rev.com/turnwidget/turnText.zip
> ----------------------------------
>
> as widget within HTML5 see
> ----------------------------------
> http://berndniggemann.on-rev.com/turn/turnkurt.html
> ----------------------------------
>
> tested with LC 8.0.0 to LC 8.1.0 DP1
>
> see help file how to install widget and sample stack included in the zip.
>
>
> Thanks to Trevor for showing an example of transform in his blog
> ----------------------------------
> http://www.bluemangolearning.com/livecode/2015/04/creating-a-busy-indicator-in-livecode-builder/
> ----------------------------------
>
> and thanks to Hermann for help with the math.
>
> Kind regards
> Bernd
>
>
>
> --
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/widget-that-turns-text-horizontal-tp4705280.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: [ widget that turns text horizontal ]

BNig
Thank you Richmond,

just taking babysteps into widgets.

Oh, and if you installed the widget and want to get rid of it use "Tools" -> "Extension Manager"

Kind regards
Bernd


RM wrote
Clever, clever stuff!

Congratulations.

Richmond.

On 29.05.2016 13:15, BNig wrote:
> in the spirit of letting thousand widgets bloom: here is a simple widget that
> turns text horizontally.
>
> the widget to install in "My Livecode" -> "extensions"
> ----------------------------------
> http://berndniggemann.on-rev.com/turnwidget/turnText.zip
> ----------------------------------
>
> as widget within HTML5 see
> ----------------------------------
> http://berndniggemann.on-rev.com/turn/turnkurt.html
> ----------------------------------
>
> tested with LC 8.0.0 to LC 8.1.0 DP1
>
> see help file how to install widget and sample stack included in the zip.
>
>
> Thanks to Trevor for showing an example of transform in his blog
> ----------------------------------
> http://www.bluemangolearning.com/livecode/2015/04/creating-a-busy-indicator-in-livecode-builder/
> ----------------------------------
>
> and thanks to Hermann for help with the math.
Reply | Threaded
Open this post in threaded view
|

Re: [ widget that turns text horizontal ]

Wprothero
Bernd:
Nice widget. I thought it would be interesting to make an animated text line display effect using this. Maybe there are better ways. I tried to get it to turn automatically and just watch for the turnAngle, but I couldn’t get it to start turning, from my script unless I set the turnAngle explicitly.

Any suggestions?
Bill

But, I did:
on mouseUp
   showTheText "This is Bills text"
end mouseUp

local curAngle
local isTurning

on showTheText tText
   set the turnAngle of widget "turnText" to 270
   put 270 into curAngle
   set the displayText of widget "turnText" to tText
   --set the turnSpeed  of widget "turnText" to 2
   put TRUE into isTurning
   doTheTurn
end showTheText

on doTheTurn
   put the turnAngle of widget "turnText" into curAngle
   if curAngle > 360  then
      put false into isTurning
   else
      send "addTurn" to me in 0.02 seconds
   end if
end doTheTurn

on addTurn
   add 5 to curAngle
   set the turnAngle of widget "turnText" to curAngle
   if isTurning then
      doTheTurn
   end if
end addTurn




> On May 29, 2016, at 10:29 AM, BNig <[hidden email]> wrote:
>
> Thank you Richmond,
>
> just taking babysteps into widgets.
>
> Oh, and if you installed the widget and want to get rid of it use "Tools" ->
> "Extension Manager"
>
> Kind regards
> Bernd
>
>
>
> RM wrote
>> Clever, clever stuff!
>>
>> Congratulations.
>>
>> Richmond.
>>
>> On 29.05.2016 13:15, BNig wrote:
>>> in the spirit of letting thousand widgets bloom: here is a simple widget
>>> that
>>> turns text horizontally.
>>>
>>> the widget to install in "My Livecode" -> "extensions"
>>> ----------------------------------
>>> http://berndniggemann.on-rev.com/turnwidget/turnText.zip
>>> ----------------------------------
>>>
>>> as widget within HTML5 see
>>> ----------------------------------
>>> http://berndniggemann.on-rev.com/turn/turnkurt.html
>>> ----------------------------------
>>>
>>> tested with LC 8.0.0 to LC 8.1.0 DP1
>>>
>>> see help file how to install widget and sample stack included in the zip.
>>>
>>>
>>> Thanks to Trevor for showing an example of transform in his blog
>>> ----------------------------------
>>> http://www.bluemangolearning.com/livecode/2015/04/creating-a-busy-indicator-in-livecode-builder/
>>> ----------------------------------
>>>
>>> and thanks to Hermann for help with the math.
>
>
>
>
>
> --
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/widget-that-turns-text-horizontal-tp4705280p4705285.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Http://es.earthednet.org
Reply | Threaded
Open this post in threaded view
|

Re: [ widget that turns text horizontal ]

BNig
Bill:

in its most simple form you could script in a button

---------------------------------------------
local sTurning = false

on mouseUp
   if sTurning = false then
      put true into sTurning
      put "This is Bills text" into tText
      set the displayText of widget "turnText" to tText

      -- turnText it is a property, you script "set the <property> to value
      set the turnText of widget "turnText" to true  
   else
      put false into sTurning
      set the turnText of widget "turnText" to false
   end if
end mouseUp
---------------------------------------------

if that is what you want. It just turns the text until you click on the button again.
While it is turning you can change other properties like text or speed or textSize using different buttons. Look at the code of the sliders.

If you wanted it to turn by setting the angle I could give you a different script.

Kind regards
Bernd





Wprothero wrote
Bernd:
Nice widget. I thought it would be interesting to make an animated text line display effect using this. Maybe there are better ways. I tried to get it to turn automatically and just watch for the turnAngle, but I couldn’t get it to start turning, from my script unless I set the turnAngle explicitly.

Any suggestions?
Bill

But, I did:
on mouseUp
   showTheText "This is Bills text"
end mouseUp

local curAngle
local isTurning

on showTheText tText
   set the turnAngle of widget "turnText" to 270
   put 270 into curAngle
   set the displayText of widget "turnText" to tText
   --set the turnSpeed  of widget "turnText" to 2
   put TRUE into isTurning
   doTheTurn
end showTheText

on doTheTurn
   put the turnAngle of widget "turnText" into curAngle
   if curAngle > 360  then
      put false into isTurning
   else
      send "addTurn" to me in 0.02 seconds
   end if
end doTheTurn

on addTurn
   add 5 to curAngle
   set the turnAngle of widget "turnText" to curAngle
   if isTurning then
      doTheTurn
   end if
end addTurn
RH
Reply | Threaded
Open this post in threaded view
|

Re: [ widget that turns text horizontal ]

RH
In reply to this post by BNig
Wow, great. ))) Unfortunately in my Chrome Browser in Android latest
version Samsung S7 the HTML version only loads but then hangs.

Not supported yet?
On May 29, 2016 12:54, "BNig" <[hidden email]> wrote:

> in the spirit of letting thousand widgets bloom: here is a simple widget
> that
> turns text horizontally.
>
> the widget to install in "My Livecode" -> "extensions"
> ----------------------------------
> http://berndniggemann.on-rev.com/turnwidget/turnText.zip
> ----------------------------------
>
> as widget within HTML5 see
> ----------------------------------
> http://berndniggemann.on-rev.com/turn/turnkurt.html
> ----------------------------------
>
> tested with LC 8.0.0 to LC 8.1.0 DP1
>
> see help file how to install widget and sample stack included in the zip.
>
>
> Thanks to Trevor for showing an example of transform in his blog
> ----------------------------------
>
> http://www.bluemangolearning.com/livecode/2015/04/creating-a-busy-indicator-in-livecode-builder/
> ----------------------------------
>
> and thanks to Hermann for help with the math.
>
> Kind regards
> Bernd
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/widget-that-turns-text-horizontal-tp4705280.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Roland Huettmann - Babanin GmbH - Switzerland www.babanin.com / roh@babanin.com
Reply | Threaded
Open this post in threaded view
|

Re: [ widget that turns text horizontal ]

BNig
Hi Roland,

I tried the HTML5 only in latest Firefox and Safari on a desktop, both worked. I don't know about Chrome Browser in Android, nor did I try an iDevice.

Do other HTML5 Stacks work in Chrome on Android?

http://forums.livecode.com/viewtopic.php?f=120&t=25210

(links to websites with HTML5 stacks)

Kind regards
Bernd

RH wrote
Wow, great. ))) Unfortunately in my Chrome Browser in Android latest
version Samsung S7 the HTML version only loads but then hangs.

Not supported yet?
On May 29, 2016 12:54, "BNig" <[hidden email]> wrote:

> in the spirit of letting thousand widgets bloom: here is a simple widget
> that
> turns text horizontally.
>
> the widget to install in "My Livecode" -> "extensions"
> ----------------------------------
> http://berndniggemann.on-rev.com/turnwidget/turnText.zip
> ----------------------------------
>
> as widget within HTML5 see
> ----------------------------------
> http://berndniggemann.on-rev.com/turn/turnkurt.html
> ----------------------------------
>
> tested with LC 8.0.0 to LC 8.1.0 DP1
>
> see help file how to install widget and sample stack included in the zip.
>
>
> Thanks to Trevor for showing an example of transform in his blog
> ----------------------------------
>
> http://www.bluemangolearning.com/livecode/2015/04/creating-a-busy-indicator-in-livecode-builder/
> ----------------------------------
>
> and thanks to Hermann for help with the math.
Reply | Threaded
Open this post in threaded view
|

Re: [ widget that turns text horizontal ]

Wprothero
Bernd:
What I was thinking was like a text fly-out. With your widget, it would just start from invisible and expand out from the center and stop without turning. Thinking of a presentation/slide show type system that would be more interesting that just text on a screen. What I would really love is one of those applications that shows the hand drawing on the screen. They’re pretty "old hat" now, but not in livecode.

Best,
Bill

> On May 29, 2016, at 12:10 PM, BNig <[hidden email]> wrote:
>
> Hi Roland,
>
> I tried the HTML5 only in latest Firefox and Safari on a desktop, both
> worked. I don't know about Chrome Browser in Android, nor did I try an
> iDevice.
>
> Do other HTML5 Stacks work in Chrome on Android?
>
> http://forums.livecode.com/viewtopic.php?f=120&t=25210
>
> (links to websites with HTML5 stacks)
>
> Kind regards
> Bernd
>
>
> RH wrote
>> Wow, great. ))) Unfortunately in my Chrome Browser in Android latest
>> version Samsung S7 the HTML version only loads but then hangs.
>>
>> Not supported yet?
>> On May 29, 2016 12:54, "BNig" &lt;
>
>> bernd.niggemann@
>
>> &gt; wrote:
>>
>>> in the spirit of letting thousand widgets bloom: here is a simple widget
>>> that
>>> turns text horizontally.
>>>
>>> the widget to install in "My Livecode" -> "extensions"
>>> ----------------------------------
>>> http://berndniggemann.on-rev.com/turnwidget/turnText.zip
>>> ----------------------------------
>>>
>>> as widget within HTML5 see
>>> ----------------------------------
>>> http://berndniggemann.on-rev.com/turn/turnkurt.html
>>> ----------------------------------
>>>
>>> tested with LC 8.0.0 to LC 8.1.0 DP1
>>>
>>> see help file how to install widget and sample stack included in the zip.
>>>
>>>
>>> Thanks to Trevor for showing an example of transform in his blog
>>> ----------------------------------
>>>
>>> http://www.bluemangolearning.com/livecode/2015/04/creating-a-busy-indicator-in-livecode-builder/
>>> ----------------------------------
>>>
>>> and thanks to Hermann for help with the math.
>
>
>
>
>
> --
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/widget-that-turns-text-horizontal-tp4705280p4705297.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Http://es.earthednet.org
Reply | Threaded
Open this post in threaded view
|

Re: [ widget that turns text horizontal ]

BNig
Bill,

I apparently completely misunderstood what you wanted to do.

here is a script that I hope is close to what you have in mind.

Please watch out for line breaks in the script due to text wrapping

----------------------------------------------------------------
local sTurning = false
local sDegree, sAngleStep, sSizeOfText, sEndSizeOfText, sTextIncrease

on mouseUp
   if sTurning = false then
      put true into sTurning
      put "This is Bills text" into tText
      put 220 into sDegree -- change to start at different angle
      put 3 into sAngleStep -- change to change speed
      put 22 into sSizeOfText  -- can be higher than sEndOfText -> decreasing
      put 40 into sEndSizeOfText -- set this to sSizeOfText to stop size change
     
      put (sEndSizeOfText - sSizeOfText)/((360-sDegree)/sAngleStep) into sTextIncrease
      lock screen
      set the displayText of widget "turnText" to tText
      set the turnAngle of widget "turnText" to sDegree
      set the sizeOfText of widget "turnText" to sSizeOfText
      unlock screen
      send "showTheText" to me in 0 milliseconds
   else
      put false into sTurning
   end if
end mouseUp

on showTheText
   if sTurning then
      if sDegree > 360 then
         set the turnAngle of widget "turnText" to 360
         set the sizeOfText of widget "turnText" to sEndSizeOfText
         put false into sTurning
         exit showTheText
      end if
      lock screen
      set the turnAngle of widget "turnText" to sDegree
      set the sizeOfText of widget "turnText" to  trunc (sSizeOfText)
      unlock screen
      add sAngleStep to sDegree
      add sTextIncrease to sSizeOfText
      send showTheText to me in 20 milliseconds
   end if
end showTheText
----------------------------------------------------------------

change what is indicated in the comments to customize

Kind regards

Bernd

Wprothero wrote
Bernd:
What I was thinking was like a text fly-out. With your widget, it would just start from invisible and expand out from the center and stop without turning. Thinking of a presentation/slide show type system that would be more interesting that just text on a screen. What I would really love is one of those applications that shows the hand drawing on the screen. They’re pretty "old hat" now, but not in livecode.
Reply | Threaded
Open this post in threaded view
|

Re: [ widget that turns text horizontal ]

BNig
In reply to this post by Wprothero
Bill,

as a proof of principle for "hand drawing on the screen" in Livecode see

http://forums.livecode.com/viewtopic.php?f=7&t=22575&hilit=+whiteboard

with sample stacks

Kind regards
Bernd

Wprothero wrote
Bernd:
........
 What I would really love is one of those applications that shows the hand drawing on the screen. They’re pretty "old hat" now, but not in livecode.
Reply | Threaded
Open this post in threaded view
|

Re: [ widget that turns text horizontal ]

Wprothero
Bernd,
Thanks. I got it.
One thing about whiteboard animations I’ve seen is that the hand that is supposedly drawing on the board, for text anyway, moves so fast you can’t see whether it is actually following the text or not. At least this is true for smaller font sizes. I’ll check out the drawing stack. What would be needed for line drawings is a way to enter the line drawing, then edit it, then the hand could easily follow the lines.

Best,
Bill

> On May 30, 2016, at 1:10 AM, BNig <[hidden email]> wrote:
>
> Bill,
>
> as a proof of principle for "hand drawing on the screen" in Livecode see
>
> http://forums.livecode.com/viewtopic.php?f=7&t=22575&hilit=+whiteboard
>
> with sample stacks
>
> Kind regards
> Bernd
>
>
> Wprothero wrote
>> Bernd:
>> ........
>> What I would really love is one of those applications that shows the hand
>> drawing on the screen. They’re pretty "old hat" now, but not in livecode.
>
>
>
>
>
> --
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/widget-that-turns-text-horizontal-tp4705280p4705316.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Http://es.earthednet.org