mouseUp event on mobile
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
mouseUp event on mobile
I have actions for a field object based on event mouseUp. This works in the IDE, but not on mobile environment. Is there a different event that should be used for mobile environments?
Re: mouseUp event on mobile
If you don't need multitouch but just single touch, I thing that you could use mouseUp, mouseDown, mouseMove and so on.. can you post the code that don't works, maybe depends on the properties of the field? Is it editable?
PS
Search for touch in the dictionary for mobile specific interactions
PS
Search for touch in the dictionary for mobile specific interactions
Re: mouseUp event on mobile
found the issue. i am creating the images on the fly, and the object script disappears upon destroy/resize. now to figure out how to programatically add event code to object scripts...
Re: mouseUp event on mobile
Hi Steve,
most of the time it is not necessary to set a script at runtime.
You could either use the messagePath and put your mouseUp script at (for example) card level:
in the card script:
on mouseUp
-- check if an image has been touched
if word 1 of the name of the target is "image" then
-- do stuff
end if
end mouseUp
or (more elegantly) set a behavior. Script needs to be in a button. Then on creation of the image set the behavior of image "theImage" to the long ID of button "theBehavior"
Hope that helps,
Malte
most of the time it is not necessary to set a script at runtime.
You could either use the messagePath and put your mouseUp script at (for example) card level:
in the card script:
on mouseUp
-- check if an image has been touched
if word 1 of the name of the target is "image" then
-- do stuff
end if
end mouseUp
or (more elegantly) set a behavior. Script needs to be in a button. Then on creation of the image set the behavior of image "theImage" to the long ID of button "theBehavior"
Hope that helps,
Malte
Re: mouseUp event on mobile
Very helpful indeed!