Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE DREAMWEAVER: HomeDreamweaver ForumDreamweaver TutorialsFAQAdobe FlashWeb Design

Re: Code to make a video of someone walking out on the screen in a website

Cow Forums : Adobe Dreamweaver
FAQ   •   VIEW POSTS   •   ADD A NEW POST   •   SEARCH   •   CHANGE FORUM
Respond to this post   •   Return to posts index   •   Read entire thread


Re: Code to make a video of someone walking out on the screen in a website
by Abraham Chaffin on Oct 28, 2009 at 6:51:01 pm

Here's an example of something I threw together. If you know a little javascript and how to embed video the source code should be pretty straight forward. The variables are at the top if you want to use it and replace the variables with your movie information:

http://forums.creativecow.net/docs/answer_files/1/index.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Example Play</title>
<script>
/* VARIABLES */
var seconds_before_movie_is_removed=10;
var location_of_skin="http://forums.creativecow.net/docs/answer_files/1/Clear_Skin_1";
var location_of_skin="http://forums.creativecow.net/docs/answer_files/1/Clear_Skin_1";
var location_of_flv="http://forums.creativecow.net/docs/answer_files/1/00089_001_12";
var location_of_swf="http://forums.creativecow.net/docs/answer_files/1/FLVPlayer_Progressive.swf";
var swf_width=320;
var swf_height=180;

/* TO COUNT HOW MANY LOOPS OF THE MOVE IN FUNCTION HAVE RUN */
var c=0;

function movein(){
var botrightdiv=document.getElementById('bottomrightdiv');
var rightpx=botrightdiv.style.right;
var rightpx_num=parseFloat(rightpx);
if(rightpx_num<0||c==0){
/* ON THE FIRST PASS PUT THE MOVIE IN AND SET VARIABLES */
if(c==0){
write_movie();
botrightdiv.style.width=swf_width+"px";
botrightdiv.style.height=swf_height+"px";
botrightdiv.style.right="-"+swf_width+"px";
rightpx=botrightdiv.style.right;
rightpx_num=parseFloat(rightpx);
}
botrightdiv.style.right=(rightpx_num+20)+"px";
c=c+1;
setTimeout("movein()",100);
}else{
setTimeout("moveout()",(seconds_before_movie_is_removed*1000));
}
}
/* FUNCTION TO MOVE THE MOVIE OUT */
function moveout(){
document.getElementById('bottomrightdiv').style.innerHTML="";
document.getElementById('bottomrightdiv').style.right="-100000px";
}
/* FUNCTION TO PLACE THE MOVIE IN THE DIV */
function write_movie(){
document.getElementById('bottomrightdiv').innerHTML="<object width='"+swf_width+"' height='"+swf_height+"'><param name='movie' value='"+location_of_swf+"' /><param name='WMODE' value='transparent' /><param name='FlashVars' value='&MM_ComponentVersion=1&skinName="+location_of_skin+"&streamName="+location_of_flv+"&autoPlay=true&autoRewind=false' /><embed src='"+location_of_swf+"' flashvars='&MM_ComponentVersion=1&skinName="+location_of_skin+"&streamName="+location_of_flv+"&autoPlay=true&autoRewind=false' width='"+swf_width+"' height='"+swf_height+"' WMODE='transparent' /></object>";
}
</script>

<!-- THIS IS AN IE HACK TO MAKE THE FIXED POSITIONING WORK -->
<style type="text/css">
#bottomrightdiv { position: absolute; right: 0px; bottom: 0px; }
div > div#bottomrightdiv { position: fixed; }
</style><!--[if gte IE 5.5]><![if lt IE 7]>
<style type="text/css">
div#bottomrightdiv {
right: auto; bottom: auto;
left: expression( ( 0 - bottomrightdiv.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
top: expression( ( 0 - bottomrightdiv.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
}
</style>
<![endif]><![endif]-->
<!-- END IE HACK -->

</head>
<body bgcolor="#00CC66" onload="movein();">
Footage Courtesy of <a href='http://www.allbetsareoff.com/'>allbetsareoff.com</a>.
<div style="position: fixed; bottom: 0px; right: 0px; width: 0px; height: 0px;" id="bottomrightdiv"></div>
</body>
</html>


Abraham


Respond to this post   •   Return to posts index   •   Read entire thread


Current Message Thread:




Note: If you are a registered user please click here to login before posting.

Your post will not be accepted if your name and email address are not registered in our database. Click here if you do not have an account.

Name
E-Mail Address
Subject
E-Mail me when someone responds
Just This Message   Entire Thread   None  

Message:



Note: The following are HTML characters and may cause parts of your post to disappear if not used correctly: < > &
To include any portion of the post in your response, highlight the desired text and hit the "Q" key. Read more...



Add your message signature


 


Note: By clicking "Post Direct" button above, you are agreeing to the Creative Cow's Code of Conduct.



FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]