HTML5 and Copy and Pasting of graphics?

Richard Gaskin ambassador at fourthworld.com
Fri Sep 22 15:41:24 EDT 2017


JOHN PATTEN wrote:

 > I am pretty sure I did a copy and paste from card 2 to card 1 in a
 > HTML5 project.  I may have been dreaming though :)
 >
 > I have two cards. First card has a button with this script:
 >
 > on mouseUp
 > copy grc "circle" of cd 2
 > do paste
 > set the loc of last grc of cd 1 to 100,100
 > end mouseUp
 >
 > The second card has a blue circle graphic.
 >
 > I save this out as an html5 project load it into on-rev. 
(http://jpatten.on-rev.com/circletest/circletest.html 
<http://jpatten.on-rev.com/circletest/circletest.html>)
 >
 > And it does not work???

When I load that here I see only a single button, which does nothing 
when I click.  I do not see any graphic, nor any means of navigating to 
other cards.


 > HTML5 does not allow for copy and past of grcs from one card to
 > another?

I don't know, but that won't stop me from guessing. :)

My hunch would be that using both the copy and paste commands would not 
work, because IIRC the HTML export runtime does not currently work with 
the system's clipboard.

That said, using the copy option which lets you specify a destination, e.g.:

   copy grc "cricle" to cd 2

...may work because that method doesn't affect the system clipboard.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list