-
?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!!!
-
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
-
Hmm, sound like it could work. Now to wade through the code.
Thanks for the heads up.
-
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?
-
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.CLICK, playVid, false, 0, true); 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|