Groups | Blog | Home
all groups > flash actionscript > june 2006 >

flash actionscript : need help with rollOver


jezbennett75
6/14/2006 8:41:05 PM
I am trying to get an image to move when a user hovers over the image.
My movie is called ball_mc
i have added this code but get some errors. what am i doing wrong please?

myButton_btn.onRollOver = function() {
tweenBall(mx.transitions.easing.Bounce.easeOut);
};
function tweenBall(easeType) {
var begin = 20;
var end = 380;
var time = 20;
var mc = ball_mc;
ballTween = new mx.transitions.Tween(mc, "_x", easeType, begin, end,
time);
}


cheers
jez
LuigiL
6/14/2006 10:14:55 PM
juankpro
6/14/2006 10:33:21 PM
jezbennett75
6/15/2006 12:00:00 AM
this is the only code i have at the moment. i have created a button and called
it myButton_btn in the instance name and i have an image which is a movie clip
called myBall_mc. if i attach the code to the movie clip i get no errors in
script but when i preview it nothing happens apart from the cursor turns to a
hand. when i add the code to the timeline i get the errors.
LuigiL
6/15/2006 12:00:00 AM
[quoted text, click to view]
But in the code you refer to:
var mc = ball_mc;
So that line should be:
var mc = myBall_mc;
The code shouldn't generate errors when attached to the timeline. Please post
the errors you are getting.
jezbennett75
6/15/2006 12:00:00 AM
LuigiL
6/15/2006 2:33:34 PM
AddThis Social Bookmark Button