Forums

[resolved] Getting Flash File to work in WordPress. (12 posts)

  1. adcuda
    Member
    Posted 3 years ago #

    Hello all,

    I thank anybody for any help in advance. It is appreciated.

    I have purchased a flash file from Flashden and I am having trouble getting it to work on my page.

    The Flash file consists of the swf movie, an xml document, and a folder of images that are used in the flash file.

    Here is a link to the flash file I purchased. When I looked through the support forum for the flash developer I saw him telling other people that the XML file needed to be in the same directory as the .swf file and the page it is displayed on. I do not know which folder this would be in the wordpress installation.

    When I try to embed it through wordpress I get no action, and when I try to ftp it in like I would any other files it doesn't work either.

    Any help on getting this to work on my page would be appreciated. To edit my wordpress site I just build the page up in dreamweaver then copy and past into wordpress (FYI).

    Thanks again!

  2. Michael Fields
    Theme Wrangler
    Posted 3 years ago #

    To help you, I need to know the following:

    1. The name of the xml document.
    2. A link to your wordpress installation - if live.
    3. Whether or not you are using permalinks.

  3. adcuda
    Member
    Posted 3 years ago #

  4. Michael Fields
    Theme Wrangler
    Posted 3 years ago #

    Try this:

    move carousel.xml to: http://www.adcuda.com/carousel.xml

    You will need to use the following code before the WordPress code in you .htaccess file if you are using any kind of permalink configuration

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule carousel.xml$ /carousel.xml [L]
  5. adcuda
    Member
    Posted 3 years ago #

    I moved the file there and I tried to use it again and it didn't work. Here is what I put on the page to try it.

    <div><script type="text/javascript"><!--
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','900','height','180','src','file:/wp-content/themes/overeasy/FlashFiles/carousel','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','/wp-content/themes/overeasy/FlashFiles/deploy/carousel' ); //end AC code
    // --></script><noscript><object width="900" height="180" data="/wp-content/themes/overeasy/FlashFiles/carousel.swf" type="application/x-shockwave-flash"><param name="quality" value="high" /><param name="src" value="/wp-content/themes/overeasy/FlashFiles/carousel.swf" /></object>
    </noscript></div>

    Here is the exact contents of the xml file.

    <!--
    XML CONFIGURATION HELP
    ======================

    vertical - (yes/no) vertical movement
    autoMove - (yes/no) if set to yes, the carousel will spin by default
    maxSpeed - set maximum speed for the carousel
    radiusX, radiusY - set carousel x/y radius (these two are inverted in vertical mode)
    blurScale - set blur scale value (recomended values are powers of 2: 2 4 8 16 32 ...)
    reflections - (yes/no) enable/disable reflections
    showBorder - (yes/no) if set to yes, it will show a border around the image
    showTooltip - (yes/no) if set to yes, it will show a tooltip above the image
    stopOnRollOver - (yes/no) if set to yes, it will pause the movement when you roll over a thumbnail
    allButtons - (yes/no) if set to no, the buttons in the background will not interact with the mouse
    hitAreaWidth, hitAreaHeight - define the hit area where the carousel will interact with the mouse

    -->

    <carousel vertical="no" autoMove="yes" maxSpeed="1" radiusX="400" radiusY="20" blurScale="8" reflections="yes" showBorder="yes" showTooltip= "yes" stopOnRollover="yes" allButtons="no" hitAreaWidth="590" hitAreaHeight="300">
    <image src="http://www.adcuda.com/wp-content/themes/overeasy/FlashFiles/img/01.png" tooltip="Jay Wolfe Auto Group" link="http://www.google.com/" target="_self" />
    <image src="http://www.adcuda.com/wp-content/themes/overeasy/FlashFiles/img/02.png" tooltip="Integration Now" link="http://www.google.com/" target="_self" />
    <image src="http://www.adcuda.com/wp-content/themes/overeasy/FlashFiles/img/03.png" tooltip="Pro Paintball" link="http://www.google.com/" target="_self" />
    <image src="http://www.adcuda.com/wp-content/themes/overeasy/FlashFiles/img/04.png" tooltip="GQCISCO Inc." link="http://www.google.com/" target="_self" />
    <image src="http://www.adcuda.com/wp-content/themes/overeasy/FlashFiles/img/05.png" tooltip="Quinn & Quinn Law" link="http://www.google.com/" target="_self" />
    <image src="http://www.adcuda.com/wp-content/themes/overeasy/FlashFiles/img/06.png" tooltip="Midwest Industrial Services" link="http://www.google.com/" target="_self" />
    </carousel>

  6. adcuda
    Member
    Posted 3 years ago #

    I didn't add that piece of code you gave me the htaccess because I think I am not using permalink. Its just set to default.

    Thank you VERY much for your help.

  7. Michael Fields
    Theme Wrangler
    Posted 3 years ago #

    Ok.
    Something new to try.
    move the xml file back to where it was. and the ne fix the paths in this bit of code:

    <div><script type="text/javascript"><!--
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','900','height','180','src','file:/wp-content/themes/overeasy/FlashFiles/carousel','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','/wp-content/themes/overeasy/FlashFiles/deploy/carousel' ); //end AC code
    // -->

    These two lines:
    /wp-content/themes/overeasy/FlashFiles/carousel
    /wp-content/themes/overeasy/FlashFiles/deploy/carousel

    should be pointing to swf files, but they are not.

  8. adcuda
    Member
    Posted 3 years ago #

    No dice.

    Dang.

  9. Michael Fields
    Theme Wrangler
    Posted 3 years ago #

    not sure... If you want, feel free to email the files to the flash apparatus and I'll try to get them to work. My email can be found on the contact page of my site - just click my name on the left.

  10. fateguy
    Member
    Posted 2 years ago #

    Hello All,

    I have same issue with BANNER_ROTATOR_with_Auto_Delay_Time_V3_new from Flasden and wordpress theme TheOrderOfTheWeb developed by Web Hosting Fan.

    I can't succeed with installation it just do not show up on the header. There are few main files for the flash slide show (banner.swf; data.xml; swfobject.js; index.html). If I run swf or HTML file which is in package everything works perfectly. But when I am trying to hardcode in to my wordpress header.php file it just doesn't show anything.

    Pasting some code from files with which ones I'm playing.

    >>>data.xml<<<
    <?xml version="1.0"?>
    <Banner
    bannerWidth="938"
    bannerHeight="222"

    transitionType="1"
    transitionDelayTimeFixed="2"
    transitionDelayTimePerWord=".5"
    transitionSpeed="8"
    transitionBlur="yes"
    transitionRandomizeOrder="no"

    showTimerClock="yes"
    showBackButton="no"
    showNumberButtons="yes"
    showNumberButtonsAlways="no"
    showNumberButtonsHorizontal="no"
    showNumberButtonsAscending="yes"
    autoPlay="yes"

    >

    <item image="banner_images/image1.jpg"
    link=""
    target="_blank"
    textBlend="no"><![CDATA[XML DRIVEN CAPTION.
    Adjustable Size, <font color='#FFCC00'>Color</font> with ability to add <font color='#CCFF66'>Hyper Links</font>.
    ]]></item>

    <item image="banner_images/image2.jpg"
    link="http://www.google.co.in/search?hl=en&q=2"
    target="_blank"
    textBlend="no"><![CDATA[Adjustable LINE SPACING, LETTER SPACING and caption WIDTH through XML.
    ]]></item>

    <item image="banner_images/image3.swf"
    link="http://www.google.co.in/search?hl=en&q=3"
    target="_blank"
    textBlend="no"><![CDATA[POSSIBLE TO LOAD SWF FILES. Animations can go inside the blur area.
    ]]></item>

    <item image="banner_images/image4.jpg"
    link="http://www.google.co.in/search?hl=en&q=4"
    target="_blank"
    textBlend="yes"><![CDATA[This text made to BLEND with background. For each caption, you can enable / disable this option through XML.
    ]]></item>

    <item image="banner_images/image5.jpg"
    link="http://www.google.co.in/search?hl=en&q=5"
    target="_blank"
    textBlend="no"><![CDATA[Adjustable TRANSITION SPEED and DELAY TIME.
    ]]></item>

    <item image="banner_images/image6.jpg"
    link="http://www.google.co.in/search?hl=en&q=6"
    target="_blank"
    textBlend="no"><![CDATA[You can choose embedded text or normal text.
    ]]></item>

    </Banner>

    >>>swfobject.js<<<
    /**
    * SWFObject v1.4.2: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
    *
    * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
    * http://www.opensource.org/licenses/mit-license.php
    *
    * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
    * legal reasons.
    */
    if(typeof deconcept == "undefined") var deconcept = new Object();
    if(typeof deconcept.util == "undefined") deconcept.util = new Object();
    if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
    deconcept.SWFObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
    if (!document.getElementById) { return; }
    this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
    this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
    this.params = new Object();
    this.variables = new Object();
    this.attributes = new Array();
    if(swf) { this.setAttribute('swf', swf); }
    if(id) { this.setAttribute('id', id); }
    if(w) { this.setAttribute('width', w); }
    if(h) { this.setAttribute('height', h); }
    if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
    this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
    if(c) { this.addParam('bgcolor', c); }
    var q = quality ? quality : 'high';
    this.addParam('quality', q);
    this.setAttribute('useExpressInstall', useExpressInstall);
    this.setAttribute('doExpressInstall', false);
    var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
    this.setAttribute('xiRedirectUrl', xir);
    this.setAttribute('redirectUrl', '');
    if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
    }
    deconcept.SWFObject.prototype = {
    setAttribute: function(name, value){
    this.attributes[name] = value;
    },
    getAttribute: function(name){
    return this.attributes[name];
    },
    addParam: function(name, value){
    this.params[name] = value;
    },
    getParams: function(){
    return this.params;
    },
    addVariable: function(name, value){
    this.variables[name] = value;
    },
    getVariable: function(name){
    return this.variables[name];
    },
    getVariables: function(){
    return this.variables;
    },
    getVariablePairs: function(){
    var variablePairs = new Array();
    var key;
    var variables = this.getVariables();
    for(key in variables){
    variablePairs.push(key +"="+ variables[key]);
    }
    return variablePairs;
    },
    getSWFHTML: function() {
    var swfNode = "";
    if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
    if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); }
    swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
    swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
    var params = this.getParams();
    for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
    var pairs = this.getVariablePairs().join("&");
    if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
    swfNode += '/>';
    } else { // PC IE
    if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); }
    swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
    swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
    var params = this.getParams();
    for(var key in params) {
    swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
    }
    var pairs = this.getVariablePairs().join("&");
    if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
    swfNode += "</object>";
    }
    return swfNode;
    },
    write: function(elementId){
    if(this.getAttribute('useExpressInstall')) {
    // check to see if we need to do an express install
    var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
    if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
    this.setAttribute('doExpressInstall', true);
    this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
    document.title = document.title.slice(0, 47) + " - Flash Player Installation";
    this.addVariable("MMdoctitle", document.title);
    }
    }
    if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
    var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
    n.innerHTML = this.getSWFHTML();
    return true;
    }else{
    if(this.getAttribute('redirectUrl') != "") {
    document.location.replace(this.getAttribute('redirectUrl'));
    }
    }
    return false;
    }
    }

    /* ---- detection functions ---- */
    deconcept.SWFObjectUtil.getPlayerVersion = function(){
    var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
    if(navigator.plugins && navigator.mimeTypes.length){
    var x = navigator.plugins["Shockwave Flash"];
    if(x && x.description) {
    PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
    }
    }else{
    // do minor version lookup in IE, but avoid fp6 crashing issues
    // see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
    try{
    var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
    }catch(e){
    try {
    var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
    PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
    axo.AllowScriptAccess = "always"; // throws if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
    } catch(e) {
    if (PlayerVersion.major == 6) {
    return PlayerVersion;
    }
    }
    try {
    axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
    } catch(e) {}
    }
    if (axo != null) {
    PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
    }
    }
    return PlayerVersion;
    }
    deconcept.PlayerVersion = function(arrVersion){
    this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
    this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
    this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
    }
    deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
    if(this.major < fv.major) return false;
    if(this.major > fv.major) return true;
    if(this.minor < fv.minor) return false;
    if(this.minor > fv.minor) return true;
    if(this.rev < fv.rev) return false;
    return true;
    }
    /* ---- get value of query string param ---- */
    deconcept.util = {
    getRequestParameter: function(param) {
    var q = document.location.search || document.location.hash;
    if(q) {
    var pairs = q.substring(1).split("&");
    for (var i=0; i < pairs.length; i++) {
    if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
    return pairs[i].substring((pairs[i].indexOf("=")+1));
    }
    }
    }
    return "";
    }
    }
    /* fix for video streaming bug */
    deconcept.SWFObjectUtil.cleanupSWFs = function() {
    var objects = document.getElementsByTagName("OBJECT");
    for (var i=0; i < objects.length; i++) {
    objects[i].style.display = 'none';
    for (var x in objects[i]) {
    if (typeof objects[i][x] == 'function') {
    objects[i][x] = null;
    }
    }
    }
    }
    if (typeof window.onunload == 'function') {
    var oldunload = window.onunload;
    window.onunload = function() {
    deconcept.SWFObjectUtil.cleanupSWFs();
    oldunload();
    }
    } else {
    window.onunload = deconcept.SWFObjectUtil.cleanupSWFs;
    }
    /* add Array.push if needed (ie5) */
    if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

    /* add some aliases for ease of use/backwards compatibility */
    var getQueryParamValue = deconcept.util.getRequestParameter;
    var FlashObject = deconcept.SWFObject; // for legacy support
    var SWFObject = deconcept.SWFObject;

    >>>index.html<<<
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>BANNER ROTATOR with Auto Delay Time</title>
    <script type="text/javascript" src="swfobject.js"></script>
    </head>

    <body>
    <div align="center">
    <div id="flashcontent">
    <script type="text/javascript">
    var so = new SWFObject("banner.swf", "mymovie", "938", "222", "8");
    so.addParam("menu", "false");
    so.write("flashcontent");
    </script>
    </div>
    </div>
    </body>
    </html>

    >>>header.php<<<
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>

    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->

    <style type="text/css" media="screen">
    @import url( <?php bloginfo('stylesheet_url'); ?> );
    </style>

    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <?php wp_get_archives('type=monthly&format=link'); ?>

    <?php wp_head(); ?>

    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/scripts/contentslider.js"></script>

    </head>

    <body>
    <div id="rap">
    <div id="top">

    </div>

    <div id="header">
    <div class="header-title">/"><?php bloginfo('name'); ?></div>
    <div class="header-description"><?php bloginfo('description'); ?></div>

    <div class="news"><h2> </h2>

    </div>

    </div>

    <div id="category">

    <div id="categoryx">
    <ul id="dcategory">
    <?php global $video; ?>
    <?php wp_list_categories('hide_empty=0&title_li=&exclude='.$video); ?>

    </div>

    <div id="categoryy"></div>

    <div class="clear"></div>

    </div>

    <div id="flashcontent">
    <script type="text/javascript">
    var so = new SWFObject("banner.swf", "mymovie", "938", "222", "8");
    so.addParam("menu", "false");
    so.write("flashcontent");
    </script>

    <?php get_sidebar(); ?>

    <div id="content">
    <!-- end header -->

    Hope anyone can help me with this mess

    Thanks

  11. fateguy
    Member
    Posted 2 years ago #

    This is what I'm pasting in to my header.php template file

    <div id="flashcontent">
    <script type="text/javascript">
    var so = new SWFObject("banner.swf", "mymovie", "938", "222", "8");
    so.addParam("menu", "false");
    so.write("flashcontent");
    </script>

    I copied this from html file which was in slide show package

  12. elcarpo
    Member
    Posted 2 years ago #

    adcuda, if you have PURCHASED the flash file, shouldn't the people how sell it help you on setting it up?

Topic Closed

This topic has been closed to new replies.

About this Topic