Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2007
    Location
    Newark, DE
    Posts
    25
    Plugin Contributions
    0

    Default Flash alignment, width

    We have installed FLASH_NAME.swf as our masthead, with the jscript method:

    --This file is FLASH_NAME.js--
    Code:
    document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
    document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
    document.write('WIDTH="1024" HEIGHT="40" id="mast" ALIGN="left">');
    document.write('<PARAM NAME=movie VALUE="mast.swf"> <PARAM NAME=loop VALUE=true> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> <EMBED src="http://globalsubnet.com/includes/templates/silverfish/images/mast.swf" loop=true menu=false quality=high bgcolor=#000000 WIDTH="1024" HEIGHT="60" NAME="mast" ALIGN="left"');
    document.write('TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
    document.write('</OBJECT>');
    Using this method in tpl_header.php to call it:
    Code:
    HTML Code:
    <script src="http://##########/FLASH_NAME.js"></script>
    As you can see, we have the width and height of the flash file assigned values of 1024px and 60px, respectively. Alignment is specified as 'left'. However, look at the results!!! : www.globalsubnet.com

    Any ideas what's going on?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Flash alignment, width

    Your JS is wrong. Actually, in the JS is HTML, and the HTML is calling your flash object from the wrong location.
    There are 2 parts. For the first one, you just had "mast.swf", and the second had a full absolute URL. While the absolute URL will work, if you use SSL on your pages, it will give security warnings, so dropping the domain name solves that. Basically, use the full relative path in both places and it's all good:

    Code:
    document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
    document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
    document.write('WIDTH="1024" HEIGHT="40" id="mast" ALIGN="left">');
    document.write('<PARAM NAME=movie VALUE="/includes/templates/silverfish/images/mast.swf"> <PARAM NAME=loop VALUE=true> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> <EMBED src="/includes/templates/silverfish/images/mast.swf" loop=true menu=false quality=high bgcolor=#000000 WIDTH="1024" HEIGHT="60" NAME="mast" ALIGN="left"');
    document.write('TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
    document.write('</OBJECT>');
    You probably, for compliance, should also change your JS call from
    Code:
    <script src="http://globalsubnet.com/includes/templates/silverfish/jscript/mast.js"></script>
    to
    Code:
    <script type="text/javascript" src="/includes/templates/silverfish/jscript/mast.js"></script>
    .

    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.

  3. #3
    Join Date
    Feb 2007
    Location
    Newark, DE
    Posts
    25
    Plugin Contributions
    0

    Default Re: Flash alignment, width

    Dr. Byte,

    Thanks for the SSL advice...my friend had pointed out in other pages for images that the entire URL makes every image take just a little longer than just using "../whatever" to call the server directly. So, I've gone through the files and corrected all those instances. However, this hasn't solved the flash width problem. At first, it seemed that "mast.js" would only respect our attributes for "height", but not width. Then, I noticed that it mattered what
    Code:
    <div></div>
    tags I placed the script call between. Putting them here:

    PHP Code:
    <!--bof-header logo and navigation display-->
    <?php
    if (!isset($flag_disable_header) || !$flag_disable_header) {
    ?>
    <script type="text/javascript" script src="../includes/templates/silverfish/jscript/mast.js"></script>
    <!--<div id="headerWrapper">-->
    <!--<script src="http://globalsubnet.com/includes/templates/silverfish/jscript/mast.js"></script>-->
      <!--<div id="navMainSearch">
        <div id="searchBox">
              </div>

      </div>-->
      <!-- </div>-->
    made it a little wider. As you can see, I have inserted the code before the first "div" is called...and it made the masthead a little wider. You can also see other places where I tried to use it, commenting out certain areas and uncommenting them to see which ones worked best. However, I can't get it to START ALL THE WAY AT THE LEFT NO MATTER WHERE I PUT IT OR WHAT ATTRIBUTES I SPECIFY!!! ARRRRRRRRRGGGGGHHHHH. Please help more Dr. Byte!! What are we not seeing? Funny thing is, when it was an image and not a flash, there were no problems.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Flash alignment, width

    I'm not sure I understand you fully.

    When I made the change I posted above, I was able to see the flash span the full width (although the initial logo was still small and centered).

    Do you have a picture of what you want it to look like?
    .

    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.

 

 

Similar Threads

  1. v153 Overall width and sidebar alignment problems
    By amyleew in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 7 Sep 2014, 04:55 AM
  2. Flash - Different width in mozzila
    By lightup in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Nov 2010, 01:44 PM
  3. Attribute table width + Alignment
    By Rainyplace in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 11 Dec 2009, 09:23 AM
  4. Flash issue.. css flyout menu hides under flash..
    By Muzz in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 8 Sep 2009, 06:41 AM
  5. Zen cart width and alignment?
    By Danielle in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 Aug 2006, 10:30 PM

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