Hi, after some fussing and fixing, I got an Image Rotator to work for me, very nice.
I did that on a PHP ready page node. But, I thought it might be better if I put this
in at the template, I have a special front page template, designed for a flash
area.

When I move the code to the template the rotator stops working; I get the
error 'Sorry, flash is not available.' But that's cool sort of, just seems like the
paths would be wrong / different at the template level?

Anyway, code is just some sample stuff :

  // You can grab a playlist using a simple file
  // array, by calling the SWF Tools helper function.
  $playlist = swftools_prepare_playlist_data(
    array('image1.jpg','image2.jpg','image3.jpg'));

  // Then pass this to swf_list.
  print swf_list($playlist, "613x172",
  array('frameColor' => '#FF0000','bgcolor' => '#123456',));
 

Can SWFTool work in a template, what might I need to change, look at?

Thanks for ideas, John

Comments

goose2000’s picture

Ok, found one workaround. This problem indicates there is something not happy with the 'Embedding settings' in the admin area. I tried the other options, and found that 'Embed Flash Directly, don't use JavaScript replacement' worked perfect. Checked out in FF and IE

Maybe a better way? In anycase, maybe help someone.

John A

spasmody’s picture

Yes goose2000, maybe help me for instance. I prefer to put the code directly in the template to. And actually, this seems to be better (no error message). But I still have no result on my screen. I suspect an error in the file locations. What directory did you put your images in?
Thanx
Spasmody

goose2000’s picture

Hi,

I don't have anything set in the embed - default files directory (blank in the SWFTool admin area) So,
I found if I just dumped them into the Drupal /files/ directory, they got picked up there. I haven't
tried to changes this yet but will need to.

John

kris_mcl’s picture

Hi, sorry to bring back an old thread. I'm looking to do the same thing (embed a SWF in my page.tpl.php file using SWFObject2), and I get the 'Sorry, Flash is not available.' message, too.
The Flash file shows up ok when I use the direct embed method in the SWFTools admin.
Has anyone gotten this to work?

Thanks in advance!

Kris

ron williams’s picture

Status: Active » Closed (won't fix)

5.x-1.x is no longer supported, so I have marked as closed.