Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-08-2008, 11:45 AM   PM User | #1
gilgalbiblewhee
Regular Coder

 
Join Date: Mar 2005
Posts: 735
Thanks: 4
Thanked 1 Time in 1 Post
gilgalbiblewhee is an unknown quantity at this point
how to make mc go backwards

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.
Code:
on (rollOver) {
	home.gotoAndStop(5);
}
on (rollOut) {
	home.gotoAndStop(1);
}
Attached Files
File Type: zip navbar.zip (6.7 KB, 91 views)
__________________
Compare bible texts (and other tools):
TheWheelofGod
gilgalbiblewhee is offline   Reply With Quote
Old 12-09-2008, 10:53 PM   PM User | #2
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
You should use these event handlers.

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

home.onRollOut = function {
home.gotoAndStop(1);
}
__________________
jeremy - gnomeontherun
Educated questions often get educated answers, and simple questions often get simple answers.
gnomeontherun is offline   Reply With Quote
Old 12-10-2008, 01:32 AM   PM User | #3
gilgalbiblewhee
Regular Coder

 
Join Date: Mar 2005
Posts: 735
Thanks: 4
Thanked 1 Time in 1 Post
gilgalbiblewhee is an unknown quantity at this point
Quote:
Originally Posted by jeremywilken View Post
You should use these event handlers.

Code:
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.
__________________
Compare bible texts (and other tools):
TheWheelofGod
gilgalbiblewhee is offline   Reply With Quote
Old 12-10-2008, 07:35 AM   PM User | #4
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
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.
__________________
jeremy - gnomeontherun
Educated questions often get educated answers, and simple questions often get simple answers.
gnomeontherun is offline   Reply With Quote
Old 12-10-2008, 11:49 AM   PM User | #5
gilgalbiblewhee
Regular Coder

 
Join Date: Mar 2005
Posts: 735
Thanks: 4
Thanked 1 Time in 1 Post
gilgalbiblewhee is an unknown quantity at this point
Quote:
Originally Posted by jeremywilken View Post
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.
Quote:
**Error** Scene=Scene 1, layer=actions, frame=1:Line 2: Function name expected
home.onRollOver = function {

Total ActionScript Errors: 1 Reported Errors: 1
__________________
Compare bible texts (and other tools):
TheWheelofGod

Last edited by gilgalbiblewhee; 12-10-2008 at 12:18 PM..
gilgalbiblewhee is offline   Reply With Quote
Old 12-10-2008, 12:27 PM   PM User | #6
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
Oops, missed something. Also check out some information about the onrollover and onrollout events.

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

home.onRollOut = function() {
home.gotoAndStop(1);
}
__________________
jeremy - gnomeontherun
Educated questions often get educated answers, and simple questions often get simple answers.
gnomeontherun is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:48 PM.


Advertisement
Log in to turn off these ads.