PDA

View Full Version : Navigation/clip control issues...


concept84
10-24-2007, 07:15 PM
Hello all,

Here goes my first post.

I'm creating a flash site for a friend and I'm having trouble with movie clip control. I've been playing with simple example files for two weeks now and can't get anything to work right. The idea is I want clean and simple coding. Basically you click a button, some information fades and stays. When another button is clicked the old info fades out and then the new stuff fades in. This is a copy of my actionscript on one of the buttons:

on (release) {
if(_root.mc2._currentframe >= 20) {
_root.mc2.gotoAndPlay("fadeout")
}
if(_root.mc1._currentframe == 1 && _root.mc2._currentframe == 1) {
_root.mc1.gotoAndPlay("fadein")
}

}

In the real mov there would be alot more if/else statements to check the position of various move clips. I'm trying to grab the position of the other movieclips and make sure they are all at frame 1, then im trying to play the "fadein" part of the mov that coresponds to the button. Problem is that when you click one of the buttons either one or the other will happen, but not both. I think its because its checking both statements upon release and not after "fadeout" has finished playing. I need help :)

hioctane
10-29-2007, 04:33 AM
OK ...

"Problem is that when you click one of the buttons either one or the other will happen, but not both."

That's exactly how you have coded it ... The first IF statement will only trigger if the currentframe is greater than frame 19 and the 2nd IF statement will only trigger if the current frame is 1

If you're having difficulty with IF statements, consider different code on the same button instance on different frames?? Not ideal but at least it may help??

concept84
10-29-2007, 11:31 PM
Is there anyway to wait to check the second IF statement?

I can make it work, but it doesn't seem clean at all. There is alot of Flash websites out there and I have to imagine there is a common practice alot use. If anyone else has done something like this or has had the same problem, I'm begging for your insight :)