Thread: Rotate Flash video on refresh
Results 1 to 11 of 11
Related
-
Auto install flash player to the client where the flash.exe was located on server Forum: Graphics Forum
Replies: 1 -
video disappears after refresh Forum: HTML Forum
Replies: 2 -
REFRESH trouble after POST Forum: HTML Forum
Replies: 0 -
'Rotate Multiple Sets of Linked Images' JavaScript question Forum: Javascript Forum
Replies: 0
-
05-01-2008, 07:25 PM #1
Rotate Flash video on refresh
Thanks for reading this thread.
I have a number of flash movies that I would like to rotate each time the page refreshes. They all have the same specs, just different content.
What is the best way to do this?
I do appreciate the advice.
Regards,
je
-
05-02-2008, 12:18 AM #2
Re: Rotate Flash video on refresh
Do you mean something like this
HTML Code:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> #display { width:600px; line-height:30px; border:3px double #09c; font-family:time,serif; font-size:16px; text-align:center; margin:20px auto; } </style> <script type="text/javascript"> /*********************************************** * Random Video Script- © * Author: Raymond Angana * rangana in AHFB2000.com * modified last May 2, 2008 * This notice MUST stay intact for legal use ***********************************************/ var v1,v2,v3,v4,v5,rangVideo; /********************************Edit this part for the videos*********************************/ v1='<object width="400" height="400"><param name="movie" value="http://www.w3schools.com/flash/ball.swf"><embed src="http://www.w3schools.com/flash/ball.swf" width="400" height="400"></embed></object>'; v2='<object width="400" height="400"><param name="movie" value="http://www.w3schools.com/flash/mouse.swf"><embed src="http://www.w3schools.com/flash/mouse.swf" width="400" height="400"></embed></object>'; v3='<object width="400" height="400"><param name="movie" value="http://www.w3schools.com/flash/colorchange.swf"><embed src="http://www.w3schools.com/flash/colorchange.swf" width="400" height="400"></embed></object>'; v4='<object width="400" height="400"><param name="movie"value="http://www.w3schools.com/flash/helloworld.swf"><embed src="http://www.w3schools.com/flash/helloworld.swf" width="400" height="400"></embed></object>'; v5='<object width="400" height="400"><param name="movie" value="http://www.w3schools.com/flash/button2.swf"><embed src="http://www.w3schools.com/flash/button2.swf" width="400" height="400"></embed></object>'; /********************************************************************************************/ rangVideo=[v1,v2,v3,v4,v5]; // This depends on the number of videos you have. window.onload=function() { rangProc=Math.floor(Math.random()*rangVideo.length); document.getElementById('display').innerHTML=rangVideo[rangProc]; } </script> </head> <body> <div id="display"> </div> </body> </html>
-
05-02-2008, 06:22 PM #3
Re: Rotate Flash video on refresh
rangana,
That's it!!!
Thank you. I read every thread that goes through here and slowly learning.
Someday I want to answer questions.
Thank you very much. It is very much appreciated.
regards,
je
-
05-02-2008, 08:32 PM #4
Re: Rotate Flash video on refresh
No problem, you're completely welcome
-
04-30-2009, 02:30 PM #5
Re: Rotate Flash video on refresh
Hi,
This is great ! thanks for posting this code it is just what I needed. I have one problem though I would like to use it on my wordpress site. It works for me when I put in a html page, but do you happen to know why I cant get it to work on a php site ?
Many thanks,
tom
-
04-30-2009, 02:51 PM #6
Re: Rotate Flash video on refresh
Please provide a link to your WP page.
Checkout my porfolio.
Please click thebutton when a member helped you.
Take time to use Forum's Search function.
-
04-30-2009, 03:07 PM #7
Re: Rotate Flash video on refresh
hi,
Many thanks rangana, this is the page, it should appear in the box just below the top navigation menu.
http://www.panoraks.co.uk/
I inserted the code into a text widget, and have also tried inserting directly into php file, but no joy.
Thanks so much for your time. I look forward to hearing from you.
Cheers,
tom
p.s. cant post link until I make 5 posts apparently
-
04-30-2009, 04:09 PM #8
Re: Rotate Flash video on refresh
There's a conflict of events.
Try to replace this part:
Code:window.onload=function()
Code:window.addEventListener?window.addEventListener('load',initRandVid,false): window.attachEvent('onload',initRandVid); function initRandVid()
Checkout my porfolio.
Please click thebutton when a member helped you.
Take time to use Forum's Search function.
-
04-30-2009, 04:37 PM #9
Re: Rotate Flash video on refresh
WOW ! Thanks sooooo much !!!! It works, I am delighted, thank you a million times ! I cant tell you how happy I am now
thanks again,
tom
-
12-12-2009, 04:40 AM #10
Re: Rotate Flash video on refresh
Is this javascript work with blogspot?
-
01-11-2011, 10:10 PM #11
Re: Rotate Flash video on refresh
Hey folks new guy here. Working on church WEB site and they want to rotate the videos they have, but the code is a little confusing on where to place it.
Below is the HTML page generated by the software we are using. I need some help in knowing where to place this if with in the generated code if possible. Below is what I have so far, but not sure how to set the flashvars.videoPath.
<script type="text/javascript">
var flashvars = {};
var params = {};
var v1,v2,v3,v4,v5,rangVideo;
/********************************Edit this part for the videos*********************************/
v1='<object width="400" height="400"><param name="movie" value="http://www.wgc.org/LAURAPROMO_300k.flv"><embed src="http://www.wgc.org/LAURAPROMO_300k.flv" width="400" height="400"></embed></object>';
v2='<object width="400" height="400"><param name="movie" value="http://www.wgc.org/CAINSLOUDERBETTER_300k.flv"><embed src="http://www.wgc.org/CAINSLOUDERBETTER_300k.flv" width="400" height="400"></embed></object>';
rangVideo=[v1,v2]; // This depends on the number of videos you have.
window.onload=function()
{
rangProc=Math.floor(Math.random()*rangVideo.length);
document.getElementById('display').innerHTML=rangVideo[rangProc];
}
/*** Code generated by WEB tool ***/
flashvars.videoPath = "CAINSLOUDERBETTER_300k.flv";
flashvars.imagePath = "images/movie_screen.jpg";
flashvars.title = "";
flashvars.description = "";
flashvars.viewInfoButton = "false";
flashvars.viewFullscreenButton = "false";
flashvars.viewScaleButton = "false";
flashvars.viewVolumeControls = "true";
flashvars.viewTime = "false";
flashvars.viewBigPlayButton = "false";
flashvars.videoLoop = "false";
flashvars.videoAutoPlay = "false";
flashvars.videoBufferTime = "1";
flashvars.tlInterval = "1000";
flashvars.soundVolume = "0.80";
flashvars.fullSizeView = "2";
flashvars.spacing = "10";
flashvars.controlHeight = "25";
flashvars.volumeLengthW = "100";
flashvars.color1 = "0xAAAAAA";
flashvars.color2 = "0x000000";
flashvars.borderColor = "0x000000";
flashvars.borderAlpha = "0.5";
flashvars.timeColor1 = "0x000000";
flashvars.timeColor2 = "0x000000";
flashvars.timeAlpha1 = "1.0";
flashvars.timeAlpha2 = "1.0";
flashvars.timeTextColor1 = "0xFFFFFF";
flashvars.timeTextColor2 = "0xC0C0C0";
flashvars.scrubberHeight = "3";
flashvars.scrubberColor1 = "0xC0C0C0";
flashvars.scrubberAlpha1 = "1.0";
flashvars.scrubberColor2 = "0x0099FF";
flashvars.scrubberAlpha2 = "1.0";
flashvars.filterColor = "0x0099FF";
flashvars.filterAlpha = "0.6";
flashvars.buttonColor = "0xFFFFFF";
flashvars.titleColor = "0x47D2FF";
flashvars.descriptionColor = "0xFFFFFF";
flashvars.infoBackgroundColor = "0xAAAAAA";
flashvars.infoBackgroundAlpha = "0.50";
params.quality = "Best";
params.scale = "noscale";
params.wmode = "opaque";
params.play = "false";
params.loop = "false";
params.menu = "false";
params.allowfullscreen = "true";
params.salign = "tl";
swfobject.embedSWF("wb.videoplayer.swf", "FlashVideoPlayer1", "228", "156", "9.0.0", false, flashvars, params);
</script>
Thanks in advance,
Kwrindy
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum