A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: ?Click Button to Play Movie Clip?

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    13

    ?Click Button to Play Movie Clip?

    Ok I am working on a project that I have three movie clips animate onto the stage.

    I then have 3 buttons come up correlating with each movie clip.

    How do I script the buttons to play the movie clips?

    The movie clips are embeded FLV files just fyi.

    Anyone have any suggestions?

    Thank you ahead of time, I REALLY APPRECIATE THESE BOARDS!!!

  2. #2
    Member
    Join Date
    Oct 2002
    Posts
    56
    From what I can make out you need to look into localconnection.

    I have just posted a similar scenario where I need to control an external swf containing .f4v and setup a btn action in main swf to do so.

    btn action send and receive code is at btm. HTH

    http://board.flashkit.com/board/show...28#post4273528

  3. #3
    Junior Member
    Join Date
    Oct 2010
    Posts
    13
    Hmm, sound like it could work. Now to wade through the code.

    Thanks for the heads up.

  4. #4
    Junior Member
    Join Date
    Oct 2010
    Posts
    13
    I don't think that I should need all this though.

    All I need is a click to play script. The FLV is embedded into the timeline inside the movie clip.

    Are the localconnections necessary?

  5. #5
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    localconnection is used to communicate between multiple swiff files that don't share a common swiff parent - usually between multiple swiffs housed in an html document.

    to play an FLV, i assume you have it in an FLVPlayback component. give that instance on the stage a name (e.g., myVideo) then call the play() method. to add click behavior to a button, you must also give the button an instance name (e.g., myButton) and then use the addEventListener() method.

    PHP Code:
    myButton.addEventListener(MouseEvent.CLICKplayVidfalse0true);
    function 
    playVid(event:MouseEvent):void {
      
    myVideo.play();


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