Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: URGENT: Intelligent cursor (it points the way your mouse is going)
From: Mountain, Mike J
Date: Thu, 16 Mar 2000 11:38:14 GMT

Folks

What I'm trying to do is develop an intelligent cursor which points the
way...(see title).

This is how I'm trying to do it...basically getting the properties of an MC
called tracker....(which is locked to drag on the mouse) then assigning
those properties to a cursor, then finding an Old and new position for the
tracker/cursor and finding the difference in Co'ords between the two.

***Like so

Set Variable: "NewX" = GetProperty ("/tracker",_x)
Set Variable: "NewY" = GetProperty ("/tracker",_y)
Set Property ("/Cursor", X Position) = /:OldX
Set Property ("/Cursor", Y Position) = /:Oldy
Set Variable: x = "NewX-/:OldX"
Set Variable: y = "NewY-/:OldY"
Set Variable: "/:OldX" = NewX
Set Variable: "/:OldY" = NewY
FS Command ("x", "y")
Set Property ("/:Cursor", Rotation) = angle

***Then using an FS command I aim to pass the variables (equivalent to
cartesian co-ords) to a bit of Java script which ***works out the angle in
rads then converts it to degrees to pass back to the movie in the form
variable "angle"

***Like so

<SCRIPT LANGUAGE="JavaScript">
function theMovie_DoFSCommand(x ,y)
{
var deg = Math.atan2(x,y);
var pin = Math.PI;
var ang = (deg/pin)*180;
window.document.movie.SetVariable("angle", ang);
}

</script>

</head>

<body bgcolor="#FFFFFF">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=4,0,2,0" width="800" height="550">
<param name=movie value="OTHERF16.swf">
<param name=quality value=high>
<embed src="OTHERF16.swf" quality=high
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash" type="application/x-shockwave-flash" width="800"
height="550" name=movie swLiveConnect=true>
</embed>
</object>

***This I then use to set the angle of the cursor......

However it doesn't work, it's the first time I've tried using FS commands
and passing Javascript variables back so there's a lot of room for error -
the Javascript works (I've tested it with an alert entering co'ords through
a form). SO where am I going wrong? I'm using IE5 wor Windows95.....(not
IE4.5 on the mac so it isn't that)

Help!

Thanks in advance

Mike M



flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World�s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California

-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: URGENT: Intelligent cursor (i, Alastair Weakley

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]