I am having trouble with SWFObject API
I have tried in a custom theme, fresh installs and modifying contrib themes. This is the code i have used (based on the release notes - http://drupal.org/project/swfobject_api) is:
<?php
$url = "files/flash/screensaver.swf"; //path to flash file
$params = array('width' => 143, 'height' => 110 );
?>
[i.e. this is hard coded into the theme]
I repeatedly get the 'you must install flash' message showing up - this was verified on other machines as well.
I have it on an site (set offline) - http://www.sandon-point.org.au/user
The image at the top right is set as background for non-flash users and i have set the message to hidden (for the benefit of users without flash installed).
I have the module enabled, and have tried SWFObject 1.5 and 1.4.4.
After hours of trying to resolve this we determined that the swfoject.js file is not called by the page.tpl file. I am not sure why it is not called, and assume it is part of the issue.
When i hard code a call for the js file into the page.tpl file, the swf file loads (i.e. no error message).
Any ideas would be appreciated (i have not logged this as an issue as yet - want to see if i have done something wrong first).
Thanks,
c.
Comments
JS
The JavaScript file is only automatically added when you use the code in a node (story, page etc). If you do this in a custom theme, you indeed need to add the .js file by yourself.
--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.
thanks...
Thanks for letting me know - this helped.
...i had it working for a little while.
http://www.sandon-point.org.au
Might be bugs in my custom theme??
avolve designs | ethical by design
how did you do it??
hi im a newbie here.. and i experienced the same problem.. can you give me the code for calling the js file in the page.tpl.php? thanks
Use drupal_add_js
You can use drupal_add_js('path/to/my/javascript.js');