Tools : Freehand

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
problème
Posts: 77
Joined: Fri Oct 23, 2015 12:03 am

Tools : Freehand

Post by problème » Thu Nov 26, 2015 3:20 pm

Hello
I have a image "i" and a graphic curve "gc" do with the tool freehand.
I put in the script of image

Code: Select all

on mouseUp
   move image "i" to the points of graphic "gc" in 5 seconds
end mouseUp
It's work correctly, but when i put this code in a command in the card script, i don't see the image to move.

in the card script

Code: Select all

on preOpenCard
  moveOnGraphic
end preOpenCard

command moveOnGraphic
  move image "i" to the points of graphic "gc" in 5 seconds
  --send "moveOnGraphic" to me in 250 milliseconds 
end moveOnGraphic

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: Tools : Freehand

Post by bn » Thu Nov 26, 2015 3:32 pm

Hi problème,

try on opencard

preOpencard is sent before the card is visible and available for doing things, the user should not see. Like rearranging objects etc.

openCard is sent when the card is visible. What you do now is visible to the user.

from the dictionary
Handle the preOpenCard message to update a card's appearance before the card appears on screen.

Comments:
The preOpenCard message is sent before the openCard message. Unlike openCard, preOpenCard handlers are executed before the card appears. Because of this, the preOpenCard handler is a good place to put code that adjusts the size, position, and appearance of objects; the changes are made before the card appears.
Kind regards
Bernd

problème
Posts: 77
Joined: Fri Oct 23, 2015 12:03 am

Re: Tools : Freehand

Post by problème » Thu Nov 26, 2015 3:52 pm

I solved the problem i have add "without waiting" at the end

command ....
move image "i" to the points of graphic "gc" in 5 seconds "without waiting"
end ....
Last edited by problème on Thu Nov 26, 2015 4:00 pm, edited 1 time in total.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: Tools : Freehand

Post by bn » Thu Nov 26, 2015 4:00 pm

I just tried this in a new stack with your code in the card script
and on opencard

It works perfectly.

Maybe I don't understand the what and where of your setup.

Kind regards

Bernd

problème
Posts: 77
Joined: Fri Oct 23, 2015 12:03 am

Re: Tools : Freehand

Post by problème » Thu Nov 26, 2015 4:09 pm

i have to add "without waiting" to make it work.
Thanks for the help

Post Reply