Problems with if statement

Hello again,

is something like this possible?

if (_root.count2 == “europe”) {
_root.gotoAndPlay(“contactscene2.home.europe”);
}

contactscene2 is a scene
home is a mc
and europe is name of a framelabel,

doesn’t won’t to work here…

puzzle puzzle puzzle

m.

_root.contactscene2.home.gotoAndPlay(“europe”)

=) works ?

Try _root.home.gotoAndPlay(“europe”)

Can you attach files so we can see how it is set up? That would help.

[edit]mlk: You can’t target scenes like that since they are not symbols[/edit]

gracias amigo!
I knew it was something simply like that!!! argl
m.

The file is rather big…but I can make screenshots would that help?!

m.

here we go, I stripped the file, so hopefully this still will make sense now.

thx,

m.

Ok, well I would of needed both scenes, but I have an idea.

Frame 1 of this scene with the home clip, add these actions…

[AS]home.gotoAndPlay(_global.what);[/AS] Also right click on that frame and open the properties then give it a frame label of “contact”. Then your if statement would go something like this [AS]if (_root.count2 == “europe”) {
_global.what = “europe”;
_root.gotoAndPlay(“contact”);
}[/AS] That will assign the value of “europe” to the _global variable we called what (_global variables save on having to target) and then it will gotoAndPlay the frame with the frame label of “contact” (Flash isn’t go great with targetting scenes for gotoAndPlay, but frame labels work just peachy) And then on that frame you will gotoAndPlay the frame label that is contained the _global.what variable.

ok, here is what I did…

but (for explanatory reasons) what I’m trying to do…

I have this contact scene. One part of the navigation tells the home mc to go to different positions and hsow different content. But to have smooth transitions while navigating somewhere else, I want the home mc to play the animation back to its original point so it can go smoothly to the content.

Then there is another part of the navigation, which should tell the home mc to play the current animation to the end, and then play to a transition part for another scene…

m.

Ok, so if I understand correctly, remove [AS]home.gotoAndPlay(_global.what);
[/AS] from Frame 1 of the contact scene and slap [AS]this.gotoAndPlay(_global.what);[/AS] on frame 15 inside the home clip. That way when that frame gets reached it will then gotoAndPlay the proper frame label. :wink:

BTW: Love the look and feel of this :thumb:

I am so darn confused now…(been sitting in front of the screen since 8h)…but I think this is the way to go! I have to experiment a little more with it and then see how I can work this out…

thanks a lot,

m.

btw. glad you like the look and feel, I hope I can finished it any time soon… but you can have sneak preview here. www.muchostylez.com/.draft

Very nice, I like it :slight_smile:

I hope everything works out for you.