Quoting Pedja <[EMAIL PROTECTED]>:
> Just had a bet in the pub I can get the previous script shorter:)))
> It's using vector maths (not sure how quick it is but it's shorter code)
>
>
> on getNearest pList,pCenter
> pStartVector = vector(pCenter[1],pCenter[2],0)
> pCount = pList.count
> --
These are all great workarounds but the functionality of the component isn't
behaving as it did in DMX2004 v10.1, and was wondering if other people are
having the same experience or if it's just my system config.
It's not just you, there are similar reports in the forums and if you
check Tom
Thanks for the replies.
These are all great workarounds but the functionality of the component isn't
behaving as it did in DMX2004 v10.1, and was wondering if other people are
having the same experience or if it's just my system config.
My work computer is running 10.1.1 and my laptop is running 1
I'm partial to the latter...
On Apr 11, 2006, at 5:38 PM, Valentin Schmidt wrote:
instead of
s.setCallback(s, "click", #click, me)
the shorter
setCallback(s, "click", #click) -- both s and me omitted
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks
Set the member's eventPassMode to passAlways using the Flash
Component tab of the Property Inspector, and implement a mouseUp
handler instead of click.
either that, or use code like
on beginSprite me
s = sprite(me.spriteNum)
s.setCallback(s, "click", #click, me)
end
on click me
put "click"
Since updating my Director MX 2004 from 10.1 to 10.1.1 the built in Flash
Components (check box, button, etc.) no longer respond to their events when
behaviors are attached to catch them. Has anyone had any issues like this?
Set the member's eventPassMode to passAlways using the Flash
Compon
On Tue, 11 Apr 2006 21:41:33 +0200, Valentin Schmidt <[EMAIL PROTECTED]>
wrote:
but this means you first have to convert your poibnts to vectors, so it
doesn't make sense if all of the points change all the time.
Hey,
I took Valentin's code and threw in the point to vector conversion just
Just had a bet in the pub I can get the previous script shorter:)))
It's using vector maths (not sure how quick it is but it's shorter code)
on getNearest pList,pCenter
pStartVector = vector(pCenter[1],pCenter[2],0)
pCount = pList.count
if pCount > 0 then
pNearest = 0
repeat with y
on getNearestPoint aListOfPoints, aRefPoint
...
end
depending on the exact characteristics of your project, you might be
able to speed up the process of finding the minimal distance (as
proposed by rob) by using vectors (with z=0) instead of points, and
their distanceto method. but this means
This is accurate...not sure about the speed but can't optimise it more as
I'm in the pub at the moment...
put the stuff below in a movie script and call getNearest with your point
list and mouseLoc
Make sure to check that the return value (pNearest) is not 0 (zero)
Like:
nearestPoint = getNearest
quick hacky solution - apols, but on the way out :p
you could divide up the screen into rects and have a list of points
within each division which will cut down your search.
e.g if inside(the mouseloc, rect1) then
check distance using pythag between your mouseloc and the points in
your subl
Hi Tim,
Just off the top of my head this might get you started (email lingo, watch
for typos)
on getNearestPoint aListOfPoints, aRefPoint
d = the maxInteger
tWhichPoint = 0
repeat with i in aListOfPoints
a = aRefPoint[1] - i[1]
b = aRefPoint[2] - i [2]
c = a*a + b*b
if c
Hi Guys,
I'm hoping someone can help me out with a quick pointer, I've got a
tight deadline and my minds gone a bit blank.
I have a list of points
[point(112,456), point(12,485), ...] list goes to about 50
These are actually co-ordinates of certain pixels on my stage.
I need to find the cl
Hello List,
Since updating my Director MX 2004 from 10.1 to 10.1.1 the built in Flash
Components (check box, button, etc.) no longer respond to their events when
behaviors are attached to catch them. Has anyone had any issues like this?
1. create a new movie
2. add a flash button component fro
I've got an odd problem. I have a Flash sprite with an editable field
in it. On the Mac, if I use the keys from the subject line, they work
as expected - they move the cursor to the appropriate place. On Win
(XP, that is - haven't tested other flavors yet), however, an "unknown
char" box gets i
15 matches
Mail list logo