Hi all.
So i was watching the video lesson on how to use the accelerometer.
I can't understand what the item 1 and item 2 of the Loc is.
add (pX * kSensitivity) to item 1 of theLoc
subtract (pY * kSensitivity) from item 2 of theLoc
if item 1 of theLoc < 0 then put 0 into item 1 of theLoc
if item 1 of theLoc > the width of this card then put the width of this card into item 1 of theLoc
put max(0, item 2 of theLoc) into item 2 of theLoc
put min(item 2 of theLoc, the height of this card) into item 2 of theLoc
Is it the pX and Py or something else ?
Question about item 1 and item 2 on accelerometer
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 8
- Joined: Fri Mar 28, 2014 2:47 pm
Re: Question about item 1 and item 2 on accelerometer
Hi apprentice12,
Put this in your card script
You will see the Loc of the mouse, two numbers, it's x and y location.
Simon
Please look up "location" in the dictionary. item 1 is distance from the left , item 2 is distance from the top of your card.I can't understand what the item 1 and item 2 of the Loc is.
It is the px and py.Is it the pX and Py or something else ?
Put this in your card script
Code: Select all
on mouseMove
put the mouseLoc
end mouseMove
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 8
- Joined: Fri Mar 28, 2014 2:47 pm
Re: Question about item 1 and item 2 on accelerometer
Thanks ! You are the best !