Results 1 to 7 of 7

Thread: possible to have a control button on swf ?

  1. #1
    Join Date
    Jul 2006
    Posts
    95
    Thanks
    21
    Thanked 0 Times in 0 Posts

    Default possible to have a control button on swf ?

    I have converted a wmv file to swf.
    I would like to embed the swf file on a web page.
    I wonder if it is possible to have a control button on the swf : play, stop pause

    Thanks for any help that anyone can provide.

  2. #2
    Join Date
    Aug 2007
    Location
    Harrisburg, PA
    Posts
    131
    Thanks
    6
    Thanked 9 Times in 9 Posts

    Default

    You would need to have some flash and actionscript knowledge. I would go about it by loading in the movie swf in externally and writing the actionscript to control it.

    There might be some third party tools out there that will do it for you, but I am unsure of any such tool off the top of my head.

  3. #3
    Join Date
    Jul 2006
    Posts
    95
    Thanks
    21
    Thanked 0 Times in 0 Posts

    Default

    Regret to say that I do not have flash and actionscript knowledge.

    Wmv file can be embedded on a webpage using the following code...
    Wonder if there is such a similar script for Swf file?

    Code:
    <OBJECT id=NSPlay classid=CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95 
         align=middle width=360 height=320><PARAM NAME="fileName"       VALUE="video.wmv"> <PARAM NAME="autoStart" VALUE="0">
    <PARAM NAME="BufferingTime" value="0"><PARAM NAME="CaptioningID" value=""> 
    <PARAM NAME="ShowControls" value="1"><PARAM NAME="ShowAudioControls" value="1"><PARAM NAME="ShowGotoBar" value="0"><PARAM NAME="ShowPositionControls" value="0"><PARAM NAME="ShowStatusBar" value="-1">
    <PARAM NAME="EnableContextMenu" value="0"></OBJECT></CENTER>

  4. #4
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    you can try this one, may be it fit
    Code:
    
    
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    
    <!-- include flashembed. this file is not included in the "official" jQuery tools package -->
    <script type="text/javascript" src="http://static.flowplayer.org/js/tools/tools.flashembed-1.0.3.min.js"></script>
    
    
    <style>
    #flash2 {
    	width:787px;
    	height:300px;
    	background-image:url(http://static.flowplayer.org/tools/img/flashembed/splash.jpg);
    	text-align:center;
    	cursor:pointer;
    }
    
    #flash2 img {
    	margin-top:110px;
    }
    </style>
    
     
    <script>
    
    // use the jQuery alternative for flashembed.domReady
    $(function() {
    
    	// bind an onClick event for this second Flash container
    	$("#flash2").click(function() {
    
    		// same as in previous example
    		flashembed(this, "/swf/flash10.swf");
    	});
    });
    </script>
    
    <div id="flash2">
    	<img src="http://static.flowplayer.org/img/player/btn/play_text_large.png" alt="" />
    </div>
    good luck...

  5. The Following User Says Thank You to davelf For This Useful Post:

    joycie (08-20-2009)

  6. #5
    Join Date
    Jul 2006
    Posts
    95
    Thanks
    21
    Thanked 0 Times in 0 Posts

    Default

    Thanks Delvf for your kind response.
    I can now embed swf on the webpage and play the swf video clip.
    But the short swf movie keep on repeating...
    Is it possible to allow the video to play only once unless the user click the play button again?
    Is it also possible to have a stop or pause button?

  7. #6
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    Are you looking for something like this? Only works online.
    Arie Molendijk.

  8. The Following User Says Thank You to molendijk For This Useful Post:

    joycie (08-21-2009)

  9. #7
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    if you don't want to waste your time by creating flash player, you can use the plug-in. A lot of plug-in to play flash available for, this some of the example:

    http://flowplayer.org/tools/demos/fl...lowplayer.html

    you can read the tutorial too, if you don't have much experience like me in flash, hehe.

  10. The Following User Says Thank You to davelf For This Useful Post:

    joycie (08-21-2009)

Bookmarks

Posting Permissions

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