Forums / Templates, Stylesheets, Page Layout / Flash not working on my define_main_page

Flash not working on my define_main_page

Views: 1,832

Results 1 to 15 of 15
16 Apr 2012, 11:21 PM
#1
deemurphy avatar

deemurphy

Zen Follower

Join Date:
Jul 2007
Posts:
324
Plugin Contributions:
0

Flash not working on my define_main_page

I am using the following code to display flash on the define_main_page:

<script src="../../../../../Scripts/swfobject_modified.js" type="text/javascript"></script> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="750" height="350" id="FlashID" title="Ezshops"> <param name="movie" value="Ezshops.swf" /> <param name="quality" value="high" /> <param name="wmode" value="opaque" /> <param name="swfversion" value="8.0.35.0" /> <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. --> <param name="expressinstall" value="../../../../../Scripts/expressInstall.swf" /> <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="Ezshops.swf" width="750" height="350"> <!--<![endif]--> <param name="quality" value="high" /> <param name="wmode" value="opaque" /> <param name="swfversion" value="8.0.35.0" /> <param name="expressinstall" value="../../../../../Scripts/expressInstall.swf" /> <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. --> <div> <h4>Content on this page requires a newer version of Adobe Flash Player.</h4> <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p> </div> <!--[if !IE]>--> </object> <!--<![endif]--> </object> <script type="text/javascript"> swfobject.registerObject("FlashID"); </script>

I am using the lastest version of Zen Cart, DreamWeaver and Xampp on Windows 7. Even when I uploaded it to the host I get nothing.

Can someone assist in how to display a SWF file.

Thank you
LadyDee

17 Apr 2012, 9:21 AM
#2
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Flash not working on my define_main_page

One thing to check is that you have the sentence case of the file name in your define page exactly the same as the real filename, and that your path is correct to the file.

Also, just try this on its own.

<embed src="Ezshops.swf"></embed>

17 Apr 2012, 10:07 AM
#3
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Flash not working on my define_main_page

This is what I have at www motorvista es.

the file is in SHOP/flash/homepage/main.swf.

<!--english--><!-- swfobject-static publishing -->
<script language="javascript" type="text/javascript"><!--switch swf location on protocol to avoid ie non-secure content errors-->
//<![CDATA[
var swf_location=(window.location.protocol == "https:")? "https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js" :
"http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js";
document.writeln('<scr' + 'ipt language="javascript" src="'+swf_location+'" type="text\/javascript">' + '<\/scr' + 'ipt>');
//]]></script>
<script type='text/javascript'>
swfobject.registerObject("homepageflash", "8", "flash/swfobject/expressInstall.swf");
</script>
<div id="homepageflash_wrapper">
 <object id="homepageflash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="690" height="405">
<param name="movie" value="flash/homepage/main.swf" />
<param name="FlashVars" value="XMLSource=flash/homepage/homepage_es.xml" />
<param name="wmode" value="transparent" />
<!--<param name="play" value="false" />--><!--if not specified, default is true-->
    <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="flash/homepage/main.swf" width="690" height="405">
        <param name="movie" value="flash/homepage/main.swf" />
<param name="FlashVars" value="XMLSource=flash/homepage/homepage_es.xml" />
<param name="wmode" value="transparent" />
<!--<param name="play" value="false" />--><!--if not specified, default is true-->
        <!--<![endif]-->
          <!--no flash content - single image linked to Flash Player download-->
          <a href="http://www.adobe.com/go/getflashplayer" target="_blank">
          <img src="includes/templates/MY_TEMPLATE/images/flash_background_en.gif" width="690" height="405" alt="Adobe Flash Player is not installed - get it here" title="Adobe Flash Player is not installed - get it here" /></a>
        <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
      </object>
 </div><!-- eof homepageflash_wrapper -->
<!-- End of define_main_page -->

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

17 Apr 2012, 10:39 PM
#4
deemurphy avatar

deemurphy

Zen Follower

Join Date:
Jul 2007
Posts:
324
Plugin Contributions:
0

Re: Flash not working on my define_main_page

I am still getting the following: Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player
LadyDee

18 Apr 2012, 1:28 PM
#6
deemurphy avatar

deemurphy

Zen Follower

Join Date:
Jul 2007
Posts:
324
Plugin Contributions:
0

Re: Flash not working on my define_main_page

I did this and it still does not show. I decided to use a scwoller created with sothink js web scroller and can not get it to show up either. The code for this is:

<script type="text/javascript" src="js/stscode.js"></script> <center> <a href="http://www.dhtml-menu-builder.com" style="display:none;visibility:hidden;">Javascript DHTML Image Web Scroller Powered by dhtml-menu-builder.com</a> <script type="text/javascript" src="js/scroller.js"></script> </center>

I used this before in a ealier version of zen cart and it worked. As I stated I have this code in the define_main_page, so it should show up when starting the project.

LadyDee

18 Apr 2012, 2:30 PM
#8
deemurphy avatar

deemurphy

Zen Follower

Join Date:
Jul 2007
Posts:
324
Plugin Contributions:
0

Re: Flash not working on my define_main_page

No, this did not work, I tried it on my computer host and on the domain I am using.

LadyDee

