Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Random Flash on Home page.Random Flash on Home page.
Previous
 
Next
New Post
11/2/2007 10:57 AM
 

Hi all,

I have a need for a random swf file rotator for a new home page I am working on.  I do not need all of the bells and whistles of most of the flash modules I have seen out there.  All I want it to do is allow me to set the size and 3 or 4 filenames to pull randomly every time someone hits the home page.  No borders, spacing or BG color.  It needs to be transparent.  I only want to load 1 of the files and not all 3 or 4 and show them randomly.

I know I could write a module to do this but wanted to know if anyone has done this and what is already available that may fit my needs.

Thanks in advance!

Wallew

 
New Post
11/2/2007 3:59 PM
 

Found the answer.  Thought I would post it for future reference.  This script works well embeded in the <BODY> section of the skin.

<script language="JavaScript">

// Generate a Random Number
var randomnumber = Math.round(Math.random()*3);

// Select a movie and execute the corresponding function
if (randomnumber == 1)

{movie1();}

else if (randomnumber == 2)

{movie2();}

else {movie3();}

//Functions to write out the correct flash movie resource.

function movie1(){
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" width=\"300\" height=\"200\"><param name=movie value=\"movie1.swf\"><param name=quality value=high><embed src=\"movie1.swf\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"300\" height=\"200\"></embed></object>")
}

function movie2(){
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" width=\"300\" height=\"200\"><param name=movie value=\"movie2.swf\"><param name=quality value=high><embed src=\"movie2.swf\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"300\" height=\"200\"></embed></object>")
}

function movie3(){
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" width=\"300\" height=\"200\"><param name=movie value=\"movie3.swf\"><param name=quality value=high><embed src=\"movie3.swf\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"300\" height=\"200\"></embed></object>")
}

</script>

 

 

Wallew

 
New Post
11/3/2007 12:20 PM
 

Hi Wayne,

digRotate will do exactly what you want.  You can set digRotate to "not auto advance", and to display a "random random start page" which will give you your single random display.  In fact by using our flash rotator, it will automatically upgrade the users flash player if they don't have one, or if it's less and version 8.

Thanks,

Mike

 
New Post
11/5/2007 3:05 PM
 

Thanks for the post.  I have a quick fix for this issue, but will definately keep the module in mind for future enhancements and sites.  Nice module by the way!

Wallew

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Random Flash on Home page.Random Flash on Home page.


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out