Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

navigation animation problem 1

Status
Not open for further replies.

wakkoguy

Technical User
Oct 30, 2001
84
US
i am doing navigation for a webpage in flash and ran into a problem.

here's the link to view it.
Here's the problem: When you place the cursor
over the logo it does the animation.
but then when you move to a button it goes away
how do i fix that?
thanx for your help!
and any color/design advice would be appreciated
 
did you put the animated movie clip in the over state of the button?..if so take it out..1st frame of the animated clip should be blank with a stop action..add this code to your button

on (rollOver) {
_root.yourmc.gotoAndPlay(2)
}

make sure the last frame of your animated movie clip has a stop action..make sure you name the instance of the animated clip the same as the name of the mc in your script inside the button..ie:eek:nce you drag the movie clip onto the main timeline..goto your instance panel and name the mc...
logo.gif


carlsatterwhite@orlandomediasolutions.com
 
i am new to action script, where am i supposed to insert the code? in scene 1 or in editing the symbol (which state)?
i tried it in the scene mode and it wont let me do any
on (rollOver) commands
so i went to edit the symbol and it wont let me insert any code there. how do i do it? also i have 6 movie clips playing there, so do i have to do a script for each one?
 
could u also explain what _root means
thanx
 
_root is the main point in your movie...

When making movie clips and stuff like that, say you want your main movie to move to a frame, instead of the movie clip that you are in...you would use something like

With (_root)[gotoandplay (2)
]

(of course there may be syntax errors, etc....but its just an example.)

That way, when your using the command gotoandplay...it doesn't make the movie clip you are in go and play frame 2, it makes the root movie play frame 2. Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
anthony?..stop adding to the confusion with code that is crap..

wakkoguy this is what you want to do...take all 6 of your mc's and put them into one mc..assuming that all six mc's will start at frame 1 and end in there last frame with a stop action..then taking all 6 of those and placing them into one movie clip..each one on it's on layer..helps keep track..now, the first frame of the mc that holds them all should be blank, with a stop action (thus hiding the animations in the main movie untill the logo is rolled over)..frame 2 is where the 6 animations will start there run to the end..frame 2 will also have a stop action..so you have all 6 mc.s playing there animation to the end..stop action in the last frame..all 6 of those in a two frame mc..1st frame blank, stop action..2nd frame holds the 6mc's all on there on layer..now your logo i think it was should be converted to a symbol (button)..right click on the button and pull up the actions pallet..

on (rollOver) {
_root.yourmc.gotoAndPlay(2)
}
thats it for the button (your logo)..now take the mc that holds the 6 and drag it into the main timeline, name it in the instance panel what you called it in the actions in the buttons script..i reccomend you call that mc "holder"..so your buttons actions would be:

on (rollOver) {
_root.holder.gotoAndPlay(2)
}

now the only other thing you have to do is line up the mc holder so that it is the right place when it plays the animations..

good luck...

logo.gif


carlsatterwhite@orlandomediasolutions.com
 
Not to add to the confusion... But trying to answer Wakkoguy's question on _root!

_root is the main movie's level, in any given .swf. You could also use _level0, results would be same.
In fact, since each individual .swf has it's own _root level, using _level0 is even better!

Consider a movie in which you load another .swf on another level, _level5 for example. Supposed that inside this loaded movie you have a movie clip from which you want to target the main movie on _level0... Well, in this case you would have to use _level0, otherwise, if you used _root, you would target the main timeline of the swf loaded on level 5 which holds this mc, and not the main movie on _level0.

Hope this clears things up a bit!

Regards,
mywink2.gif
ldnewbie
 
hey guyz! thanx so much for helping me out but now i have another problem, how do i get the animation to disappear once the cursor is moved from the logo? so it goes back to normal?
 
on (rollOut){
_root.mcs.gotoAndStop(1);
}
...But then your picture button will disappear!

Regards,
mywink2.gif
ldnewbie
 
is there a way to do it so my buttons won't disappear?
 
here i sent you this in your mail as well..was having a hard time sending the post..tek-tips locks up on me some times, so you got the same thing in your mail..


on roll over of the logo you want the animations to play and your buttons show up..why would you want them to dissapear after the mouse rolls off the logo..do you want just the lines to dissapear and the buttons to stay?.if that be the case put the line movie clips in one mc..and the buttons in another..however long the line animations are is how many blank frames you will have in the buttons mc untill the buttons show up..so if your line animations are say 10 frames long..your buttons will not show up untill the tenth frame in there mc..so you have a holder mc which has your line animations..you have a buttonholder mc which houses your buttons..that mc also has a blank 1st frame with a stop action..your buttons actions will now be:

on (rollOver) {
_root.holder.gotoAndPlay(2)
_root.buttonholder.gotoAndPlay(2)
}
on (rollOut){
_root.holder.gotoAndStop(1);
}

this way on roll over of the logo it calls both mc's..the line animations and the buttons..so on roll over your line animation mc is called, it starts playing..also the button mc is called but it is playing through the blank frames untill it gets to where the line animations stop and they need to show up..then they are there..on roll out of the logo we are telling the line mc to go away leaving the buttons mc on the stage..

make sense?..
logo.gif


carlsatterwhite@orlandomediasolutions.com
 
ok now i'm so confused!
i am posting my fla at

what i want it to do is when the mouse is placed over the 412 logo the lines come out and go to buttons (i have accomplished this) i want the lines to stay there as the cursor moves to choose a navigation button. but once the cursor is totally removed from either the buttons or the 412 logo i want the whole thing to be played in reverse so the navigation buttons disappear and the lines go back into the logo (getting played backwards) and i want everything to be gone except for the logo. does that make sense? thank you guyz so much for working with a newb like me! and putting time into this!
 
off to do some things..if no one gets to it i will when i get in later tonight...
logo.gif


carlsatterwhite@orlandomediasolutions.com
 
Can I just ask one question!
What happens if someone presses on one of those navigation buttons, should all this reverse thing happen before the called action on the button is executed?

Sometimes, it does help to think ahead!

Regards,
mywink2.gif
ldnewbie
 
if someone presses a button it should go to the link, the reverse thing should happen only when the cursor is absolutley off of everything
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top