Here I?m trying to build a If statement for a small navigation. I have 4 movies.swf at 4 levels. On level0 there?s a backgroundSound playing (mySound1) I have movieClip "buttons" thats start mySound4 and mySound5 onRollOver and onRollOut in "myFourthMovie.swf", on level4. Here?s the strange thing thats happends: a. onRollOver everything is ok b. onPress ? nothings happens c. onRollOut ? mc1 disappear and mySound4 is playing uninterruptedly Im only want mySound4 to stop and start mySound5 at the same time as a new popUp i displaying on the screen. 1. THE CODE IN THE FIRST FRAME in myFourthMovie.swf on level4 : stop(); mySound4 = new Sound(this.SoundPlaceholder4); mySound5 = new Sound(this.SoundPlaceholder5); mySound4.attachSound("field"); mySound5.attachSound("fadeout"); _root.mc1.onRollOver = function(){ _root.mc1.mc2.gotoAndPlay(2); mySound4.start(0, 0); }; _root.mc1.onRollOut = function() { _root.mc1.mc2.gotoAndPlay("fade"); mySound4.stop(); mySound5.start(0, 0); }; 2. THE CODE IN THE "FADE" FRAME (frame 92) if (fadeout = true) { //PopUp shovs a short animation before a new movie loads //in the main timeline _root.McBeginLoad.play(); //Sets mc1 to "invisible" and hide the mc1 below PopUp _root.kund1.gotoAndStop(2); } :-) /Now I?m tired and confused
Thanks!!! for your answer!! :-) (But it didn?t work.)
::oOuups, sorry did not cut and past all the code. I was so tired. Here is the completed code: 1. THE CODE IN THE FIRST FRAME in myFourthMovie.swf on level4 : stop(); mySound4 = new Sound(this.SoundPlaceholder4); mySound5 = new Sound(this.SoundPlaceholder5); mySound4.attachSound("field"); mySound5.attachSound("fadeout"); _root.mc1.onRollOver = function(){ _root.mc1.mc2.gotoAndPlay(2); mySound4.start(0, 0); }; _root.mc1.onRollOut = function() { _root.mc1.mc2.gotoAndPlay("fade"); mySound4.stop(); mySound5.start(0, 0); }; //The missing part of the code _root.mc1.onPress = function() { mySound4 = fadeout; fadeout = true; _root.mc1.mc2.gotoAndPlay("fade"); }; 2. THE CODE IN THE "FADE" FRAME (frame 92) if (fadeout== true) { //PopUp shovs a short animation before a new movie loads //in the main timeline _root.McBeginLoad.play(); //Sets mc1 to "invisible" and hide the mc1 below PopUp _root.kund1.gotoAndStop(2); }
[quoted text, click to view] > if (fadeout = true) {
should be if (fadeout == true) { or better still if (fadeout) { Jeckyl
then you've stuffed up somewhere else as well ... For a start, look for other places you've use '=' instead of '==' (and vice versa) its hard to tell from what you've shown exactly what you've done wrong. -- All the best, Jeckyl [quoted text, click to view] "highlander_1" <webforumsuser@macromedia.com> wrote in message news:crsaj1$ff3$1@forums.macromedia.com... > Thanks!!! for your answer!! :-) > > (But it didn?t work.) > > Oh my GOD help me - what?s wrong..
btw: I see no code where 'fadeout' is set (to true or false or anything else). So it will be undefined. Sounds like you've not shown all your code, or your code is not yet complete. -- All the best, Jeckyl
Thanks Sorry I?m insecure - its my first If-statement:o But I?m gonna change that and control all of my code with tracert.
what on earth are you trying to do here... mySound4 = fadeout; fadeout = true; mySound is a sound, and fadeout is a true/fals value .. what assign a true/false value to something that is supposed to be a sound? It sounds ( :-) ) like you are a bit confused in your coding or your naming of things. -- All the best, Jeckyl
Don't see what you're looking for? Try a search.
|