5 Replies Latest reply on Feb 2, 2009 7:33 AM by kglad

    button

    lilbuckeye
      I want to use a still image - as a button to click on and then play a flash video.
      Could anyone help me with the script for the still button image that will do this?
      I thought about using scenes, but it is not working.
      help

      The video is streaming.
        • 1. Re: button
          kglad Adobe Community Professional & MVP
          if you're using a timeline based swf, place an flvplayback component on a frame and assign its properties in the parameters panel. code your button to direct your timeline to the frame that contains the flvplayback component.
          • 2. Re: button
            lilbuckeye Level 1
            Hi ,
            thanks for your response.
            I am still having problems...
            I've created the flv playback component and assigned it's properties in the parameters panel.
            I put it on a frame in scene 2. and the button graphic on a frame on scene 1. scene1 frame 1 has the stop action stop();
            the button has this: on (release) {
            gotoAndPlay("Scene 2", 1);
            }
            ? am I way off on my understanding of this?

            We have also done something similar with this code:
            myNC= new NetConnection();
            myNC.connect(null);
            myStream= new NetStream(myNC);
            myStream.setBufferTime(2);
            myVid.attachVideo(myStream);
            myStream.pause();

            stop_btn.onRelease= function(){
            myStream.pause();
            }

            play_btn.onRelease= function(){
            myStream.play("rtmp://.flv");
            }

            I know there is a simple answer to this - I just don't know what it is.
            • 3. Re: button
              kglad Adobe Community Professional & MVP
              comment out your netconnection code and leave the playback component on that scene2 frame. click the scene2,frame1 frame and in the properties panel type the following:

              scene2_frame1

              then change your button code to:

              on (release) {
              _root.gotoAndPlay("scene2_frame1");
              }

              and retest.
              • 4. Re: button
                lilbuckeye Level 1
                THANKS!
                I needed to put the stop action on scene 2.
                I'm all set.
                thanks again.
                • 5. Re: button
                  kglad Adobe Community Professional & MVP
                  you're welcome.