5 Replies Latest reply on Jun 18, 2007 7:08 AM by stsleeper94

    2 Part Question : Stop movie animation/Load movie animation

    stsleeper94
      Okay I am a VBA guy and taking on a project in Flash. So 72 hours into it I am going nuts on a simple problem = P. I read a tutorial from http://www.echoecho.com/flashbuttons02.htm about how to make animated buttons. All went well, I was able to DL the FLA and really see the inner workings. However. When I mouse over I want the move to play but not loop. I can't get it to stop. I want my button to go from black to alpha 20% and stay on mouse out, 20% alpha - black. That code on the site makes it loop, which is very unappealing. (Also in the FLA they use grouped graphics, what the advantage to that?)

      So second part. In my button I would like the "down" to enable another .swf to open and play on the other half of my page setup. Am I coding onpress() on the down part of the button or elsewhere in the FLA.

      I wanted to attack my fla file but i guess you can't. regardless if ppl need to see more of what I am doing then I can host it on my site. I figured this is pretty basic stuff that once I know I will get it.

      http://www.alexrat.netfirms.com/portfolio/teevo/teevo.htm - This is a site that I liked. It has the nice buttons like I am trying to build and then on mouse clicks it changes the other side of the page. That is what I am aiming for.
        • 2. Re: 2 Part Question : Stop movie animation/Load movie animation
          Damon Edwards Level 3
          instead of having a button.. place a black rectangle on stage with whatever text you want the button to say on top of it, then select both and create new Movie Clip.. on frame 1 insert stop();.. on frame lets say 10 (can be whatever) make keyframe, and make the the assets 20% alpha, also put a stop(); action on the frame..
          now back to the main timeline, click your new Movie Clip, give it instance name of whatever ex: my_mc.. add this to actions layer
          my_mc.onRollOver = function() {
          gotoAndPlay(2);
          }
          my_mc.onPress = function() {
          container_mc.loadMovie("your.swf"); //container_mc is blank Movie Clip on stage
          }
          • 3. 2 Part Question : Stop movie animation/Load movie animation
            stsleeper94 Level 1
            "actions layer"

            What do you mean by this. In my button set up I applied (see below) to the button. Animation was my instance name for the movie. And I see that your adding play movie to another "blank" movie frame. Container_mc. Is this container need to be anything special as well. Another layer? or just another clip withing the same layer.

            on (rollOver) {
            if (Number(dummy) == 0) {
            tellTarget ("/animation") {
            play();
            }
            }
            dummy = 1;
            }
            on (rollOut) {
            dummy = 0;
            }


            Your code if insereted into the scence 1 frame 1 does nothing. What am I missing (most likely something simple but still at a lose)

            Thank you very much for replying though
            • 4. Re: 2 Part Question : Stop movie animation/Load movie animation
              Damon Edwards Level 3
              like i said, completely take out your button now.. then place a black rectangle on stage with whatever text you want the button to say on top of it, then select both and create new Movie Clip.. on frame 1 insert stop();.. on frame lets say 10 (can be whatever) make keyframe, and make the the assets 20% alpha, also put a stop(); action on the frame..
              now back to the main timeline, click your new Movie Clip, give it instance name of whatever ex: my_mc..
              now place this code on the main time line on a keyframe, not on the movie clip, on a keyframe, my guess is it will be frame one.
              my_mc.onRollOver = function() {
              my_mc.gotoAndPlay(2);
              }
              my_mc.onPress = function() {
              container_mc.loadMovie("your.swf");
              }
              //container_mc is blank Movie Clip on stage.. all this means is to create a movie clip with nothing in it, place it on stage and give it an instance name of container_mc... this is what your swf will be loaded into.

              im giving a link to an example.. if you click frame 1 of the 'actions' layer, and replace where it says yourSWFname.swf with exactly what its asking, it should work just without a hitch.

              Here is the Example
              • 5. 2 Part Question : Stop movie animation/Load movie animation
                stsleeper94 Level 1
                I was missing the black actions frame. I had added it to the wrong layer. THank you so much. To complete the question. You have the roll over go to alpha 20% and stay, but on roll out how can I make it go back to 100%?

                Solved : my_mc.onRollOut = function(){
                my_mc.gotoAndPlay(12);
                };
                just made the move start and stop like you did. THank you so much

                Now that I am playing with the container. I load my movie but it does not use the container, it loads where the position is saved from the SWF on the page. So it is not playing within the container? It works great though but is the blank movie clip, does it need to be hallow? Does it need any additional coding? Thanks again