Page 1 of 3 123 LastLast
Results 1 to 10 of 30
  1. #1
    Join Date
    Oct 2006
    Posts
    75
    Plugin Contributions
    0

    Default Inserting Flash File On Main Page

    I have followed the many posts on the subject of installing a flash swf file into my main page. However, I haven't quite got it. I created my .js file and placed it in includes/templates/CUSTOM/jscript/scc_sales_banner.js

    Then, for my define_main_page.php I have just this one line:
    <script src="includes/templates/custom/jscript/scc_sales_banner.js"></script>

    When I now go to my site: www.santacruzchoppers.com/zencart
    it appears the Flash file is trying to load, i.e. it sees that there should be a flash file, but it doesn't load it?

    Where am I suppose to upload my actual scc_sales_banner.swf file? This may be my problem??

    Any help is greatly appreciated!

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Inserting Flash File On Main Page

    your swf should be in includes/templates/CUSTOM/images/

    Did you add the js script def into the head area as I did a view source and did not see it??? Something along the lines of:
    Code:
    <script type="text/javascript" src="swfobject.js"></script>
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Oct 2006
    Posts
    75
    Plugin Contributions
    0

    Default Re: Inserting Flash File On Main Page

    Kobra, thanks for your reply!

    Into which file do I add the code you specified?

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Inserting Flash File On Main Page

    ina a copy of your includes/templates/custom/common/html_header.php

    And I assume that you have a js file ?? if it is not named swfobject.js insure that you use the name for your js file
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Oct 2006
    Posts
    75
    Plugin Contributions
    0

    Default Re: Inserting Flash File On Main Page

    I'm still having trouble. Anyway, take a look at www.santacruzchoppers.com/zencart.

    I input the code:
    <script type="text/javascript" src="includes/templates/custom/jscript/scc_sales_banner.js"></script>
    into the html_header.php and it didn't work. It actually added a "box" the size of my swf file (398x200) at the very top left of the screen.

    Also, I am trying to get this swf to play in the center of the page in the blank box. Is the "html_header.php" the correct file to be placing the code into?

    I also tried to place the code into tpl_main_page.php and this also added the "blank box" at the top left corner of the screen.

    So, as of 5/16/07 at 9:00 am pacific time, the html_header.php contains the code:
    <script type="text/javascript" src="includes/templates/custom/jscript/scc_sales_banner.js"></script>
    and as you can see, it isn't working.

    Again, thanks for any continued help!

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Inserting Flash File On Main Page

    1. You've stuffed your <SCRIPT> call to the JS file in too many places. Take it out of the html_header file.

    2. All you needed to do was fix the path to your swf file.
    Your JS is pointing it to:
    "/includes/templates/custom/images/scc_sales_banner.swf"
    but your store is running it at:
    "/zencart/includes/templates/custom/images/scc_sales_banner.swf"

    Fix your path and your flash should load fine.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Oct 2006
    Posts
    75
    Plugin Contributions
    0

    Default Re: Inserting Flash File On Main Page

    Okay, took the js file out of the html_header file.

    Placed it back in the tpl_header.php file with the correct path... so I thought, but the swf file is still not showing up? I'm still doing something wrong.

    I know I'm close!!!!

    Dr. Byte and Kobra, thanks for all help! Do you see where I'm going wrong?

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Inserting Flash File On Main Page

    1. This points to a file that doesn't exist: (appears to likely be in your tpl_main_page.php):
    Code:
    <script type="text/javascript" src="zencart/includes/templates/custom/images/scc_sales_banner.js"></script>
    2. And then this, while it's likely located in the right spot, still has an invalid path in it.
    This part's fine:
    Code:
            <td class="plainBox"><script src="includes/templates/custom/jscript/scc_sales_banner.js"></script>
    <br /></td>
    But ... the contents of the jscript/scc_sales_banner.js file is now using a relative "zencart/includes/..." path. But, if you're going to hard-code the "zencart" part, you need to include the preceding slash, like this: "/zencart/includes/..."
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Apr 2007
    Location
    New York City
    Posts
    11
    Plugin Contributions
    0

    Default Re: Inserting Flash File On Main Page

    I just took a quick look and saw:
    <td class="plainBox"><script src="includes/templates/custom/jscript/scc_sales_banner.js"></script>

    I think if you change the jscript to images it should work.

  10. #10
    Join Date
    Oct 2006
    Posts
    75
    Plugin Contributions
    0

    Default Re: Inserting Flash File On Main Page

    Holy crap, we have an swf running....but wait, take a look. The page is displaying two swf files now! lol

    I need to get rid of the top left corner one. Any clues? My luck, I'll delete the one I want to keep. I will wait for a response from you masters! Thanks again for everything everyone!!!

    I'm almost there!

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Inserting GIF Animation to main page
    By eberrios in forum General Questions
    Replies: 5
    Last Post: 24 Sep 2010, 11:31 PM
  2. inserting email address into my main page
    By Dale Dugas in forum General Questions
    Replies: 2
    Last Post: 19 Feb 2010, 05:01 PM
  3. Inserting image into main page
    By Birdy Box in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 17 Nov 2009, 12:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR