...

View Full Version : how to make mc go backwards



gilgalbiblewhee
12-08-2008, 11:45 AM
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, 10:53 PM
You should use these event handlers.


home.onRollOver = function {
home.gotoAndStop(5);
}

home.onRollOut = function {
home.gotoAndStop(1);
}

gilgalbiblewhee
12-10-2008, 01: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, 07: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, 11:49 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.

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, 12: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);
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum