Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Flash issues? 
 
losse
Member
 
Total Posts:  69
Joined:  2009-01-31
 

Hi
Have any of you encountered issues with putting flash files on a magento install? I replaced a few images with flash animations on the homepage and for some reason, Internet Explorer can’t pull them up…

I installed using the typical <object> tag.

I tested on Firefox and it works..

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
adsjflkj89j
Member
 
Total Posts:  52
Joined:  2009-03-19
 

I don’t really know why you are having a problem with IE.  Maybe your missing something… Can I see the code?

 
Magento Community Magento Community
Magento Community
Magento Community
 
losse
Member
 
Total Posts:  69
Joined:  2009-01-31
 

Hey

This is a chunk of code from the /default/template/page/html/header.phtml file

<div class="header-top-container">
    <
div class="header-top">
        <
h1 id="logo"><h1 id="logo"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="307" height="175">
  <
param name="movie" value=<param name="movie" value="<?php echo $this->getSkinUrl('images/media/swf/logo.swf') ?>" />
  <
param name="quality" value="high" />
  <
param name="wmode" value="transparent" />
  <
embed src="<?php echo $this->getSkinUrl('images/media/swf/logo.swf') ?>" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="307" height="175"></embed>
</
object></h1>
</
h1>

Does it have anything to do with the fact that it’s really a .phtml file displaying?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Periculi
Sr. Member
 
Total Posts:  249
Joined:  2009-02-03
 

XHTML does not support the <embed> tag.  This is a common problem when trying to get flash into xhtml dtd.  You should try to use the right <object> format and that should clear up this issue.  You can find lots of information through a google search for embedding flash in xhtml.

 
Magento Community Magento Community
Magento Community
Magento Community
 
losse
Member
 
Total Posts:  69
Joined:  2009-01-31
 

Can you suggest a solution?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Periculi
Sr. Member
 
Total Posts:  249
Joined:  2009-02-03
 

I did.  Google it. rasberry But since that wasn’t working for you I can do this:

Basically you want to format the object tag properly and get rid of the embed tag altogether:

<object
   type
="application/x-shockwave-flash"
   
data="http://www.example.com/path_to_your_movie.swf"
   
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/
             swflash.cab#version=6,0,0,0" 
width="400" height="300">
   <
param name="allowScriptAccess" value="sameDomain"/>
   <
param name="movie"
          
value="http://www.example.com/path_to_your_movie.swf"/>
   <
param name="quality" value="high"/>
   <
param name="play" value="false"/>
   <
p style="text-align:center;">
      <
a href="http://www.macromedia.com/go/getflash/">
      <
img src="http://www.example.com/get-flash-player.gif"
           
alt="Macromedia Flash Player" style="border:none;"/></a>
   </
p>
   <
noscript>
      
Sorry your Browser isn't able to play Flash.
   </noscript>
</object>

There are more params you can use as well, search Google for the Satay method for flash embedding, for instance.  Sometimes IE has a problem with <object> which is why you want to use the script published by the flash player.  Magento already has AC_RunActiveContent.js included, but you need to addJS it in the page.xml to include it in the head tags.

addit - and if you are trying to look at it on your home windows machine don’t forget to add the lovely

<!-- saved from url=(0013)about:internet -->
 
Magento Community Magento Community
Magento Community
Magento Community
 
losse
Member
 
Total Posts:  69
Joined:  2009-01-31
 

addit - and if you are trying to look at it on your home windows machine don’t forget to add the lovely
<!-- saved from url=(0013)about:internet -->

What’s this do?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Periculi
Sr. Member
 
Total Posts:  249
Joined:  2009-02-03
 

It tells IE not to block flash when the file is on your computer, it’s a ridiculous relic from the days of MS vs. Flash Player.

 
Magento Community Magento Community
Magento Community
Magento Community
 
adsjflkj89j
Member
 
Total Posts:  52
Joined:  2009-03-19
 

Piruculli’s code seems right.

Mine works fine too in IE and Firefox on Magento… try modifying it to your specs…

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="400" height="325">
  <
param name="flash_component" value="ImageViewer.swc" />
  <
param name="movie" value="file:location/flashfilename.swf" />
  <
param name="quality" value="high" />
   <
param name="wmode" value="transparent" />
  <
param name="FlashVars" value="flashlet={imageLinkTarget:'_blank',captionFont:'Verdana',titleFont:'Verdana',showControls:true,frameShow:false,slideDelay:5,captionSize:10,captionColor:#333333,titleSize:10,transitionsType:'Random',titleColor:#333333,slideAutoPlay:false,imageURLs:['img1.jpg','img2.jpg','img3.jpg'],slideLoop:false,frameThickness:2,imageLinks:['http://macromedia.com/','http://macromedia.com/','http://macromedia.com/'],frameColor:#333333,bgColor:#FFFFFF,imageCaptions:[]}" />
  <
embed src="file:location/flashfilename.swf" quality="high" wmode="transparent” flashvars="flashlet={imageLinkTarget:'_blank',captionFont:'Verdana',titleFont:'Verdana',showControls:true,frameShow:false,slideDelay:5,captionSize:10,captionColor:#333333,titleSize:10,transitionsType:'Random',titleColor:#333333,slideAutoPlay:false,imageURLs:['img1.jpg','img2.jpg','img3.jpg'],slideLoop:false,frameThickness:2,imageLinks:['http://macromedia.com/','http://macromedia.com/','http://macromedia.com/'],frameColor:#333333,bgColor:#FFFFFF,imageCaptions:[]}" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="400" height="325"> </embed> 
</object>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Periculi
Sr. Member
 
Total Posts:  249
Joined:  2009-02-03
 

But yours won’t validate for xhtml, adsjflkj98j.  Try it with the w3c validation for xhtml and see why.

 
Magento Community Magento Community
Magento Community
Magento Community
 
adsjflkj89j
Member
 
Total Posts:  52
Joined:  2009-03-19
 

Yeah… I know… I’m pretty lazy in that perspective...I should be more intune with validation.

Another Option is to create or use an existing static block within the header and put in whatever you want from the backend…

Take a look at: http://www.magentocommerce.com/boards/viewthread/17933/P0/

Ive used this option to create my own “callouts” for sidebars....

<reference name="OOOOO">
      <
block type="cms/block" name="OOOOO">
          <
action method="setBlockId"><block_id>OOOOO</block_id></action>
      </
block>
  </
reference>
 
Magento Community Magento Community
Magento Community
Magento Community
 
losse
Member
 
Total Posts:  69
Joined:  2009-01-31
 

So is that why now I see “Macromedia Flash Player” link instead of the actual swf on Firefox? On IE it now looks fine!?! totally confused

 
Magento Community Magento Community
Magento Community
Magento Community
 
Periculi
Sr. Member
 
Total Posts:  249
Joined:  2009-02-03
 

What version of flash are you using?

I generally use what comes out of flash with some alteration.  I remove the embed tag and place the data="path to my swf” in the object tag.

<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<script language="javascript">
    if (AC_FL_RunContent == 0) {
        alert("This page requires AC_RunActiveContent.js.");
    } else {
        AC_FL_RunContent(
            '
codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
            
'width''800',
            
'height''400',
            
'src''flash_logo',
            
'quality''high',
            
'pluginspage''http://www.macromedia.com/go/getflashplayer',
            
'align''middle',
            
'play''true',
            
'loop''true',
            
'scale''showall',
            
'wmode''window',
            
'devicefont''false',
            
'id''flash_logo',
            
'bgcolor''#ffffff',
            
'name''flash_logo',
            
'menu''true',
            
'allowFullScreen''false',
            
'allowScriptAccess','sameDomain',
            
'movie''flash_logo',
            
'salign'''
            
)//end AC code
    
}
</script>
<noscript>
    <
object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="800" height="400" id="flash_logo" align="middle" data="flash_logo.swf">
    <
param name="allowScriptAccess" value="sameDomain" />
    <
param name="allowFullScreen" value="false" />
    <
param name="movie" value="flash_logo.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />    
    </
object>
</
noscript>

However, you can also try to just use the <object block with a little bit of tinkering (although it may give some browsers fits and get blocked by people who have IE internet security settings maxed)

<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="800" height="400" id="flash_logo" align="middle" data="flash_logo.swf">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="false" />
    <param name="movie" value="flash_logo.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />    
    </object>
Obviously some of the params are not what you need and the width/height is different.

You shouldn’t need:
<!--url’s used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
on a production server.  It’s for local testing on a windows machine.  Are you testing on the same machine and is it a windows platform?  Maybe all you originally needed was those lines to tell windows IE to not block your flash swf…

Or try this.
Satay Method is here.

 
Magento Community Magento Community
Magento Community
Magento Community
 
adsjflkj89j
Member
 
Total Posts:  52
Joined:  2009-03-19
 

That’s weird… I use dreamweaver to embed media files and I never really touch the code per say… Also, I almost always include BOTH Params and Embed, that way if it doesn’t want to use the embed it’ll use the params… And I’ve never had a problem using it in IE or Firefox or Opera for that matter.

I sometimes use this flash generator and it works almost every time:
http://cit.ucsf.edu/embedmedia/step1.php

 
Magento Community Magento Community
Magento Community
Magento Community
 
adsjflkj89j
Member
 
Total Posts:  52
Joined:  2009-03-19
 

Periculli,

Thanks for the links… ill have to brush up on some validation…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Periculi
Sr. Member
 
Total Posts:  249
Joined:  2009-02-03
 

Somewhere in there should be a way to get the xhtml to be happy and still see your flash in every browser.  I have been working on understanding magento so much I think I forgot a bunch of flash tricks along the way…

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2