18 Apr 2012, 3:29 PM
#9
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,807
Plugin Contributions:
22

Re: Flash not working on my define_main_page

Can you first explain what you're trying to do? Do you REALLY need to use Flash? Or do you just want to have a slideshow? Because, if you just need a slideshow, don't use Flash - there are a lot of other more friendly alternatives...
I'll go into details after you answer my question what exactly you're trying to do.

My site - Pro ZC Help
My portfolio | My plugins

18 Apr 2012, 4:15 PM
#10
deemurphy avatar

deemurphy

Zen Follower

Join Date:
Jul 2007
Posts:
324
Plugin Contributions:
0

Re: Flash not working on my define_main_page

I just want to do a slide show, it has 22 images. I have tried using Sothink Java Script Web Scroller which I used before in a previous version of Zen Cart. For some reason even that is not working.

Thank you
LadyDee

18 Apr 2012, 4:47 PM
#11
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,807
Plugin Contributions:
22

Re: Flash not working on my define_main_page

22 IMAGES?!?! Who's gonna see that? Some "standard" is up to 5 images, but even 7 can go through. But 22? Really? Let's say there's a 5 seconds delay between the slides - who's gonna be staring at your slideshow for almost 2 minutes? Think about it...

I like to use Nivo Slider and I integrate it to all of the sites I build. It's quite simple and very powerful. Plus, it's free.

  1. Download it to your computer. Rename jquery.nivo.slider.pack.js to jscript_jquery.nivo.slider.pack.js and copy that file to includes/modules/pages/index/
    If my memory serves me right, you're using Estorenow which already comes with jQuery so you're OK. (anyone else reading this - make sure you're utilizing jQuery with your template. if you're not, add jscript_jquery.js to your includes/templates/YOUR_TEMPLATE/jscript/ directory)

  2. Create a new stylesheet in your includes/templates/estorenow/css/ and make sure it's called index_home.css (this will make that stylesheet load ONLY on main page). Copy all code from nivo-slider.css AND any of the themes you like. If you're lazy, use the file I attached which uses the default theme.

  3. Find the 3 images used by nivo (nivo-slider/themes/default) and upload the images to your includes/templates/estorenow/images/

  4. add the following code to your includes/templates/estorenow/common/html_header.php just before the ending </head> tag

<script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider();
    });
    </script>

so it looks something like this:

// DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';


?>
<script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider();
    });
    </script>
</head>
<?php // NOTE: Blank line following is intended: ?>
  1. go to "admin -> tools -> define pages editor -> define_main_page.php" and make sure you're using Plain Text editor. Add the following code there:
<div class="slider-wrapper theme-default">
            <div id="slider" class="nivoSlider">
                <img src="images/toystory.jpg" alt="" />
                <a href="http://dev7studios.com"><img src="images/up.jpg" alt="" /></a>
                <img src="images/walle.jpg" alt="" />
                <img src="images/nemo.jpg" alt="" />
            </div>
        </div>
  1. edit the images source and save your page. If your source is "images/your_image.jpg" make sure you upload the image to your images directory (not template's images)

This is it. Your slider should now appear on the main page. Some CSS tweaks might be required, most likely about slider width. You can duplicate the <img src... /> line for each of your images. Also, as the second demo image shows, you can make each image a link by wrapping it inside <a> tags. There are some additional settings (ie. delay, transition effect etc) that can be done with Nivo, check it out on their site.

Have fun! :smile:

My site - Pro ZC Help
My portfolio | My plugins

18 Apr 2012, 5:19 PM
#12
deemurphy avatar

deemurphy

Zen Follower

Join Date:
Jul 2007
Posts:
324
Plugin Contributions:
0

Re: Flash not working on my define_main_page

Thank you. I will try this now. Just wanted to let you know The reason I ad so many images is because this site will sell all kinds of products like Amazon does and it will take you to other sites as well for products.

I appreciate the help.
LadyDee

18 Apr 2012, 5:29 PM
#13
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,807
Plugin Contributions:
22

Re: Flash not working on my define_main_page

One more thing you should keep in mind - 22 images will significantly slow your site down. Let's say your image will be only 50kB (which depends on image size, quality etc.), but let's say it's just 50kB. Loading 22 images is actually over a MB. Unless you're on a VERY good server, this will make your home page very slow. Of course, it depends on your server, but also keep in mind that not everyone can load 1+MB that fast. Also, the script I gave you will not show ANY images before ALL are loaded. Someone might not even see your slider... Think about it and try to cut down on the images, don't go over 10. It simply doesn't make any sense. I know I wouldn't be around waiting for the 15th to show up...

My site - Pro ZC Help
My portfolio | My plugins

18 Apr 2012, 5:32 PM
#14
deemurphy avatar

deemurphy

Zen Follower

Join Date:
Jul 2007
Posts:
324
Plugin Contributions:
0

Re: Flash not working on my define_main_page

Good looking out, true not everyone has the same bandwidth or operating system which can also make the site slow to even come up.

LadyDee

19 Apr 2012, 8:07 AM
#15
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Flash not working on my define_main_page

Theres no way that can't work unless there is something up with your computer, which is what that message was telling you about upgrading.

Even if I simply drag a flash file into my browser it works.