Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Playclip Near Mousehead?



hello there -

I have this movieclip with a little line that rotates (kind of like a leaf but in place) that is played when rolled over - the code is the folowing:

function playClip(event:Event):void{
event.target.play();
}

function createGrid():void{
for (var i:int = 0; i<2; i++){
for (var j:int = 0; j<2; j++){
/*var _line_mc:MovieClip = new line_mc();
_line_mc.addEventListener(MouseEvent.MOUSE_OVER, playClip);
addChild(_line_mc);*/

var _new_one:MovieClip = new new_one();
_new_one.x = (_new_one.width * i) + 30;
_new_one.y = (_new_one.height * j) + 30;
_new_one.addEventListener(MouseEvent.MOUSE_OVER, playClip);
addChild(_new_one);
}
}
}

createGrid();


Here is my question :Is there a way of playing the Clips when they are in a 50 0r 100px radius of the mouse?
Ihave no idea how to do this ....

thanks for any help!



FlashKit > Flash Help > Actionscript 3.0
Posted on: 06-10-2008, 01:20 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

    Copyright © 2005-08 www.BigResource.com, All rights reserved