View Full Version : Stoping rotation r any thing with mouse over
udayrrr
01-28-2009, 10:11 AM
hi i am new action script just started to learn
started with 2.0 i had small scenario
imagine any shape which is in rotating motion through motion tween
now what i what is through AS whenever i move mouse over it , it should stop rotating
thanks....
orange gold
01-28-2009, 11:24 AM
on the animation of the rotation add a new layer above it... with all blank key frames on every frame... all the way out to where your animation loops... now add another layer with this a box over the animation area called boxarea(as its instance name)... finally add another layer with this code...
_root.onEnterFrame = function() {
boxarea._alpha = 0
boxarea.onRollOver = function() {
stop();
}
}
(you need the blank keyframes so it can stop on the dot)
if you want it to resume when you roll off of it use this code
_root.onEnterFrame = function() {
boxarea._alpha = 0
boxarea.onRollOver = function() {
stop();
}
boxarea.onRollOut = function() {
play();
}
}
if all of this is too confusing attatch your fla and we will fix it up for you :)
udayrrr
01-28-2009, 12:25 PM
thanks i will try
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.