Just a quickie

Ive got some code…

on (rollOver) {
tellTarget (“decks”) {
gotoAndPlay(6);
}
}

which is all fine and dandy. What i now want it to do is check to see if it is already on frame 6 or not… probably an ‘if/else’ kinda thing which i did ages in flash 5… now im blank. Can anyone fill in my blanks? Cheers.

[AS]on (rollOver) {
if(decks._currentframe==6){
//do your stuff
}
}
[/AS]

Oh yea since you’re in a MX forum i suppose you’re using MX, so i guess you should be using the dot stuff instead of the telltarget stuff. Just incase you don’t know, it should be (i’m guesing since i really don’t know anything about tellTarget :)):
[AS]
on (rollOver) {
_root.decks.gotoAndPlay (6)
}
[/AS]

Cheers guys, im feeling closer but there are apparantly syntax errors in this

on (rollOver) {
    if(decks._currentframe==6){
tellTarget ("decks") {
	gotoAndPlay(6);
}

}

and im afraid im not sure what youre on about with the root malarky. I use it to control the main timeline from an mc, but right here im lost…

That code makes no sense. If its already in frame 6 why gotoAndPlay(6)?

on (rollOver) {
if(decks._currentframe==6){
decks.gotoAndPlay(6);
}
}

good point claudio:thumb:

You could use something like this:

on (rollOver) {
        if(decks._currentframe==6){
                _root.ball_mc.gotoAndPlay(2); // tell ball_mc to gotoandplay its 2nd frame.
        }
}

Uhuh, I see. I need

if current frame of the target is 6, do nothing.

if it is anything else, go to and play six.

Sorry i’m being so vague. Is that even how you spell vague? Sorry.

i think it should be currentframe==!6

which i think means anything but 6.

*Originally posted by blah-de-blah *
**i think it should be currentframe==!6

which i think means anything but 6. **
Should be currentframe != 6

If anyone could take a look at this for me id be vey grateful. i just cant seem to get anything but the simple

on (rollOver) {
tellTarget (“decks”) {
gotoAndPlay(6);
}
}

to work. Its fine until you roll off of the buttons and back on to the active areas…

how’s this?

Absolutely perfect. Good man. Jesus will want you for a sunbeam.