A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: adding play & stop buttons to an FLV

  1. #1
    Senior Member
    Join Date
    Nov 2000
    Posts
    121

    adding play & stop buttons to an FLV

    im trying to control an FLV file ive imported, on the play button its a simple gotoandplay(1) on the stop... gotoandstop, but its not working?! is there anything i need to know about getting it to work?!

  2. #2
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    There are tutuorials on this at: www.wildform.com and www.macromedia.com

    Macromedia also has a component for this.
    Last edited by Wheels; 10-04-2002 at 03:10 PM.

  3. #3
    Wildform Moderator
    Join Date
    Sep 2000
    Posts
    2,070
    Hi.
    I think Wheels meant http://www.wildform.com/tutorials.
    www.flix.com is a dvd rental site.
    jb

  4. #4
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Whoops!

    I've got to quit posting at 4 AM!

  5. #5
    The Metamorphic Mutant Mystique_MHz's Avatar
    Join Date
    Mar 2002
    Location
    Orlando, FL
    Posts
    218
    You can add your own control buttons via actionScript.


    on the "play" button put this code:
    Code:
    on (release) {
    	_root.yourvideo.play();
    }
    on the "stop" button put this code:
    Code:
    on (release) {
    	_root.yourvideo.stop();
    }
    It's that easy
    Hope this helps!

  6. #6
    Senior Member
    Join Date
    Nov 2000
    Posts
    121

    how about rewind and fast forward... what do u put for them?!
    also go to start & goto end... cheers!!

  7. #7
    The Metamorphic Mutant Mystique_MHz's Avatar
    Join Date
    Mar 2002
    Location
    Orlando, FL
    Posts
    218
    Place an instence of the movie clip with the video file on the main stage and call it "vid"

    Put this code on it
    Code:
    onClipEvent (enterFrame) {
        if (_root.ffwd == true) {
            frame = this._currentframe+5;
            this.gotoAndStop(frame);
        }
        if (_root.frwd == true) {
            frame = this._currentframe-5;
            this.gotoAndStop(frame);
        }
    }
    On your rewind button put this code
    Code:
    on (press) {
        _root.frwd = true;
    }
    on (release) {
        _root.frwd = false;
    }
    On your fast foward button put this code
    Code:
    on (press) {
        _root.ffwd = true;
    }
    on (release) {
        _root.ffwd = false;
    }
    For your go to star button put this code
    Code:
    on (release) {
        _root.vid.gotoAndStop(start);//frame lable named start
    }
    For your go to end button put this code
    Code:
    on (release) {
        _root.vid.gotoAndStop(end);//frame lable named end
    }
    Very easy... lots of fun! Enjoy

  8. #8
    Senior Member
    Join Date
    Nov 2000
    Posts
    121
    cheers m8, u've helped me out no end!!

  9. #9
    The Metamorphic Mutant Mystique_MHz's Avatar
    Join Date
    Mar 2002
    Location
    Orlando, FL
    Posts
    218
    No problem... that's what we're here for *Thumb up*

  10. #10
    Senior Member RhameJ's Avatar
    Join Date
    Aug 2003
    Posts
    768
    Originally posted by Mystique_MHz
    You can add your own control buttons via actionScript.


    on the "play" button put this code:
    Code:
    on (release) {
    	_root.yourvideo.play();
    }
    on the "stop" button put this code:
    Code:
    on (release) {
    	_root.yourvideo.stop();
    }
    It's that easy
    Hope this helps!
    Sorry to drag this old topic up, but I have a question.
    I used this code but it didnt work until I removed "_root."
    I have my main .swf that loads another .swf that then loads the video. So I took out the _root and it worked.
    But whats weird is that the ff and rw buttons will not work unless the _root is in the the code?
    How come?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center