Widget usage examples
jonathandlynch at gmail.com
jonathandlynch at gmail.com
Mon Mar 20 13:01:59 EDT 2017
Hi Herman,
To get the base64encoded data to work for an image in the browser widget, don't forget the following line in LC:
Replace linefeed with empty in tBase64data
When you export an image to a variable and then base64encode the variable, LC adds in extra linefeeds. They have to be removed to work in the browser widget.
Does that help?
Sent from my iPhone
> On Mar 20, 2017, at 8:53 AM, hh via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> Correction.
>
> My widget usage example (Ken-Burns-Effekt)
> http://forums.livecode.com/viewtopic.php?p=152547#p152547
> misses one feature I have announced:
>
> The images list is currently only working if you use image files from
> a server (may be also a local server). My variant for local files was,
> not in the stack yet, to translate local URLs of the form "file://"
> into a data source of the form "data:image/png;base64,...").
> But this doesn't work coreectly, as it is, with the current javascript.
> As this should be a clean example, the original by John @ Toymakerlabs
> only changed in parameter settings, this kind of "local loading" is
> delayed to a future usage example. Sorry.
>
> *** But this works for a usage without a (local) server: ***
>
> Hit the button "COPY" while the show (adjusted to your taste) is running
> and write the clipboard (= the htmltext of the widget) out to a local
> ".html"-file. Then use images from a folder relative to that file (server
> is also allowed):
> You can for setting image pathes and descriptions edit the html file at about
> line 500. Then set the URL of your widget to that local file ("file://...").
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list