View Full Version : how to make mc go backwards
gilgalbiblewhee
12-08-2008, 12:45 PM
I'm working on the Home mc in my swf file.
On rollover I want the mc to go to frame 5 in the child time frame. And on rollout to go back to 1.
on (rollOver) {
home.gotoAndStop(5);
}
on (rollOut) {
home.gotoAndStop(1);
}
gnomeontherun
12-09-2008, 11:53 PM
You should use these event handlers.
home.onRollOver = function {
home.gotoAndStop(5);
}
home.onRollOut = function {
home.gotoAndStop(1);
}
gilgalbiblewhee
12-10-2008, 02:32 AM
You should use these event handlers.
home.onRollOver = function {
home.gotoAndStop(5);
}
home.onRollOut = function {
home.gotoAndStop(1);
}
I don't know why it's not working. home is the instance of the movieclip. The mc has 5 frames. I put a stop on the 1st and 5th frame. As I rollover I want home to move in the child to the 5th frame. When I rollout I want it to go reverse to frame 1 if possible.
gnomeontherun
12-10-2008, 08:35 AM
on (release) ... is for buttons while instance.onRelease = function works with movieclips.
Where are you putting this code? Try putting it on the main timeline first frame.
gilgalbiblewhee
12-10-2008, 12:49 PM
on (release) ... is for buttons while instance.onRelease = function works with movieclips.
Where are you putting this code? Try putting it on the main timeline first frame.
It's actually a movieclip not a button. I tried pasting in the 1st frame of the main timeline but it didn't work.
**Error** Scene=Scene 1, layer=actions, frame=1:Line 2: Function name expected
home.onRollOver = function {
Total ActionScript Errors: 1 Reported Errors: 1
gnomeontherun
12-10-2008, 01:27 PM
Oops, missed something. Also check out some information about the onrollover and onrollout events.
home.onRollOver = function() {
home.gotoAndStop(5);
}
home.onRollOut = function() {
home.gotoAndStop(1);
}
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.