
Welcome Guest
|
#1
|
||||
|
||||
|
mouse tracer/follow doesnt work
i wrote this code for a movieclip "dragger1" to go to wherever the mouse is placed on the movieclip "mcBase1".
the instance dragger1 is placed in the instance mcBase1 code: Actionscript:
function mcDrag():Void{
for(var sName:String in mcBase1){
//dragger1 is the instance name of the object i want to follow the mouse
//mcBase1 is the name of the movieclip work area
while( mcBase1.dragger1._x != mcBase1._xmouse ) {
while( mcBase1.dragger1._y != mcBase1._ymouse ){
if(mcBase1.dragger1._x<mcBase1._xmouse){
mcBase1.dragger1._xmouse++;
}
else{
mcBase1.dragger1._xmouse--;
}
if(mcBase1.dragger1._y<mcBase1._ymouse){
mcBase1.dragger1._ymouse++;
}
else{
mcBase1.dragger1._ymouse--;
}
}
}
}
}
mcDrag();the problem is whenever i test the movie , i get an error: "A script in this movie is causing the flash player to run slowly. If it continues to run your computer may become unresponsive.Do you want to abort the script?" is the code causing so much CPU overhead ?cant figure it out, help needed !
__________________
.. Creativity is the defeat of Habit by Originality .. |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Brainstorm: Making mouse pointer work as a flashlight | maxM | Flash CS3 / Flash 9 |
2 | 09-26-2008 09:53 AM |
| Mouse over effect doesn't work | wizart | Flash MX |
3 | 03-02-2007 08:07 AM |
| local mouse postion | chris12295 | Flash MX ActionScript |
1 | 06-02-2004 12:01 AM |
| Interesting Question.........maybe...... | Av | General Flash | 86 | 09-24-2002 10:11 AM |
| the diffrence between task and work | Gargoyle | Members Cafe |
7 | 09-19-2002 11:50 PM |

Programming Languages

?

