I think this is what you need.
---
angle = Math.atan2( endY - startY, endX - startX );
trainX = vectorLength * Math.cos( angle );
trainY = vectorLength * Math.sin( angle );
---
Notes:
1. I'm using atan2(), not atan().
2. The function atan2() takes (endY - startY) as its fi
I'm pretty sure there is no reflection-type functionality in AS3 to return a
method name.
Maybe you can define a bunch of string constants (perhaps even as static
members in a class you create for this purpose, to hold them in one place)
and use them as parms to addCallback().
Then you would stil
You might be able to get something out of flash.utils.describeType()
HTH,
Ian
On Mon, Aug 25, 2008 at 6:57 PM, Rob Sampson <[EMAIL PROTECTED]> wrote:
> I've been working with ExternalInterface.addCallback, and I think it's a
> drag that you have to send the name of a function as a String - it
May I ask a related question? How can I detected if a user has clicked
on a line (or later a bezier path) ? I am having the starting and ending
coordinates of this line and so also the distance.
Now I am would like to check if the user has clicked within this line
with/or without a specific radi
Hi there,
I am working on a project, for which I have made perspective movement of
thumbnails. My one side movement is working fine, but I am unable to create
to and fro movement (back & forward), as variable values don't change as
desired. Can anyone help me with this and tell me how to code this
Let's call the position of the mouse click on the stage (clickedX, clickedY)
The starting coordinates are (startX, startY)
The ending coordinates are (endX , endY)
The general equation of your line, for any variables X and Y, is:
Y == (X - startX) * (endY - startY) / (endX - startX)
So when the u
Can you please describe the problem in terms of something in Flash or
ActionScript (like variables, symbols, classes, functions) not working as
you thought it should.
Or at least which specific part of that code you posted, doesn't work as
expected.
A
On Sat, Aug 30, 2008 at 9:36 PM, Rajiv Seth
A simple solution could be to create a sprite to draw the line onto, and
add a listener to the sprite to see if it was clicked on.
Jason Merrill
Bank of America
Enterprise Technology & Global Risk L&LD
Instructional Technology & Media
Join the Bank of America Flash Platform Developer Community
Hello
I have this code to load movie and and keydown space
movie loading fine but I have problem with change the text in tit_txt is
dynamic textfield
_root.tit_txt.text = _root["tit"+num] ;
the text value always movie1 I don't know why I trace (_root["tit"+num])
it's change but the text movie 1
9 matches
Mail list logo