View Full Version : possible to have a control button on swf ?
joycie
08-19-2009, 01:44 PM
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.
punstc
08-19-2009, 07:00 PM
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.
joycie
08-20-2009, 03:51 AM
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?
<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>
davelf
08-20-2009, 06:53 AM
you can try this one, may be it fit
<!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...:)
joycie
08-20-2009, 01:45 PM
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?
molendijk
08-20-2009, 07:23 PM
Are you looking for something like this (http://code.google.com/intl/nl/apis/youtube/js_example_1.html)? Only works online.
Arie Molendijk.
davelf
08-21-2009, 08:44 AM
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/flashembed/flowplayer.html
you can read the tutorial too, if you don't have much experience like me in flash, hehe.:)
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.