Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Flash .swf Files


Guest

Recommended Posts

yes instead of the extension .gif or .jpg use .swf

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

If you use an ftp program you should not have a problem

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

I am fairly certain that browsers can not use swf files in <image> tags. The code that Macromedia suggests involves using <object> and <embedded> tags. The effect is to tell the browser what plugin to use and to download the plugin if not currently installed.

 

The code to do this has been posted in the forums (i.e. I've seen it), but I don't know where. The simplest way to use it is to replace the whole echo tep_image with the flash code.

 

Hth,

Matt

Always back up before making changes.

Link to comment
Share on other sites

Thank you Matt,

 

I think I can make that modification work!

 

I work in Flash 90% of the time and I wanted my product images to have 3D rotation. I will modify all the image tags and simply use still .swf's when I don't want animation.

 

Thank you!

Link to comment
Share on other sites

You can always just add a new parameter to the tep_image function at the end....say something like this:

////
// The HTML image wrapper function
 function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '', $swf = 'no') {
   if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
     return false;
   }
$extension = substr($src, -4);
if ($extension == '.swf') $swf = 'yes';

// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
if ($swf == 'no') {
$image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';
} else {
$image = '<embed src="' . tep_output_string($src);
}

   if ((tep_not_null($alt)) && ($swf == 'no')) {
     $image .= ' title=" ' . tep_output_string($alt) . ' "';
   }

   if (((CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height))) && ($swf=='no')) {
     if ($image_size = @getimagesize($src)) {
       if (empty($width) && tep_not_null($height)) {
         $ratio = $height / $image_size[1];
         $width = $image_size[0] * $ratio;
       } elseif (tep_not_null($width) && empty($height)) {
         $ratio = $width / $image_size[0];
         $height = $image_size[1] * $ratio;
       } elseif (empty($width) && empty($height)) {
         $width = $image_size[0];
         $height = $image_size[1];
       }
     } elseif (IMAGE_REQUIRED == 'false') {
       return false;
     }
   }

   if (tep_not_null($width) && tep_not_null($height)) {
     $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
   }

   if ((tep_not_null($parameters)) && ($swf =='no')) $image .= ' ' . $parameters;

   $image .= '>';

   return $image;
 }

 

That's it. Upload the image or swf file as usual, and if it's a flash file it will be embedded properly. If it's a picture, it will be called properly.

 

 

HTH,

-Chris

Chris Sullivan

Link to comment
Share on other sites

As in selecting a group of like products and comparing their features?

 

If this is what you mean then the best way to do it is to manipulate the database and add seperate tables for each type of feature. This way you can directly compare and contrast actual features, where as you can't do this if they are mentioned in a big block of text.

 

If you know what you're doing.....it's pretty simple.

 

-Chris

Chris Sullivan

Link to comment
Share on other sites

That is EXACTLY what I mean...

 

And no...I don't know what I'm doing! :blink:

 

I can tell you we have broken all the information down into seperate feilds, but not tables.

 

To keep it simple, I was thinking something along the lines of a split framed page with multiple seperate dynamic drop down menus. When a selection is made, the frame fills in with the selected product...?

 

Take a look at www.shopping.com to see how we want it to function.

 

 

Any advice you can offer is GREATLY appreciated.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...