Action script for Flash MX
I made this swf here from the random circle motion tute though slightly adapted, and want to use it as a cursor in another movie.
The actual swf is smaller but appears bigger here for some unknown reason.
<hr>
<OBJECT classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000”
codebase=“http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0”
WIDTH=“40” HEIGHT=“40” id=“swirl” ALIGN="">
<PARAM NAME=movie VALUE=“http://www.dravos.150m.com/swirl.swf”> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src=“http://www.dravos.150m.comswirl.swf” quality=high bgcolor=#FFFFFF WIDTH=“40” HEIGHT=“40” NAME=“swirl” ALIGN=""
TYPE=“application/x-shockwave-flash” PLUGINSPAGE=“http://www.macromedia.com/go/getflashplayer”></EMBED>
</OBJECT>
<HR>
code for above is:<P>
radius=20;
degree=0;
xcenter=40;
ycenter=40;
speed=5;
function spin(ball,offset)
{
degree += speed;
radian = ((degree+offset)/180)*Math.PI;
ball._x = xcenter+Math.cos(radian)*radius;
ball._y = ycenter-Math.sin(radian)*radius;
}
_root.onEnterFrame=function()
{
spin(ball1,0);
spin(ball2,120);
spin(ball3,240);
}</P>
<HR>
OK so the movie is 800x600 and the code for that is:<P>
_root.createEmptyMovieClip(“cursor”,1);
cursor._x=40;
cursor._y=40;
loadMovie(“swirl.swf”,cursor);
_root.onEnterFrame=function()
{
startDrag(cursor,true);
Mouse.hide();
}
</P>
<HR>
So my question is how do include the first swf in the main one so that it will follow my cursor as it doesnt seem to at the moment. I think that is because the 1st swf overwrites to x/y values in the main one?? is this correct and how can i resolve this?